Receiving variable length packets through a com port in Simulink using SLDRT package
Afficher commentaires plus anciens
Hi,
In my application I am simulating in Simulink Desktop Realtime (SLDRT) environment and trying to use "packet output" and "packet input" blocks available in the SLDRT package to send and receive through a com port. But the issue is that the packet lengths are not fixed for both Tx and Rx. I have found a way to get around this limitation for Tx, using multiple "packet output" blocks executed based on a switch case logic.
for Rx (i.e., packet input) can`t use the same method as the other device that I am trying to communicate with does not send the packet length within the packet itself. packet format uses a startring and end sequence with possible byte stuffing. To make matters hard, the device can even send multiple messages within one iteration of the simulation.
Is there any workaroud / solution to this problem ?
Thank you
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Target Computer Setup dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!