Packet Input (Simulink) returning 0s

2 visualizaciones (últimos 30 días)
John
John el 21 de Ag. de 2014
Comentada: Jan Houska el 25 de Ag. de 2014
EDIT: This works in Normal mode, but not External mode!
In External Mode, the Packet Input block in Simulink only returns 0s when connected to my serial port device. The baudrate is set correctly, the device is verified as streaming ASCII by connecting to a terminal and watching the stream.
Block error and Data Ready both stay at 0, and I see the data being streamed from the device when the program is running. This is an FTDI serial port interface.
Thoughts? I'm running Real-Time Windows Target in External Mode.

Respuestas (1)

Jan Houska
Jan Houska el 22 de Ag. de 2014
The situation you describe (Data Ready is 0) happens when the incoming data is not accepted by the device, for whatever reason. The fact that the data output stays at the initial value of 0 is only a consequence of that. Please try to enable the Data Error port and check there. If the output of this port goes to 1, something with the incoming data is wrong after all (baud rate, parity, data format, whatever).
  2 comentarios
John
John el 22 de Ag. de 2014
Editada: John el 22 de Ag. de 2014
As noted above, everything works in Normal mode, just not External mode. So the formatting must be correct. Also, as mentioned in the post, both block error and data ready outputs are 0s. EDIT: running 115200 RS232 in case that matters.
Jan Houska
Jan Houska el 25 de Ag. de 2014
I have just tested RS232 in both Normal and External modes, both work for me. I have used the rtpacketio example with driver changed to Serial Port and a loopback connector on the port. Do you think you could try something similar to reduce the possibility of some unrelated issue?

Iniciar sesión para comentar.

Categorías

Más información sobre Real-Time Simulation and Testing 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!

Translated by