LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you mix VISA drivers & GPIB functions?

Can you mix VISA instrument drivers & GPIB I/O functions on the same block diagram? I am using VISA drivers to control a LeCroy LT344L oscilloscope - they are working fine, but I need to perform a query of some specific scope parameters and the VISA drivers cannot provide the exact command that I need. I used the GPIB send and receive for these query commands, but now am getting an error message:

"Error -1073807265 occured at VISA Write in LCDSO Utility Default Instrument Setup.vi->LCDSO Initialize.vi->ReadMeas.vi Possible reasons: VISA: (Hex 0xBFFF005F) No listeners condition is detected (both NRFD and NDAC are deasserted).

Is there a possible confict when both these protocols are used together? Thanks fo
r any help or insight.

Mike Selecky
0 Kudos
Message 1 of 7
(3,959 Views)
My suggestion would be to use the separate VISA Write and VISA Read functions for your special commands. In that way you use the same session as the VIs in the driver. To mix VISA and GPIB functions in communications to the same instrument, I suspect you would have to first close the VISA session before using a GPIB call and then do an open VISA afterward.
0 Kudos
Message 2 of 7
(3,959 Views)
Thanks Dennis, yes, that seems to be exactly what the problem was - the VISA session had to be closed first. I also used your suggestion of the separate VISA functions and they worked well; I guess there's no good reason to use the GPIB functions in this case. Again, thanks, I appreciate the response.
0 Kudos
Message 3 of 7
(3,959 Views)
I just want to clarify a few things about mixing VISA and GPIB.
If all your I/O is done on the diagram with VISA functions and GPIB
functions, you should be okay. LabVIEW has code that tries to keep the two
from stomping on each other. You have to know what you're doing--you can't
have two VIs trying to control the instrument at once, for example.
This is _not_ true for C-based instrument drivers (aka, VXIPNP,
including IVI). We have no protection between the VISA calls inside those
drivers and the builtin functions. If one is in progress and you try to use
the other, you'll get an error. One way to demonstrate this would be to
start a GPIB Read (which is asynchronous by default, meaning that LabVIEW
starts the Read and then looks for other stuff to do),
then use an
instrument driver for a device on the same bus. The instrument driver will
return an error. You just have to be using the same bus--it doesn't matter
if you use the same device.
Fortunately, this doesn't come up that often in practice. When needed,
there are workarounds--e.g., keeping all GPIB I/O in a single thread (at
least per bus) and using synchronous VISA and GPIB Reads/Writes. Yes, we're
working on ways to make this less of an issue, but I won't go into details
yet.

Brian Powell
Sr. Group Manager
LabVIEW R&D
brian@ni.com
0 Kudos
Message 4 of 7
(3,959 Views)
Mike,

Take a look at the functions you are using to communicate with the instrument. Deep down in the code (or just in the diagram on most), you will find simple VISA Writes and Reads.

Format your commands in a similar fashion. For clarity, drop them in a subVI just like the other functions. Your code will look and read more easily.
Message 5 of 7
(3,959 Views)

Hello,

I work with several sourcemeters and mulitmeters (Keithley and Agilent). I realised that there is a difference between VISA and GPIB functions that I want to read more about. More specifically while working with agilent and using GPIBwrite or GPIBread function I get an error message in my labView block diagram. For instance, right after a querry, say *IDN? I get an error message (ERR (7) or ERR(30)) while it works well with VISAwrite and Visaread. 

 

Where could I find any related information/explanation or manuals ?

 

 

 

0 Kudos
Message 6 of 7
(3,524 Views)

Hello Matyba,

In the future could you please post your question to a new forum thread, instead of a 7 year old discussion forum, as this will make it easier to not only answer your question, but also help anyone in the future who may have your same question. Looking into your problem, I have found two links that I would like for you to take a look at. The first is a link to our site where we have answers for questions on VISA and Instruments Drivers. Instrument drivers give the user the functionality to communicate with an assortment of devices, with already fashioned LabVIEW code designed specifically for that device. The second link will direct you to common GPIB LabVIEW error codes and help to explain the error that you are seeing. Thanks again and have a great day!

Regards,

 

Nicholas K

National Instruments
Applications Engineer
0 Kudos
Message 7 of 7
(3,490 Views)