Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA sometimes duplicates data on serial communication using viWrite

Hi,
after an upgrade of our VXI embedded controllers Type VXIpc-871 from the original NI-VISA 2.0.5 to NI-VXI 3.3.1 / NI-VISA 2.6.1 we noticed sporadic transmission problems on a serial interface using the viWrite() function.
On about 5-10% of all telegrams the user data is sent with 2-3 duplicates. E.g. sending a string like "XYZ" using CR (0x0A) as termination character, viWrite
normally produces this: XYZ CR
but sometimes that: XYZ XYZ CR CR
and occasionally that: XYZ XYZ XYZ CR CR CR.

Even a program change to inhibit automatic termination character insertion and doing that manually, changed the behavior to this: XYZ CR
but sometimes that: XYZ CR XYZ CR
and occasionally that
: XYZ CR XYZ CR XYZ CR

Interesting to know, that viWrite reports the correct
number of bytes actually written. I.e. in this example always 3.

Additional information:
Data format on ASRL2:115200,8,N,1
HW-Handshake: RTS/CTS
Flush Out buffer: on every access
OS: WinNT4.0

Does anybody know, if there is a patch, workaround or a newer VXI/VISA version for embedded controllers available?

TIA
Achim Lott, MICRONAS GmbH
0 Kudos
Message 1 of 3
(3,368 Views)
I would actually suggest upgrading to the latest NI-VISA, which is currently 3.2.

http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=132060_US

If the problem still persists, run NI-SPY while your application or test is running and exhibiting the problem. Hopefully, the spy file will give you a little insight on what the problem might be.

-Josh
Message 2 of 3
(3,368 Views)
Thank you for that tip, Josh.
in deed - that solved the problem.
I would suggest to update the VXI download page,
where the old VISA2.6 is included:

http://digital.ni.com/softlib.nsf/websearch/B477EA6D4114AA3386256E0100603DD2?opendocument&node=132060_US


Best regards,
Achim
0 Kudos
Message 3 of 3
(3,368 Views)