NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save content of local variables?

Hello,

what do i have to do that the content of the local variables (which are changing while a sequence is running) are still available after the testplan has finished?

Is there something like a commit to disk statement that can be inserted after changing a local?

Thanks

BR

0 Kudos
Message 1 of 7
(2,939 Views)

You could instead use a station global, which do persist.  I would instead just save the value to a configuration file.

Message 2 of 7
(2,897 Views)

t want to save to StationGlobal as this makes it not easy to send seqeunces to customers.

Meanwhile i found the solution how to save locals to the file by using the statement: RunState.SequenceFile.Data.Seq["MainSequence"].Locals.myVariable.

 

Besides this:

How can i save/read a value from a configuration file with only teststand-tools and no extra Dll/sw?

 

Thanks

BR

0 Kudos
Message 3 of 7
(2,821 Views)

@OnlyOne wrote:

How can i save/read a value from a configuration file with only teststand-tools and no extra Dll/sw?


Use a Property Loader step.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,815 Views)

As Crossrulz said, loading can be done via the property loader.  Saving new values would require special software for creating those files.

0 Kudos
Message 5 of 7
(2,813 Views)

Hi,

I found the solution posted by ~jiggawax~ in this thread: https://forums.ni.com/t5/NI-TestStand/How-to-read-a-textfile-in-TestStand/m-p/774125

It is working without any extra sw and without the property loader.

Thanks

 

0 Kudos
Message 6 of 7
(2,785 Views)

You can set the property of Local Variable by right clicking it - Go to Advanced - Edit Flags and set its property to 0x40000 (shared at runtime). It will retain its value after the test sequence is completed

0 Kudos
Message 7 of 7
(2,607 Views)