xPC Target / Commtech-Fastcomm 422/4-PCI-335F block variable length binary data
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I'm actually using xpctarget/commtech-fastcom 422/4-PCI-335F driver block to communicate with RS485 protocol, to send and receive fixed length binary data through a port. Is there a way to send and receive varying length binary messages to a device, through a port of the driver block within a unique model? Thanks for your support. Best regards,
0 Commenti
Risposte (1)
Gordon Weast
il 14 Dic 2012
In general the message needs to have some identifier that tells you the length of the message to expect. The most common is to have a message header or preamble that changes depending on the length of the message that follows.
To receive variable length messages on xPC Target, use the FIFO read binary block in the serial IO section of xpclib. You can specify several different headers and the associated message length to expect. The block looks for that header and copies out the specified length to it's output port.
0 Commenti
Vedere anche
Categorie
Scopri di più su Target Computer Setup in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!