NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

process setup

Hi users,
 
I'm designing a test system using the batch process model. My design utilises several COM servers that must be created before the testing process begins. The obvious place to create these servers (using the ActiveX adapter), is in the Process Setup callback.
 
Some of my servers reside in the process model's sequence file (their handles are in the process model sequence file globals). They are always kept private to this sequence, and are consistantly used with this process model.
 
The rest of my servers reside inside the client's sequence file (their handles are in the client sequence file globals), as these servers change with different products begin tested.
 
I wish to keep the handles from both groups of servers private from each other (i.e. I don't want someone using my process model to be able to reference the process model's servers directly from the client sequence file.
 
 
Now to my problem.....
If I override the process setup callback to allow the client's sequence file to use this step, the process model's process setup callback is obviously disabled. 
 
Is there a clean way I can enable both process setups at once (i.e. the process model has a process setup AND the client sequence also has a process setup)?
 
I've currently placed a dummy subroute call in my process model just before the process setup callback is called (this happens in the Test_UUTs setup tab). I've added my process model setup steps into this dummy subroute. However this is not very intuitive. I would prefer that both process setup calls were actioned one after the other.
 
Any ideas?  
0 Kudos
Message 1 of 7
(3,841 Views)
Hi,
 
[However this is not very intuitive. I would prefer that both process setup calls were actioned one after the other.]
 
Not sure what your mean by this. If you have a step before the Callback Process Setup sequence then its going to get called one after the other!
 
Regards
Ray Farmer
 
Regards
Ray Farmer
0 Kudos
Message 2 of 7
(3,833 Views)

Hi Ray,

Sorry, I worded the problem poorly. As you correctly state, the two process setups action one after the other with my current solution. My problem is really just one of elegance.

My process model setup routine call resides in the "setup" tab of the "TestUUTs" sub. I'm concerned someone working on my process model in the future (in case I'm not here), would have trouble finding these steps. Note that I call a sub called PROCESS_SETUP from the "TestUUTs" setup tab, so its not too confusing.

However, a far better solution would to enable the "process_setup" sub in both the process model AND and user sequence (the green subs).

I guess my question is .... can both "process_setup" subs be enabled together.

Regards Tom

0 Kudos
Message 3 of 7
(3,820 Views)
Hi bilby42,
 
You can have a callback copy it's existing information (steps and locals) by changing that sequences properties.  So when you are looking at all the sequences in your process model you will see the green ProcessSetup sequence.  Right click on it and select properties.  Choose the model tab and make sure the box labeled Copy Step and Locals when Creating an Overriding Sequence is checked.   This will make it so that whenever you override this sequence from you client sequence file all of your steps will get copied over.  You can pass the server handles as parameters to this sequence.  You would have to add parameters to the sequence and then just pass the server handles in as parameters in the sequence call step.  Parameters automatically get copied to the overriding sequence when you add it to your client sequence file. 
 
Regards,
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(3,805 Views)

Hi Sam,

Thanks for your reply. However this would negate my original intention.

The system I'm designing hides the process model server handles from the client sequence file. I don't want the client having access to these servers at all (they control my automated production line), which is why I want to create them only in the process model "process setup" sub.

To date, my original method is working fine (adding a process setup sub in the setup tab of "Test_UUTs". Its just not very elegant coding.

Regards Tom

0 Kudos
Message 5 of 7
(3,801 Views)
Hey bilby42,

There isn't a way to have both the code inside your Process Setup callback within the Process Model and the code inside your Process Setup callback from your client sequence both run.  The behavior is to override the callback which means it completely replaces that sequence.  What I would recommend to do is create new sequence within the Process Model called ProcessModelProcessSetup or something similar.  This new sequence would contain the code that you always want to run in the Process Model.  You could then move the Process Setup callback to the end of this sequence so all of your setup would be contained in a single sequence.  You could also leave it as two separate sequence call steps.  Either of these solutions would be just as good.

From your description, it sounds like you may have already implemented something like this.  Unfortunately this is really the only way to implement what I think you want to do.  If the code that is already in the process model should always be there, then it probably makes sense to put it in a regular sequence call anyway rather than a callback.  This will make sure that someone doesn't modify it unless they go into the process model and delete the steps or change them.  Hope this helps!


Pat P.
Software Engineer
National Instruments
0 Kudos
Message 6 of 7
(3,791 Views)

Hi Pat,

Thanks for the reply. I've pretty much decided to do as you describe. It gives my private server handles the security I desire, and seems to work ok.

Regards Tom

0 Kudos
Message 7 of 7
(3,779 Views)