NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Session Manager and NI-CAN

This is more a suggestion than a question, but ...

I use Session Manager for IVI and VISA instruments. Because it turned out to be quite useful I was wondering if Session Manager could also handle NI-CAN objects?
As I understood the Session Manager help file this is not supported, but maybe there's some sort of workaround.

Nevertheless I would really appreciate to see Session Manager support NI-CAN objects in the future.


Herbert
0 Kudos
Message 1 of 3
(3,172 Views)
Herbert -
The session manager that shipped with TestStand 2.0.1 allows you to create a custom session. The "Instrument Session Types" topic in the help describes the following:

Custom Sessions - Use a custom session to create a data container object that shares ActiveX objects you create or other data between software components you write. Use the Attach and Get methods to attach data to and retrieve data from a session. A custom session does not initialize or close and does not own an instrument handle. The data you share with a custom session does not have to be instrumentation related. You can create a custom session with any name you request. You must always prefix custom session names with "CUSTOM::"

So if you attach an NI-CAN handle or reference
to the custom session, any thread can have access to that handle. If the handle is activeX based it will be released automatically. If the handle is not active-X based, you will have to explicitly close or release the handle so that you do not loose memory.

Hope this helps...

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(3,172 Views)
Scott,

thank you for your answer.

As you pointed out, CUSTOM sessions do not do any initialization or closing. But, IMHO exactly this feature is what makes Session Manager useful.

I don’t know NI’s plans on Session Manager but if you like some customer feedback – here it is:

I use Session Manager in custom step types I create. I have one single step type, which obtains an instrument session from session manager and stores it in a sequence file global.
So I just have one single step type without the need of an extra initialization nor a closing step. Everything is done by session manager – the instrument gets initialized only when the first instance of the step type is executed and the instrument communication is close
d when the sequence file stops executing and the file global gets destroyed. For my point of view this a really elegant solution.

I, personally, could imagine that a future Session Manager has the ability to get custom initialization and close routines attached to a custom session. I don’t know how this should work exactly, but it should work with LabView. (Maybe build the LabView functions into a DLL, which get called by Session Manager.)

Also, because NI-CAN is a NI product, I hope that a future Session Manager will directly support NI-CAN objects.


Regards
Herbert
0 Kudos
Message 3 of 3
(3,172 Views)