NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does this Conditional expression not evaluate?

Hello there,

I'm having some trouble with this conditional expression! I'd like the filename to be generated dependant on the model entry point i.e. Test UUT or Single Pass. Test UUT works as expected, Single Pass always returns the following:

<filename>_.txt

instead of

<filename>_[NO_UUT_SERIAL_NUM].txt

Here's the expression I use to build the full path name:

Locals.FullReportFileName  = PropertyExists( "RunState.Root.Locals.UUT.SerialNumber")  ? (Locals.ReportPath + Locals.ReportFileName + "_" + RunState.Root.Locals.UUT.SerialNumber + ".txt" )  : (Locals.ReportPath + Locals.ReportFileName + "_[NO_UUT_SERIAL_NUM]" + ".txt" )

Also, see attached seq.

Yeap, a real basic question.... what am I missing?

Regards,
Chroma
0 Kudos
Message 1 of 8
(4,154 Views)
Whoops....

LabVIEW 7.1.1
TestStand 3.5
XP SP2
0 Kudos
Message 2 of 8
(4,148 Views)
Hi,
 
Try changing the expression for a StrComp() as follows:
 
StrComp(Locals.FullReportFileName  = PropertyExists( "RunState.Root.Locals.UUT.SerialNumber")  , "") != 0
 
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 3 of 8
(4,133 Views)
Ray,

Thanks for your prompt reply - I though the board would be dead, what with NI Week so near!

Hmmm, I implemented what you suggested but it yields the same result. I'm surprised it returns the "-" character at all.

Any suggestions?

-Chroma
0 Kudos
Message 4 of 8
(4,133 Views)

Hi,

Ignore what I original responded with must have had brain fade.

Try

Locals.FullReportFileName  = ( PropertyExists( "RunState.Root.Locals.UUT.SerialNumber")  ? (Locals.ReportPath + Locals.ReportFileName + "_" + RunState.Root.Locals.UUT.SerialNumber + ".txt" )  : (Locals.ReportPath + Locals.ReportFileName + "_[NO_UUT_SERIAL_NUM]" + ".txt" ) )

That should do it, as it works for me in TS2.01

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 5 of 8
(4,117 Views)
Ray,

Thanks for the update - yes, we all suffer from brain fade... it's just how often is the problem!

Hmmm, still no joy. I also tried this expression with brackets to no avail.

I'm using TS Engine 3.5.0.725, TS Sequence Editor 3.5.0.725

Using Test UUT yields SimpleReport_1234.txt, using Single Pass yields SimpleReport_.txt

I wonder if the expression parser has got trapped somewhere.... as it seems to be evaulating the first two components of the true case then halting......

-Chroma

0 Kudos
Message 6 of 8
(4,108 Views)

Hi,

Sorry about that but another brain fade, the reason why is because with both Test UUTs and Single Pass RunState.Root.Locals.UUT.SerialNumber still exists.

Test UUTs will have a serial number and Single Pass  will be empty. If you run with out the Process Model then it doesn't exists.

I attached an WORKing example. (got they in the end Smiley Very Happy)

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 8
(4,095 Views)
Ah.... makes sense! Thanks for your trouble. Works fine in TS 3.5.

Best regards,
Chroma
0 Kudos
Message 8 of 8
(4,090 Views)