Serial communication with Query Instrument

1 Ansicht (letzte 30 Tage)
Danilo NASCIMENTO
Danilo NASCIMENTO am 27 Okt. 2013
Kommentiert: Walter Roberson am 23 Jan. 2018
Hi, Do you know if the Query Instrument from Instrument Control Toolbox can really catch a signal from a serial connection? I'm using a Virtual Serial Connection to emulate the serial port and I am using Proteus with a dsPic to generate a train of pulses, I already put a oscilloscope in Proteus, and the pulse is going through the serial port, the only problem is the Query Instrument I am using in Simulink that is giving only zero.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 28 Okt. 2013
Serial ports can only receive serial data that is correctly formed into a series, with an appropriate start bit, a series of data bits (usually 8 of them), and a the stop bit. Even within that format, decoding of the pulses is determined by voltage levels, with voltages below -3V being a bit representing logic 1, and voltages above +3V being a bit representing logic 0. By agreement, least significant bit is sent first.
Thus, if you have a train of pulses none of which -3V or lower, then no start bit will ever be deemed to have been seen, and no data will be deemed to have been transmitted. If no pulse is above +3V then no stop bit will be deemed to have been seen. The required timing of the pulses depends upon the agreed serial port rate.
  2 Kommentare
Danilo NASCIMENTO
Danilo NASCIMENTO am 28 Okt. 2013
Bearbeitet: Danilo NASCIMENTO am 28 Okt. 2013
For example, I am using a usb-serial connection of 3.3 V to link dsPIC and Simulink. If I generate a train of pulses of period 1s and amplitude 1 in the dsPIC and pass it through serial connection, is it possible to see it in Simulink with period 1 second and amplitude 1?
Walter Roberson
Walter Roberson am 23 Jan. 2018
No. Only pulses formatted as blocks with start bit and stop bit can be handled by serial.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Test and Measurement 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