NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand CallTclScript

Hi Guys,
What can I do to make a Test Step "CallTclScript" become a TestStep PASS/FAIL? My Tcl script executes a lot of commands in serial and ethernet ports to test my UUT and get the test result. I'm using a variable, "varResult", to send the result (pass/fail) from tcl to TestStand. I would like use only one script to set my UUT and get the results (because is more easy send comands in Tcl than in LabView), so this TestStep should be a Test PASS/FAIL.

I was using a LabView Test PASS/FAIL which executes my Tcl script. But send the variables is more difficult than in a Step CallTclScript.

I was thinking about set the variable "RunState.Sequence.Main["CallTCLScript"].Result.Error.Occurred" in Post Expressions with the value of my "varResult", bu
ts it doesn't work. Inside my script can I only get and set "Input[n]" and "Output[n]" variables or can I set, for example "RunState.Sequence.Main["CallTCLScript"].Result.Error.Occurred"?

And about use a Step CallTclScrip and a Test PASS/FAIL (None Adapter) within a Subsequence Test PASS/FAIL (Sequence Adapter)?

What do you suggest to me?
What is the best solution?

Thanks in Advanced!

Marcio Cardoso

NI Software : TestStand version 2.0
0 Kudos
Message 1 of 4
(3,557 Views)
Hi ,
I have no idea about this script,but i think if you can
generate DLL and use the FlexDLL adapter,you problem's solved and you can force your "varResult" to be passed from your DLL.
I hope this can help you,success..
Mehdi Kadiri.
0 Kudos
Message 2 of 4
(3,557 Views)
Thanks Mehdi!
Now I have a fast solution to transform a CallTCLScript Step in a PASS/FAIL STEP, it is simple:

>Properties>Expressions>Status Expression
Step.OutputParams[0].StrValue ? "Passed" : "Failed"
0 Kudos
Message 3 of 4
(3,557 Views)
Now I have a fast solution to transform a CallTCLScript Step in a PASS/FAIL STEP, it is simple:

In the Step->
>Properties>Expressions>Status Expression, put this expression:
Step.OutputParams[0].StrValue ? "Passed" : "Failed"

the tcl script should set the variable OutputParams[0] as "True" or "False", if the UUT test have passed or failed.
0 Kudos
Message 4 of 4
(3,557 Views)