NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Skipping TestSockets in Batch model process.

Hi Kevmi2ca,
 
A few things I noted while traveling down a path similar to yours.
 
1. When I tried disabling the sockets too early in the batch model it didn't work. In your case, maybe the disable flag is being overwritten sometime after the "Get Model Options" location.
 
2. Tried to modify the "Initialize TestSocket" sequence but caused a number of unwanted effects.
 
3. I also tried to disable sockets and the standard serial number popup dialog by modifying the "Run Batch Info Dialog" called by the "Start Batch Info Dialog" step. I caused the model to run in an endless loop when I disabled the "Run Dialog" step and added a socket disable statement.
 
4. Based on some info I found here, I tried using the PreBatch callback. From the batch model FileGlobals, I pass a boolean array called SlotActiveArray (True = Slot is active) to the PreBatch callback through parameters. I set up a PreBatch callback in my client sequence and use a statement with a fixed loop to set the disable.
Parameters.ModelData.TestSockets[Locals.LocalCounter].Disabled != Parameters.SlotActiveArray[Locals.LocalCounter]
 
Note: I found that if I disable all slots then the software goes into an endless loop during execution. So I added some steps to my PreBatch callback to check Parameters.ModelData.TestSockets.Disabled to make sure they are not all disabled. If they are, I terminate the sequence with a message to the operator.
Don't know if this is useful as I am relatively new to modifying process models but the callbacks seem to be pretty powerful. I modified my project to include a single top-level client sequence that calls all of the other test sequences just to let me take advantage of the callbacks.
 
Good Luck,
Steve S.
0 Kudos
Message 11 of 14
(1,297 Views)

BTW,

I'm doing all of this using an f(x) statement and not a callback. Does it matter? Maybe this is why they're still running in the background...

0 Kudos
Message 12 of 14
(1,290 Views)
Hi Kevmi2ca,

Yes, overriding the PreBatch callback matters. If you don't, the steps in the
PreBatch sequence in the process model will execute. These steps open the batch UUT dialog, which sets the enabled/disabled sockets. You can still use your expression statement, but it should done in your overridden PreBatch sequence.

Regards,
0 Kudos
Message 13 of 14
(1,258 Views)

Hi Kevmi2ca,

Big difference. As I understand it, a callback is not the same as a regular step, the callback is a subsequence you use in your client test sequence that allows you to modify certain aspects of the process model behaviour. FYI, I'm using an f(x) statement in a callback. If you haven't already, check out the TestStand Reference Manual section on callbacks. There are also a few examples in National Instruments/TestStand x.x/Examples.

Steve S.

0 Kudos
Message 14 of 14
(1,257 Views)