Dans Simulink, initialiser la valeur d'un Knob en appuyant sur un bouton par exemple.

2 views (last 30 days)
Mon projet comporte un Knob qui permet de commader une position angulaire.
Je souhaite pouvoir remettre à zéro le knob lors d'un évennement comme l'appui sur un bouton par exemple.
L'ensemble doit fonctionner sous Simulink uniquement.

Answers (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU on 30 Dec 2024
Hi didier,
To implement a knob that controls an angular position and can be reset by pressing a button in Simulink, you can follow these steps:
  1. Create the Knob: Use a "Slider Gain" block or a "Knob" block from the Simulink library to represent the knob. This block will output a value corresponding to the angular position.
  2. Add a Button: Use a "Switch" block to control the reset functionality. You can create a button using a "Constant" block that changes its value when pressed.
  3. Reset Logic: Connect the output of the knob to one input of the "Switch" block. Connect the output of the button (which will be a reset signal) to the other input of the "Switch" block. The output of the "Switch" block will be the angular position.
  4. Reset Condition: Set the "Switch" block to output a predefined reset value (e.g., 0 degrees) when the button is pressed. Otherwise, it will output the current position from the knob.
Here’s a simple outline of how the blocks can be connected:
  • Slider Gain (Knob) Switch (Input 1)
  • Constant (Button) Switch (Input 2)
  • Switch Output Scope (or any other block to visualize the angular position)
This setup allows you to control the angular position with the knob and reset it to a specific value when the button is pressed.
Related documentation:
Let me know if you face any trouble?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!