Hex-Code through RS-232

1 次查看(过去 30 天)
David
David 2014-2-26
评论: Suneesh 2014-2-26
Hi, i made a simulink model to run a few LED's. I know that the module to which the RS-232 is connected Needs for example the Hexcode 'CA00056734DS' to make all LED's light red.
First Thing i did, was reshaping the Hexcode in a Vector: [ CA 00 05 67 34 DS] because more than that can't be send in uint8 without a data Overflow.
Then i created a Counter to read out the vector-elements and send them through the Serial device after converting them into uint8.
These Vector-elements i connected with the TX-Bytes Input and to the NumBytes-input i give the in the example above the number 6 in uint 32 because 6 elements will be send through the device.
But somehow this doesn't work correctly.
Has anyone an idea where my mistake is?
Thanks a lot!
Greetings
  1 个评论
Suneesh
Suneesh 2014-2-26
  1. What library is the Serial transmit block from?
  2. Devices usually require a header/terminator. Have you set this up correctly for your device?

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by