exact output format of Packet output
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 ?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Block Libraries en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!