NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Sequence (XML format presaved) to my CUSTOM format?

Solved!
Go to solution

Hi Experts!

 

I need Teststand Style Sheet for  XML. (e.g. TAGS explanation when you saved your sequence in XML's format)

 For example when I saved TestStand's sequence at XML format previously I got: _____________________________________________________________ Main classname='Objs' valueflags='4194304'><value lbound='[0]' ubound='[]'/></Main><Setup classname='Objs' valueflags='4194304'><value lbound='[0]' ubound='[]'/></Setup><Cleanup classname='Objs' valueflags='4194304'><value lbound='[0]' ubound='[]'/></Cleanup><GotoCleanupOnFail classname='Bool' valueflags='4194312'><value>false</value></GotoCleanupOnFail><RecordResults classname='Bool' valueflags='4194312'><value>true</value></RecordResults> _____________________________________________________________ I would like to know what EVERY of tags (<value>,<Main>,<GotoCleanupOnFail> ….and many others) means??? e.g. you can say that <value> is a tag that responsible for the LOOP value.   

I need to deal with tags because I want from the present XML saved sequence to build my custom sequence in my CUSTOM format (e.g. TO CONVERT TestStand’s sequence to other format)

Any ideas? any suggestions?

Thank you!!!

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 1 of 8
(5,623 Views)

TestStand does not support saving sequence files in other formats than the predefined formats (ini, binary and xml). So you have two different choices:

a) Write a tool which converts one of the sequence file types into your custom format. This enables you to export the sequence to custom tools, but needs quite some work.

b) Use "Sequence File Translator".  You can find info on this in the TestStand Reference Manual in chapter 15.

 

Regarding b) i want to tell you some more things here in this post:

- You can use it only to important any format into TestStand, not the other way round. So this is designed for customers who create sequences outside of TestStand but want to use it in TestStand for execution.

- It requires the knowledge of the file layout you want to convert. You have write an DLL as described in the manual.

- Changes done to the sequence within TestStand will never be saved back into the original file. You can save the sequence in a new TestStand sequence file though.....

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 8
(5,619 Views)

Thank you, but i need exactly the VICE version of it.

I looked on it and it converts my CUSTOM sequence to TestStand's sequence, but i need

the conversion from TestStand's sequence (XML presaved) to my CUSTOM format.

 

That's why i need to know every tag from the tags of that saved TestStand's sequency in the XML based form.

 

In other words I want to do MAPPING from every TestSand's sequence (that i saved in a XML's form) to every my custom tag/function/API

in the my CUSTOM design of sequence/file.

 

Any ideas?

 

Thank you, Yuri

 

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 3 of 8
(5,607 Views)
Instead of parsing the TestStand XML, use the TestStand API to examine the TestStand sequence when converting it to your format. Unlike the XML format, the API is fully documented and not subject to change.
Message 4 of 8
(5,602 Views)

James, sounds great!

 

Could you please give an example from some tiny sequence (single step) how i can use the TestStand API for it?

 

Thank you a lot!

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 5 of 8
(5,598 Views)
Solution
Accepted by Yuri_IL

I'm not familiar with what examples are available online, so I'll let someone else address that.

 

However, the basic idea is:

 

- Load your file (Engine.GetSequenceFileEx)

- Get all the file properties you care about and translate them to your format (including file globals)

- Iterate through the sequences (SequenceFile.NumSequences, SequenceFile.GetSequence)

- Get all the sequence properties you care about and translate them (including locals and parameters)

- Iterate through the steps (Sequence.GetNumSteps, Sequence.GetStep)

- Get all the TestStand step properties you care about and translate them

- Step Types can define additional custom properties for steps. For example, NumericLimitTest steps have Limit.Low and Limit.High properties. Use the PropertyObject class to get the custom properties you care about and translate them (example: step.AsPropertyObject().GetValNumber("Limit.Low", PropOption_NoOptions).

 

 

Message 6 of 8
(5,593 Views)

I got the idea.

Thank you a lot, this is really seems to be that i will do!

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 7 of 8
(5,591 Views)

James, it really works!

Many thanks to you!!!!

Thank you & Best Regards

*I use LabVIEW 2018 & TestStand 2021 versions
0 Kudos
Message 8 of 8
(5,554 Views)