LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with communication with a device

Hi....
I create a modbus driver ascii, and I´m communicating with a device, but it responds sometimes.... when I push the key RUN of Labview the device not respond and I have to stop.. but the second time the instriment respond perfectly... the instrument responds each two time....
I believe that the problem is because I use bytes at serial port immediately read serial port. In probe mode in labview (RUN) in read serial port the instrument stop... the second time it respond... I use this bytes at serial port and read serial port for clena the buffer...what can I do?
0 Kudos
Message 1 of 2
(2,549 Views)
It sounds like your output buffer is not being flushed. There is an option to flush the buffers (at least under VISA). This should be called after writing to the device, including perhaps a small wait (20 msec). Then, using the "bytes at serial port" you can loop until there are actually bytes there.

If you are using Windows, try changing the Serial buffer settings to smaller (I have found that switching them off altogether is often a bad idea).

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 2
(2,549 Views)