Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VI Clear in LabView 7.0

Hello,
we programmed a software with LabView 6.1 which uses the serial port over VISA 2.0.0.
Now we have LabView 7.0 with VISA 3.0.1 and the problem that the VI "VISA Clear" has a deviant behavior as before.
The serial communication don`t work now, if we use the "VISA Clear". Does anybody know if there is anything modified in this VI between VISA 2.0.0 and VISA 3.0.1.
We found nothing. Can i use any other VISA VI to "simulate" the VISA Clear?

Thanks and best Regards

P.Frank
0 Kudos
Message 1 of 2
(3,519 Views)
Patrick:

Yes the behavior changed between NI-VISA 2.6.x and 3.0.x. This was due to a change in the VISA specification. Shame on us for not putting anything about this change into the NI-VISA readme file.

Old behavior: If the I/O protocol attribute was 'normal' (default), then viClear would just return an error. If the I/O protocol attribute was '488.2 strings', then viClear would send "*CLS\n" to the instrument. This was wrong because IEEE-488.2 defines "*CLS\n" to mean something different from "selected device clear", which is what this operation is intended to do (think of GPIB).

New behavior: viClear will first flush (discard) the low-level serial input and output buffers. It will then send a serial break. This is consistent with an IEE
E spec whose number I can't remember, but it defines a serial equivalent for 488.2 communications - in other words, a serial break should cause a device clear. The viClear operation no longer sends "*CLS\n".

Again, sorry for not mentioning this change in the documentation. We've tried to make the operation as close as possible to the industry standards, and no one I talked to at NI or anyone else in VXIplug&play or IVI thought this change would be a big problem. So I hope you can find a good solution to your problem.

Dan Mondrik
National Instruments
Message 2 of 2
(3,519 Views)