Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Session Access Using LW-CVI

Good Morning.

 

I am developing a system where I would like, on start up, to initialise and open sessions to all the instrumentation.  I would like to store the Visa Session handles so I can access the instrumentation without having to open and close sessions.  I have a number of different applications that can be ran so I would like them to access a common 'table' of sessions.  The sessions are closed on shut down.

 

So, how can I access the opened sessions, using CVI?  I've seen LV Vi performing something similar but can't find CVI equivalent, and nothing in the VISA API suggests how to do it.

 

many thanks,

 

Steve

0 Kudos
Message 1 of 5
(3,347 Views)

It's been a long while since I used CVI.

 

Refresh my memory with a code snippet of how you open a VISA session to an instrument.

0 Kudos
Message 2 of 5
(3,300 Views)

Hi, Thanks for taking the time. We open and close sessions using <instrument>_init (....) from Function Panels.  It returns a Visa handle to the instrument, and it's this we'd like to store and access.

 

Does that make sense?

 

Regards,


Steve.

0 Kudos
Message 3 of 5
(3,236 Views)

Unless I am not understanding your initial question, CVI automatically handles the VISA handle and uses it whenever you use a function for that specific instrument. So there is no need to "save" it.

Run the initialize function once and leave it alone. 

 

.

0 Kudos
Message 4 of 5
(3,226 Views)

I probably didn't explain it very well, to be honest.  However while trying to re-describe my intentions I came accross NI Session Manager which is exactly the functionality i'm looking for.  All I've got to do now is figure out how to use it!  I feel another topic coming on.

 

Many thanks,

 

Steve

0 Kudos
Message 5 of 5
(3,173 Views)