Can I use Simulink Desktop Real-Time with the Instrument Control Toolbox?
1 次查看(过去 30 天)
显示 更早的评论
I am desiging a device that is meant to communicate with Simulink in real time over serial. I would like to use the "To Instrument" and "Query Instrument" blocks from the Instrument Control Toolbox, but they do not seem to play nicely with Simulink Desktop Real-Time in any mode other than "Normal". In "Normal" mode, everything works properly but the model cannot run fast enough to be Real-Time.
I am looking for a workaround or suggestion for the best way to implement this design.
I am aware that SDRT comes with its own serial blocks, but they do not have the same functionality as the instrument control blocks mentioned above. I have considered the "Packet Input" and "Packet Output" blocks; however, the "Packet Input" block does not allow more than one type of packet to be sent. I would like to be able to query individual values from my hardware rather than needing to read every piece of data every time.
Ideally, I would be able to send and receive around 20 bytes of data at a rate of at least 100 Hz.
Below is a screen capture of the current configuration which is meant to perform a sine-sweep on a motor attached to the hardware I am trying to interface with.
0 个评论
采纳的回答
Harsha Priya Daggubati
2019-8-13
Hi,
You cannot run a real-time simulation in Rapid Accelerator mode. You can synchronize a Simulink model with a real-time clock using Simulink Desktop Real-Time I/O blocks. I suggest using Stream Input/Output Blocks to transmit and receive your data.
For more information refer to these links:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!