NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Different number of testsockets - How to change with expression?

Solved!
Go to solution

Hello,

i have two sequence files which are using two models. The models are set in:

Edit -> SequenceFileProperties -> Advanced

 

Now i need to run the first sequence with only 1 socket and the other sequence with 2 sockets.

But it seems that Configure + ModelOptions is a global setting which is valid for all models.

 

Question is:

How can i do it that model1 is always executing with one socket and the other model with two sockets?

 

Can i add here simply a step into the SequenceFileLoad of the model(s)?

If yes - what is the expression to change the sockets?

 

Thanks

0 Kudos
Message 1 of 11
(1,197 Views)

You can specify Sequence File specific Model options by overriding the ModelOptions callback and set the value of ModelOptions.NumTestSockets

 

santo_13_0-1633614129613.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 11
(1,195 Views)
Solution
Accepted by OnlyOne

Thanks.

How can i do this change directly in the model sequence?

So the one model should ALWAYS run with one socket and the other model always with two sockets

 

Currently in the model the Parameters in "ModelOptions" displays NumTestSockets = 4

 

Thanks

0 Kudos
Message 3 of 11
(1,190 Views)

Could you share how you made it?

0 Kudos
Message 4 of 11
(201 Views)

Not solved yet.
Still changing it manually each time the model changes.

0 Kudos
Message 5 of 11
(189 Views)

santo_13 has described how to do it using the client sequence file.

If you feel confident enough to modify the process model, this should have given you a hint on how to achieve this in the model file directly.

0 Kudos
Message 6 of 11
(185 Views)

The example of santo_13 is not working.

When i add this Callback to a sequence with NumTestSockets = 4 then it still executes only 1 socket as it is defined in the menu -> Configure -> ModelOptions -> Number of Test Sockets

0 Kudos
Message 7 of 11
(172 Views)

I confirmed that it does work:

  • Set Model to batch
  • Change Model Options to 1 Socket in Configure > ModelOptions > Number of Test Sockets
  • Add ModelOptions callback to the client sequence
  • Edit the ModelOptions sequence and add a single Statement Step
  • In the Statement step, set expression to "Parameters.ModelOptions.NumTestSockets = 3"
  • Run sequence and see that 3 socket executions are started and prompt shows 3 sockets

 

Message 8 of 11
(164 Views)

@ee-jallen wrote:

I confirmed that it does work:

  • Set Model to batch
  • Change Model Options to 1 Socket in Configure > ModelOptions > Number of Test Sockets
  • Add ModelOptions callback to the client sequence
  • Edit the ModelOptions sequence and add a single Statement Step
  • In the Statement step, set expression to "Parameters.ModelOptions.NumTestSockets = 3"
  • Run sequence and see that 3 socket executions are started and prompt shows 3 sockets

 


Same here.... maybe I should've read this thread first before firing up TestStand 😉

BTW: this exact procedure is used in an excercise in the Developing Test Programs using TestStand 

 

 

0 Kudos
Message 9 of 11
(149 Views)

Works here also. I  didnt set the extra statement at the first try as the variable "Parameters.ModelOptions.NumTestSockets" is already set to 4 after insterting the callback.


How can this be transfered direct into the modelsequence so that

Batchmodel_A.seq is set fixed to 1 socket and
Batchmodel_B.seq is set fixed to 5 sockets?

 

I dont want to add the callback to all test-sequence-files.

0 Kudos
Message 10 of 11
(142 Views)