What is the correct way to read Simulink Real Time data from the Speedgoat IO504 read block?
6 ビュー (過去 30 日間)
古いコメントを表示
With the recent update on R2020b+ I am having difficulty with the IO504 read block. Documentation states the output from the IO504 read is “low-order byte of an unsigned 32-bit integer vector”. However the IO504 read block with a fifo bin read returns an error due to dimension mismatch. 1024 elements vs 1 element. Throwing a fifo write before the fifo bin read allows the model to run but does not give the desired result. I’m summary, what is the correct way to take the output of a IO504 read to break up into headers + data of varying size (binary)? Or must I write my own state machine to decode the data correctly?
0 件のコメント
回答 (1 件)
Dimitri MANKOV
2022 年 8 月 9 日
Hi Wiley,
Speedgoat recently introduced product examples in their latest Speedgoat I/O Blockset release (v9.4.1), including an example model for the IO504 module. Furthermore, several examples in the MathWorks documentation show how to deal with binary encoding/decoding (incl. headers) for serial communication protocols in Simulink Real-Time.
I hope this is helpful!
Dimitri
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!