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