LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument only works with NI Spy running.

I can start MAX and it will find my power supplies. They are Sorensen (Ameteks) XG33-25s. They also respond to IDNs. Running from the program I get this error:

 

VISA Read in PowerSupply.lvlib:Read.vi->PowerSupply.lvlib:Initialize.vi->PowerSupply.lvlib:MvPowerSupply.vi->MvTransmitter.lvclass:ConfigureSystem.vi->MvTransmitter.lvclass:Initialize.vi->MvTransmitter.lvclass:MvTransmitter.vi->MvTransmitter.lvclass:MvTransmitter.vi.ProxyCaller

VISA: (Hex 0xBFFF0015) Timeout expired before operation completed. [Error Code: -1073807339].

 

However if I setup NI Spy to capture they work fine and come up to proper settings. Is the spy slowing it down enough so something isn't being missed? BTW we are using a NI PCI based GPIB card.

 

The capture is attached for your viewing pleasure...

 

 

Thanks,

jvh 

0 Kudos
Message 1 of 14
(3,527 Views)

Seeing the code might be more usefull than the NI-Spy file.

 

ben64

0 Kudos
Message 2 of 14
(3,513 Views)

From the spy file we can see GPIB addresses 3, 4 and 5. Do you have more than 1 instrument and are you sure  you set the address correctly in you code?

 

Ben64

0 Kudos
Message 3 of 14
(3,507 Views)
Here is the core of it but not sure there is enough detail.
0 Kudos
Message 4 of 14
(3,503 Views)

You're right, there not much detail. To read from the supply you first need to send a command to it that will trigger a reply (as the *IDN? command). Then you will read the supply answer. If you send the read command without first sending a query command you will get a timeout. Between the visa write and read commands you can also insert the *WAI command to insure that the power supply completed processing the first command.

 

 

Ben64

0 Kudos
Message 5 of 14
(3,496 Views)
I have an old vector network analyzer that showed similar signs.  It would hang on occasion so I decided to run NI Spy to log the commands that were causing trouble.  What do you know, no more hangs.  Now we just run NI spy with some settings so the log file doesn't get out of hand.  My guess was also that it was slowing something down just enough.  Being experimental physicists, this was actually considered a solution not a problem since it allows us to run. 
0 Kudos
Message 6 of 14
(3,489 Views)
From the Spy file I can't see the Termination char on send?  Do you have the wrong setting? the Sorenrsons need the term char to work RELIABLY although they usually understand the commands anyway the command parser does get confused on occasion.

"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 14
(3,480 Views)

ben64 wrote:

From the spy file we can see GPIB addresses 3, 4 and 5. Do you have more than 1 instrument and are you sure  you set the address correctly in you code?

 

Yes I have three instruments and yes the addresses are correct. Else they still would not program correctly with the spy running.

 

jh 

 

 

 

0 Kudos
Message 8 of 14
(3,460 Views)

 

Hey, here something of interest.

 

After reading Jeff's post I searched google for Default gpib termination character and the very first hit sent me right back to this forum, almost 5 years ago. Looks like EOI should be asserted but some devices like to see LF.

 

http://forums.ni.com/ni/board/message?board.id=140&message.id=12947 

Message Edited by jvh75021 on 03-12-2010 04:03 PM
Message Edited by jvh75021 on 03-12-2010 04:03 PM
0 Kudos
Message 9 of 14
(3,456 Views)

Guess when I learned about it as a newbie (and Smiley Sad a one-hit flier on the forum) back in my Lv 5.1 days

 

I eventually got the MFG to update the interface

Message Edited by Jeff Bohrer on 03-12-2010 04:08 PM

"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 14
(3,448 Views)