Filter löschen
Filter löschen

exact output format of Packet output

4 Ansichten (letzte 30 Tage)
Naveen
Naveen am 21 Jun. 2014
In the following attached model, I send a command ('*00P'+CR) from terminal(COM1) and receive the data in simulink model through packet input. and after doing some comparision I send out 7 bytes of data through packet output and zero when no command is being sent. COM1 is connected to COM8(simulink - PacketIO). I receive the data in the terminal as soon as I send the command. I want to know the exact format of the received data through Packet output because now I want to receive command through a micro controller and send the data back to it. Currently my micro controller is coded in such a way :
while(1) { send_command('*00P\r') // through UART for i = 1 to 7 { receive a byte and print on the terminal } delay_ms(1000) }
now the received bytes are scrambled up and not in the same order as I am sending through simulink ( and also the loopback test that I did). Is it a problem of using delay in the code or output format of the Packet output block is different than I am thinking ?

Antworten (0)

Kategorien

Mehr zu Block Libraries finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by