필터 지우기
필터 지우기

GUI for Simulink realtime indication

조회 수: 2 (최근 30일)
Marco Wu
Marco Wu 2011년 8월 9일
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

답변 (1개)

Fangjun Jiang
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
Marco Wu
Marco Wu 2011년 8월 9일
Thanks for your reply.
I use Simulink realtime workshop for data acquisition and real time control of some physical devices in my biomedical experiment.
Do you use LabVIEW? What I want is to create a simple GUI like the LabVIEW panel. I only need to have a virtual on screen red light (on when volt > 5V) which is controlled by the real time data acquisition. What I can do is to physically use a LED and connection to the digital output in my PCI card. HOWEVER, it is not a good option for me.
Fangjun Jiang
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 CenterFile Exchange에서 Block Libraries에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by