From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I have a particle counter from which I would like to extract data thr

ough RS232 interface. When I wrote the VI and executed it the buffer always showed 0 bytes to read consequently nothing was read though data was available. The cable is good beacuse I was able to use it with the manufacturer provided software. Please help.
0 Kudos
Message 1 of 2
(2,864 Views)
ough RS232 interface. When I wrote the VI and executed it the buffer always showed 0 bytes to read consequently nothing was read though data was available. The cable is good beacuse I was able to use it with the manufacturer provided software. Please help.Hi Suresh-

The first step in troubleshooting serial problems is to attempt a serial loopback test (basically reading and writing to & from the same serial port) in LabView. Start off with the LabView <-> Serial example that ships with LabView. It is set up for this test. KB article 1M9D8H6Q is a great reference for serial questions and the description of setting up the loopback test. You can search for "Serial Communication Starting Point" or the document ID from www.ni.com/support.

Also, serial instruments are sometimes fickle about timing. Try inserting 1 second delays after configurations, reads, and writes to see if this helps your performance. This does help quite frequently.

If the loopback test works and the timing does not help, check for the ter
mination characters (i.e. the last character of your serial write buffer). Often most instruments expect "\n" or "\r", try adding these to the end of your write buffer.

Hope this helps, good luck -

ben schulte
national instruments
Message 2 of 2
(2,864 Views)