NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to parse the (stdout) result from a 'call executable' test step

Solved!
Go to solution

It is simple to assign stdout to a single variable in TS...

But I would like for my executable (python script) to print to stdout an array of data and I want to populate/update several variables in my teststand sequence.

Is there a way to do this?

I don't really think it is possible with the expression browser? Perhaps it is?

0 Kudos
Message 1 of 5
(3,759 Views)
Solution
Accepted by topic author SetecTestDept

SetecTestDept,

 

I found another forum post where someone had a similar question: https://forums.ni.com/t5/NI-TestStand/How-can-I-automate-a-simple-exe-using-the-step-call-executable...

 

Sounds like compiling the executable into a dll may be easier to implement - check out the final comment for an explanation of it.

 

However, if you are able to get the output into stdout, you may be able to do parse it out in the post-expression, although you may still have the same issue. It may be easier to parse this by passing it to a LabVIEW VI.

0 Kudos
Message 2 of 5
(3,734 Views)

Also this: http://www.ni.com/tutorial/8847/en/

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 5
(3,726 Views)

Yes I think that this is the best solution...

I can use all string manipulation functions and regular expression to extract the values I want...

0 Kudos
Message 4 of 5
(3,691 Views)

We also just announced a beta release of our upcoming Python Step Types for TestStand that will allow you to call into Python scripts without having to go through the call executable step and do string parsing. You can read more about the features in our announcement post here:

https://forums.ni.com/t5/NI-TestStand/Announcing-the-Python-Step-Types-for-TestStand-Beta-Program/td...

 

We'd love to get your feedback on the step types! You can sign up for the beta now at ni.com/beta. We'll be releasing the beta software next week.

 

Best,

Kevin F.

Product Support Engineer | Automated Test Software

National Instruments

0 Kudos
Message 5 of 5
(3,675 Views)