08-04-2016 09:15 AM
Hello Community,
Using Teststand 2014 32bit
I am doing a Batch Model Test and I want to edit the NumTestSockets in the ModelOptions Sequence when the sequence file is loaded. I created a fileglobals variable and set the default value to 1. I tried editing the fileglobals variable in the sequence SequenceFileLoad, but it does not show my fileglobals variable as updated and remains as 1 when I run my sequencefile.
How can I go about altering a fileglobal variable when I load my sequence file and have it stick, so when I run my sequence file the NumTestSockets is updated?
Solved! Go to Solution.
08-04-2016 09:22 AM
Hi,
I'm just wondering, is the ModelOptions sequence a sequence file callback in the client sequence?
(If it's in the process model then the FileGlobal in the client sequence won't be visible...)
Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)
Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor
08-04-2016 09:41 AM
Charlie,
The ModelOptions sequence is a sequence file callback and is a Model Callback Type.
Is there another way to go about changing the NumTestSockets parameter one time? I don't want the user to be prompted with a message everytime the sequence file runs asking how many controls in the batch are being tested. Was hoping for the user to specify it once at load time and not have to change it, unless the user reloads the sequence file again. I can probably do it from the GUI, but was hoping it could be done in the sequence file.
08-04-2016 10:42 AM - edited 08-04-2016 10:45 AM
FileGlobal variable values do not persist across executions. That is why your "NumberOfControls" variable is reset to its default value of 1 after the SequenceFileLoad callback is done executing. A Station Global Variable would persist since its saved to disk in StationGloabls.ini, but it would be available to the entire station rather than just your client sequence file.
Perhaps a better way would be to set the default value in your SequenceFileLoad callback:
RunState.SequenceFile.Data.FileGlobalDefaults.NumberOfControls = 3
Hope this helps,
Trent