Hi All,
Currently trying to debug a problem i'm having with a Labview2011 VI and USB-485/2 device.
The setup has been simplified to have port 1 wire to port 2 in a 2wire-auto configuration. As described here:
http://digital.ni.com/public.nsf/allkb/D5CC369B3E3E6F0586256D1600563245
and here:
https://decibel.ni.com/content/docs/DOC-4169
Port 1 transmits an 8 byte message using visa-write then commences a 8 byte visa-read. (contained in a 10hz timed loop)
Port 2 is configured in a simple loop using the wait for byte visa event, then visa-read 8 bytes, wired directly into visa-write.
For Port 1 data transmitted, data received and the visa-read error code are logged to disk.
The setup sucessfully transmits are receives data without loss ... so the loop back is working..
However! every now and again, an additional zero byte is read from the visa-read of port1.
Almost all port 1 visa-read operations return the "1073676294" code (The number of bytes transferred is equal to the requested input count. More data might be available) which is fine. Very occasionally though, the error code "0" is return (operation completed sucessfully). This "0" code seems to be associated with the additional byte in the receiver.
This is causing a problem because it throws the command/response pairs of the intended application out of sync.
I have tried numerous buad rates, visa-read timeouts and transmit frequencies, the problem remains. Adding a visa-flush buffer prevents the error from propogating, but does not stop it occuring and upsetting the command/response logic.
Any ideas would be appreciated.