LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VISA to clear a GPIB device

Hi, I am writing a VI that initializes a lock-in amplifier on a GPIB bus. I'm using VISA I/O and my question is how to send an IFC, DCL or SDC message on the GPIB bus with VISA? I know I can use the "GPIB Clear" vi with 488 I/O to send a DCL or SDC message, but it is just confusing that the VISA vi's use a "visa session" and the more specific GPIB vi's use an "address descriptor" in the format "GPIB::n" or "n+m" to address an instrument. Is there a more elegant/clear way to avoid mixing these different types of instrument adressing or does this way of doing things have a specific goal?
0 Kudos
Message 1 of 3
(4,572 Views)
Hi,

The preferred way to Communicate with the instruments is to use VISA. The Protocol is accepted by more vendors than not. The VISA protocol has tremendous advantages.

Regarding your need to Clear a GPIB device - Within the VISA Vis is VISA Clear Vi which send SDC message to the GPIB bus. With VISA you will always be addressing a partcular instrument(VISA RESOURCE NAME). A GPIB::n or COM1 etc. So the Device Clear will Apply to your instrument identified by this resource.

Now regarding Clarity - I beleive the "address descriptor" Connection to VISA VI's was on Ver 5.X. With 6.1 this Connection is called "Visa Resource Name"
The "Address Decriptor" was a String Control and You had to type in GPIB::n and for different interfaces other Strings. With 6.1, this C
ontrol is like a Enum control and can pull all your existing Addresses so you dont have to type. Now it is elegant. You will Not have a chance to Mix Instrument addressing.

You may Want to Look up the Tutorial which Lists Advantages, technique etc.. at this Link

http://www.ni.com/support/visa/vintro.pdf

Good Luck

Mache
Good Luck!

Mache
0 Kudos
Message 2 of 3
(4,572 Views)
You may also want to Look at this thread

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000053D0000&UCATEGORY_0=_201_%24_13_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=visa+Clear+GPIB&USEARCHCONTEXT_QUESTION_S=0

Mache
Good Luck!

Mache
0 Kudos
Message 3 of 3
(4,572 Views)