NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Closing visa session to GPIB Instrument

I encounter a problem with just one of my instrument (this is a custom instrument built for us).

When my sequence (TS 2 + CVI 5.5) closes, I go through closing all sessions + RMsessions.

TS indicates unknown run-time error even before it return from the function 'status = viClose(session);'

In order to avoid the error I just commented out the session closing.

1) Is it possible that the instrumen is the source of the problem? (Or is it strictly a software issue?)

2) What harm is coused if I exit my sequence without closing the sission + RMsessions?

Thanks
Rafi
0 Kudos
Message 1 of 3
(3,032 Views)
Rafi,

1) It's tough to say. The run-time error goes away if you comment out (skip) the session closing step? Does viClose works on all your instruments besides the custom instrument? Does a simple VISA example in CVI work for your custom instrument (especially closing the session)?

2) The only issue you might have in not closing the session is when you go to run your application again. Because the session was not closed down, you might not be able to open another session.

Best Regards,

Matt P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,032 Views)
Hi Matt and thanks for the answere,

Regarding item (1):
Yes, only this instrument gives me the problem. If I comment it out, there will be no error. And yes, ViClose works fine on the other instruments.

Thanks
Rafi
0 Kudos
Message 3 of 3
(3,032 Views)