GUI for Simulink realtime indication
1 view (last 30 days)
Show older comments
Hi,
I am using Simulink realtime workshop to control a device; and I want to know the direction of movement of that device. I understand that I can use scope to read the exact data value, but I would want to use a red light to indicate a negative direction and green light for positive direction. How I can set the gui to do that? I know how to make gui update according to the workspace value, can anyway to send values to workspace every 0.05s when I am using realtime workshop?
Thanks
0 Comments
Answers (1)
Fangjun Jiang
on 9 Aug 2011
I think you have some misunderstanding. Simulink Real-Time Workshop is used to generate C code from a Simulink model. The C code then can be compiled and executed in a micro-processor. It is hard to control a hardware device directly in Simulink to achieve real-time control.
Are you doing your simulation in a Simulink model or in a MATLAB GUI? If in a Simulink model, the Scope block is used to observe a signal. There is a Gauges Blockset that provides LEDs to display Green/Red light. http://www.mathworks.com/products/gauges/?s_cid=global_nav
2 Comments
Fangjun Jiang
on 9 Aug 2011
Simulink is not like LabView. I don't think you can use Simulink for real-time control of your physical devices. To make the virtual LED display, the Gauges Blockset is the right tool.
See Also
Categories
Find more on Development Computer Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!