LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA READ terminaison character producer consumer model

Hello,

 

I'm developping an IHM to receive data from a sensor.
The hardware sensor is built  in my company and I have no flexibility with it.Only 2 wires RX & GND, no possibility of
hardware handshake.

The sensor send to a RS232 com port some Hexa string every 1s, 10s, 60s or more  and I can't know the sending frequency.
So I scan every 20ms data at serial port with VISA Read and bytes at serial port. At the end of the Hexa string sent by the sensor
there is a termination character but I don't how to use it.

I'm using the producer/consumer model to not lose any data.

Actually I read and concatain received data (with VISA READ) until I have received the right number of bytes (because I know the size of
the hexastring sent =495 bytes).
But in the real working, I will don't know the size of the data to receive from the sensor.(<500 bytes)

So, I want to use the terminaison character to stop the producer loop who contain VISA READ.

What special function or property node must I use to make this operation?
 

I attached a JPEG screenshot of my code.

PS : for the developpment of the VI, I simulate the data of the sensor with an another PC who sent Hexa string in loop
with termination character.
0 Kudos
Message 1 of 2
(2,743 Views)

duplicate post

 

Please don't post the same question to multiple boards.

0 Kudos
Message 2 of 2
(2,734 Views)