NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

step pre/post condition not being recognized

I've attached a number of PNGs (contained in one zip file) in hopes of providing enough insight into our problem.  I have two File Globals that I created to keep track of whether our power meter and VectorNetworkAnalyzer have been calibrated.  I perform the calibration in the Setup group of the RF Test subsequence.  I then use the FileGlobal values as preconditions to allowing some tests (in the MainSequence of the RF Test Main Sequence) to run.  In the sequence file, I've made the step (VNA Gain Cal) a multiNumeric step since I needed to pass back two items of interest (1) whether the calibration was successful, (2) whether the user chose to bypass the calibration. 
 
In the GainCal.vi, I convert the boolean version of these determinations into numerics, and stuff them into array position 0 and 1 of the Cal Results array.  At TestStand, I try to extract the numeric values and set the FileGlobals appropriately.
 
What's bizarre is that (in the VI) the SuccessfulCal is True, the Cal bypassed is false, CalResults[0] =1, and CalResults[1] = 0, as expected, yet my Expression doesn't seem to change the state of my File Globals .  I setup a watch on the VNA Calibrated, and triggered it to stop if changed, but it doesn't.  I think in the PNG I sent, the VNACalibrated variable is set to True.  This is because I changed it to allow the precondition to pass, so I could continue testing.  However, it's normally False.
 
I'm only usiing (or trying to use) the value of Step.NumericArray[0] as the basis for pass/fail of the test.  I think I'm setting that up correctly.  Anyway, is this a scope issue (again) where FileGlobals are only visible in the Group in which they're set?  Any suggestions would be appreciated.
0 Kudos
Message 1 of 4
(3,366 Views)

Hi,

Is the Step that obtains the FileGlobals data in the same SequenceFile as the step that uses the FileGlobals in the precondition?

regards

Ray Farmer 

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,348 Views)
I may not have captured enough in my screen shot, but hopefully the PNG (attached) shows that in the Setup, the step entitled "VNA Gain CAL" (in his Post Expression) sets the File Global in question.  In the bitmap it shows the VNA Gain CAL being skipped, but that's just for debugging (since it fails).  Then, the RF Gain test (in Main), uses the Precondition set (in theory) in the Setup.
0 Kudos
Message 3 of 4
(3,345 Views)
Hello,
 
I don't think that this is a scope issue. I setup a simple example that set a boolean FileGlobal in the Setup part of my sequence and then used it as a precondition for another step in Main.  This seemed to work fine. You might try to step through the sequence, with breakpoints on and after the step in question (VAN Gain CAL) and see if its changing the FileGlobals.  If you look at the Variable pane in the Execution window it will show you the current value of your variables, including the FileGlobals so that should let you check the value to see if it was set at this point.  I have attached my test example that works, but this may not be an exact representation of your sequence but might provide a reference.  If you still are having a problem feel free to post a copy of your sequence and I will be more than happy to take a look.
John B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,288 Views)