NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

GetCommand does not return my configuration entry points?

Solved!
Go to solution

If I'm in a client sequence file and I want to dynamically execute my own configuration entry point in the process model what is the best way to accomplish that?

 

I am trying to get the application manager through an activex step using Engine.GetInternalOption(InternalOption_ApplicationmManager) and then I choose the GetCommand method with CommandKind_ConfigurationEntryPoints_Set.  It will only use an index for one of the 3 default configuration entry points (Report Options, Model Options or Database Options).  It throws an index out of range if I try to get my own.  This is from James Grey's post here: http://forums.ni.com/t5/NI-TestStand/Calling-a-Configuration-Entry-Point-from-a-C-code-module/td-p/1... (I'm not in .NET though.  I just want to use activex steps in TS).  The 3 default ones work perfectly.  It's only when I try my own that I've added.

 

Any thoughts?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 1 of 6
(3,496 Views)

You might want to just use a "New Execution" sequence call instead. I think that would be a lot simpler.

 

Another possibility is to use the Engine.NewExecution API instead, which would also probably be simpler than using the ApplicationMgr for this use case.

 

-Doug

0 Kudos
Message 2 of 6
(3,479 Views)

I can call it directly as well but it doesn't exhibit the behavior I want.

 

Basically we have a process model with a Configuration Entry point called About Test.  This calls a sub sequence which has 2 steps in it. The first step is a callback and the second is a VI call.  The VI displays a splash screen with our company logo, disclosure and the text (usually a software part number) returned by the callback.

 

What I want to do is put the SequenceFileLoad callback in our clients and have a step in there that will invoke the About Test entry point upon sequence load.

 

The series would look like this:

SequenceFileLoad(client)>>About Test Configuration Entry Point(model)>>SubSequence(model)>>About Test Model Callback (client)>>VI Splash Screen(model)

 

All of this would be a lot easier with a (ProcessModelFileLoad): http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/ProcessModelFileLoad-Engine-Callback/idi-p/225016...

 

So back to my point about it not working correctly.  It doesn't seem to be invoking the model callback when I use New Execution or call the sequence directly.

 

Also, what is the explanation for my config entry points not showing up at all in the list?  it seems that function should grab all config entry points in the model..... 

 

Thanks a bunch,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 6
(3,454 Views)
Solution
Accepted by topic author ~jiggawax~
When you use new execution are you doing a process model execution or a direct call to the sequence? If you do a process model execution with a client sequence file and model specified, it should be calling callbacks. I'm not sure why the app manager case you are trying isn't working. Perhaps someone else can help with that. I just wanted to suggest the new execution approach since it seems simpler.
Message 4 of 6
(3,439 Views)
Just want to add that the app manager is ultimately using new execution underneath so it should be possible to get the behavior you want without the app manager if it's possible to get it with it. Unless you need some of the added functionality of the app manager, it's likely simpler to just call the teststand API directly or use a sequence call to a process model entry point (I.e. specify both a client and process model sequence file)

-Doug
0 Kudos
Message 5 of 6
(3,438 Views)

I finally got it to work. I had to use Do not Wait for the Wait for Execution to Complete.  Otherwise it would lock up.

 

I also used Close Window when Done because it would leave the execution window open.

 

I have abandoned my App Mgr ways.... 🙂

 

Thanks for the help Doug!

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 6
(3,434 Views)