In Simulink, how can I send uint8 array through an RS232-usb cable?

2 次查看(过去 30 天)
Hi. I'm trying to send an array of 9 uint elements from the PC to my device via an RS-232 to USB cable (bought from Startech) in a Simulink environment.
These are some of things I have tried so far: 1. use "to instrument" block or "serial send" block -> The array data didn't seem to properly reach my device. The device did detect something, so there seems to be a problem with the content of data during communication. 2. use the mat function that was built-in with my device by "matlab function" block -> serial class didn't support code generation, so I had to create an equivalent C function and use coder.ceval to call the function. Still working on it, since I got the same problem as #1.
I would like to know if anyone had similar experience with RS-232 commuincation in Simulink. I am out of ideas.. :( Thanks.

回答(1 个)

Emmanouil Tzorakoleftherakis
Does reducing the baud rate help?

类别

Help CenterFile Exchange 中查找有关 Development Computer Setup 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by