Can I use Simulink Desktop Real-Time with the Instrument Control Toolbox?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Charles Refvem
el 2 de Ag. de 2019
Respondida: Harsha Priya Daggubati
el 13 de Ag. de 2019
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 comentarios
Respuesta aceptada
Harsha Priya Daggubati
el 13 de Ag. de 2019
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Target Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!