From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best method to query for older GPIB equipment with ID? and newer with *IDN?

Solved!
Go to solution

Good day,

 

I am writing a test executive where it needs to scan the bus for support of older (HP/Agilent 856x series) and newer (Agilent 440x and 444x series) spectrum analyzers. *NOTE* I originally posted this question in my NI Community blog. I apologize for redundancy but someone recommended I re-post here.

 

IDN and ID query.jpg

The first frame looks for the newer analyzers with *IDN? then if that fails sets the boolean in the error cluster to TRUE. The next frame then uses the error cluster's boolean to decide whether an older HP analzer is connected instead using ID? query. Disclaimer: the second frame is a clone of the ID query of the 856x Initialize VI. I just want to use what already worked - no reinventing the same wheel?

 

But, lo and behold, it doesn't work as expected. If I have the frames in this order and connect a HP8563E the GPIB time's out error. This code works with the newer 4407 or 4440 since the *IDN? query passes and the second frame is not executed.

 

Now, when I move the second frame to become the first frame and run it with HP8563E the query works but will have a GPIB timeout if I have the 4407 or 4440 connected.

 

Long story short, how do I support both older GPIB ID? and newer IDN? in my code?

 

I have attached the query VI created with LV 2012.

 

Many thanks!

Aldrin

0 Kudos
Message 1 of 4
(4,364 Views)
The query should time out if you have an older instrument and you'll have to clear the error If you want to do a different query. An error condition is supposed to make subsequent functions be skipped.
0 Kudos
Message 2 of 4
(4,356 Views)

Ahh right. I forgot about that. I should have switched-on the old "light bulb". Getting too greedy. 😉

0 Kudos
Message 3 of 4
(4,351 Views)
Solution
Accepted by topic author Relativity

I think Michael Aivaliotis of JKI and NI have an elegant solution:

 

https://decibel.ni.com/content/groups/large-labview-application-development/blog/2015/05/14/what-is-...

 

Cheers!

Aldrin

 

0 Kudos
Message 4 of 4
(4,348 Views)