- Open your Simulink model. Go to the Library Browser, and under the "Simulink" tab, find the "Dashboard" library. Drag and drop a "Slider" or "Knob" block for "x_ref" and for "y_ref" in the model canvas. Connect the output of these blocks to "x_ref" and "y_ref" from the inputs of the model.
- Double-click on the "Slider" or "Knob" block to open its parameters. Set the minimum and maximum values according to the range of motion of the plate. Run the model once the interface is setup.
- If deploying to hardware, make sure that the blocks used are supported for code generation. Configure the hardware target settings in Simulink to ensure compatibility with the Arduino setup.
How to add a reference position without manually updating it from the Matlab Editor
Hello everyone, we are working on a 2D Ball/Plate Balancing system for our project and we have a presentation in a couple of days where we have to show our first kind of controller for the Board (a PD for instance).
The x_ref and y_ref of the ball is manually updated from the MatLab editor in [mm] as shown in the picture below:
Following this convention:
In order to have more interaction with the system, I would like to know if there's a way to insert the x_ref and y_ref position straight from an interface like this one:
Please note the x_ref and y_ref positions are passed on Simulink and are deployed on a target hardware (due to the interface with Arduino).
Thank you everyone in advance for a reply.
0 comentarios
Respuestas (1)
0 comentarios
Ver también
Categorías
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!