NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Testsand globals from a CVI DLL through Automation. Cannot pass sequence context through a sequence step in the sequence file.

I have a DLL that needs to do some stuff for which it needs sequence context from the teststand. The condition however is that I don’t want a sequence step in teststand passing the sequence context, I would rather want to use TS3.0 automation server to arrive at the sequnece context.

 

Please assist. Let me know if I need to be more specific in my question. I haven't used this aspect of TS much, so I am not sure if I am making myself clear in this question.

 

Regards

Sumit

 

0 Kudos
Message 1 of 4
(3,374 Views)
Hi,
 
Have you looked at the TestStand Using Labwindows/CVI with TestStand manual Appendix B.
 
This should help you.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,361 Views)
Thanks Ray!
Every example there has a seqContextCVI passed to the function.
Finally I am trying something which I have pasted below. The only thing I wasnt sure was if the TS_NewEngine would give me a new instance of Teststand. How do I make sure that if there are multiple instances of TestStand running, I  have the engine give me a handle to the correct instance?
Which brings me to another doubt that I have ; can you actually run multiple instances of teststand - I just tried that and could n't open teststand multpile times. If I can't, then may be I wouldnt have to bother about the correct instance 🙂
 
************************************************
status = TS_NewEngine ("", &EngineHandle); 
    
 //Get the globals from the engine
 tsErrChkMsgPopup (TS_EngineGetGlobals (EngineHandle, &errorInfo, &myGlobals));  
    
 //Store the last user name into a local string
 tsErrChkMsgPopup (TS_PropertyGetValString(myGlobals, &errorInfo, "TS.LastUserName", 0, &p));
************************************************
 
Regards
Sumit
 
0 Kudos
Message 3 of 4
(3,360 Views)
Since you'd be wanting to grab the engine that is already running, you would not be able to use that example, as it does in fact create a new instance of the engine. What you would need to do is pass the reference to the engine (located in RunState.Engine) and you can access the sequence context from that. That would be the way to do it through Automation Server.


Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 4 of 4
(3,347 Views)