GUI for Simulink realtime indication
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Fangjun Jiang
2011-8-9
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 个评论
Fangjun Jiang
2011-8-9
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Development Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!