LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Read stops although....

I use VISA Read to read values from a scales at a Serial Port (RS 232). The scales sends 22 signs a time, terminated by a carriage return and a line feed after that. It is set to "send always". I work with Hardware Handshake (CTS/DTR)
Although I did the following things, I only receive 22 bytes in the read buffer of VISA Read.
The things I did (in order of data flow):
- Configuring the Port in frame 1 of a stacked sequence
- Immediately after configuration I put a property node where I set the Termination Character Enable attribute to false and the Serial End Mode for Reads to None
- Write \1BP\n to the Serial port (= send/print always)
- VISA Close
- in frame 2 of the stacked sequence I put VISA Read (in a while loop), the "bytes at port"-count is at the bytes to read port of VISA Read
If I put a probe on the bytes to read (which are the bytes at port) I can see that this number increases but the probe at the read buffer shows only 22 bytes at each loop iteration. But I need to read all bytes at the port because I need the last (latest) one for further application.

What else is to do? Is the carriage return in the signal from the scales the problem? What do I do to read without stopping?
0 Kudos
Message 1 of 2
(2,564 Views)
I've had a similar problem in the past.

I had the impression that simply wiring the temination character enable to false did nothing. Only when I entered a string constant which was certain not to appear at the serial port, did the function read everything.

If you have a string where you're certain it won't be sent from your scales, wire it to the termination character input, and set the termination character enable to false also. This might work.

I don't know if an empty string can be wired to the termination character, but maybe it's worth a try....

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 2
(2,558 Views)