Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use both ID? and *IDN? in same labview program?

All,
 
I want my application to support either an Agilent 856X spectrum analyzer (VISA commands) or an Agilent PSA-E44XX spectrum analyzer (IVI commands) programmatically, I don't want the user to have to decide the analyzer type.  My first idea was to query the analyzer for its identification.  However, the 856X command for identification query is (ID?) and the PSA-E44XX's is (*IDN?).  The problem is sending the wrong command to either instrument generates an error condition.  For example: 
 
Step 1) Send *IDN? to 856X:  This creates error code 112 and the READ command times out.
             Send *IDN? to PSA-E44XX:  Good to go.  Can READ back results.
Step 2) Send ERR? to 856X:  Clears error code 112 and can READ back 112 so I know which instrument I have by default.  Carry on with instrument type 856X.
             Send ERR? to PSA-E44XX:  Causes instrument to hang and eventually times out.
 
It seems like what you do to get around error condition with one instrument type makes the other instrument type unusable.  Also, I did think to use the GPIB READ and WRITE VIs instead of the VISA and IVI so both instruments will respond.
 
Is there a cleaner way to handle having the program figure out which analyzer it is talking to without relying on timeouts to ocurr?
 
Thanks,
-Scott
0 Kudos
Message 1 of 3
(3,483 Views)
Hi
You can use visa for both instruments, GPIB makes use of visa underneath so don't use it directly anymore.
there is a e4406a driver available but it is not certified ,meaning that it could be an old one
greetings from the Netherlands
0 Kudos
Message 2 of 3
(3,473 Views)

Hi,

I had the same problem. I did the same operations but with 2 more steps(see 1 and 4):

1. decrease the timeout value

2. send the identification query

3. if error clear it and send second identification query.....

4. restore the timeout value

It is of course not a "clean" solution but I don't know any other one.

Regards
CLD - Labview Certified Developer
0 Kudos
Message 3 of 3
(3,462 Views)