Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB error handling

My application checks the status from multiple GPIB devices every 50 ms by looping through an array of classes, each of which has a dynamic dispatch VI, "check status", and calling this method. I have a text box that displays information to the user. Lets say 1 GPIB device isn't connected, I would like to display information to the user that something is not connected. Therefore, I go into my error handling when "check status" determines there is an error, clear the error and display a relevant string to the user explaining whats wrong. The only issue is, I don't need this string to be appended to my text box every 50 ms! Is there a better way to handle this than what I'm doing?

 

I have thought about querying devices in my startup routine to see if they are found and displaying to the user at that point which ones aren't connected. However, I'm not sure if they will all respond to the *IDN? command. Will all GPIB devices respond to this?

 

Any ideas on how to best handle this are appreciated.

0 Kudos
Message 1 of 3
(3,687 Views)
That seems like overkill. While not every instrument uses the *IDN? query, most modeern instruments do and earlier ones often used ID? What I've done and what I typically see, is the id query is done once at the beginning. If an instrument is turned off/disconnected mid-test, the VISA functions will return an error so you should just need have a generic error handler as long as your regular read/write subVIs return all errors.
Message 2 of 3
(3,679 Views)
Good deal. Thanks.

Dennis Knutson wrote:
That seems like overkill. While not every instrument uses the *IDN? query, most modeern instruments do and earlier ones often used ID? What I've done and what I typically see, is the id query is done once at the beginning. If an instrument is turned off/disconnected mid-test, the VISA functions will return an error so you should just need have a generic error handler as long as your regular read/write subVIs return all errors.

 

0 Kudos
Message 3 of 3
(3,676 Views)