08-31-2015 01:59 AM
1. I have a Custom Data Type called ConfigurePokaYoke.
2. I have a Step Type called Step_PokaYoke (It is a customized Sequence Call step). This has a field of my previous Custom Data Type.
3. When I insert a step of this type in my sequence I am able to open a window to modify its step variables (configure the step). I pass these variables as parameters when the Sequence Call load the other .seq file.
4. I know that if I want to put this step to run in a new thread I need to:
Right-click in my step, then select Specify Module, then select Module tab, then click the Execution Options listbox, then click in Use New Thread.
I know how to do that.
---
Sorry for the long previous 4 points. I just wanted to explain my process.
Here comes my question.
Is there a way to connect my step variable iRunInNewThread with how that particular step is going to run?
Example 1:
In my configuration window I put my Run in new Thread switch in NO, therefore my step variable iRunInNewThread is 0, therefore my step do NOT Use a new threat.
Example 2:
In my configuration window I put my Run in new Thread switch in YES, therefore my step variable iRunInNewThread is 1, therefore my step USE a new threat.
Thanks in advance!
Solved! Go to Solution.
08-31-2015 03:33 AM
Hi,
This is possible.
You have derived your Type from Sequence Call so it will only work on SequenceCalls!
So your Adaptermodule is from type SequenceCall. - This is important to know!
All you need is using your SequnceContext and get your Adaptermodule.
1. SequenceContext .Step
2. Step.Module as SequenceCallModule
3. Depending on iRunInNewThread SequenceCallModule.MultithreadingAndRemoteExecOption = 0 or 1 (just see Help for constants)
Thats all
Regards
Juergen
08-31-2015 09:53 AM
Hello j_dodek, thanks for the answer.
Yes, my customized SequenceCall (Step_PokaYoke) step is derived from the original SequenceCall step.
After reading your comment:
All you need is using your SequnceContext and get your Adaptermodule. 1. SequenceContext .Step 2. Step.Module as SequenceCallModule 3. Depending on iRunInNewThread SequenceCallModule.MultithreadingAndRemoteExecOption = 0 or 1 (just see Help for constants) Thats all
3. I now see the key property for my problem is the SequenceCallModule.MultithreadingAndRemoteExecOption.
But for the steps 1 and 2, I don't know where can I write that lines of code in TestStand, or where do I have to stablish those properties, where can I place the "SequenceCallModule.MultithreadingAndRemoteExecOption = 0 or 1".
08-31-2015 10:54 AM
08-31-2015 11:52 AM - edited 08-31-2015 11:54 AM
Yes, the iRunInNewThread variable is the one related to my switch control.
Are you saying I need to write that code in my CVI DLL? I mean, in the DLL where I send the window data to TestStand, in there I need to modify the property .MultithreadingAndRemoteExecOption?
08-31-2015 03:28 PM
Exactly,
just as one more hint. You can do your parametrization of your sequnce here as well, too.
I have done serveral custom steptypes in in this way. Very effective!
another thing you might think about is that it will work in both ways in your UI and in the UI-sequence module adapter.
That means there is no need for your variable iRunInNewThread because it is represented by SequeceModule Property MultithreadindAndRemoteExecOption so just link your switch to this
property.
Regards
Juergen
08-31-2015 04:10 PM
Good to know that, j_dodek.
I though I was able to modify the step property MultithreadingAndRemoteExecOption in the TestStand enviroment. Now I am going to try to learn how to do it from my DLL in CVI.
09-01-2015 10:04 AM
If you coud share one of your file examples j_dodek, of how to do something similar, It would be great.
Yesterday I tried to do it all afternoon, but I did not success.
09-02-2015 09:26 AM
Hi,
i am afraid that it is not possible to publicate one of my step types. They are not my property and they are not focusing your problem at all.
But i am able to do a small demo example in my leisure time.
I do not use CVI. I will do it in VS2010 C++. You will see the calls to TS are almost the same.
Which version of TS are you using?
Just give me some more time.
Juergen
09-02-2015 12:00 PM
Hi, I am using TestStand Engine Version 2014 SP1 32-bit. Sequence Editor Version 14.0.1.103.
And thanks, It would be really helpful for me.