NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

save Parameter from Sequence File

Hi guys,

 

 

is there any possibility to save file when the value from parameters on the mainsequence have been modified?

I know the method to save StatioGlobals thanks to CommitGlobalsToDisk, but in the case of Parameters of the Mainsequence of the sequence File I didn't find solution to save data modified from the execution to the current sequence file...

 

 

any idea ?

 


thanks

Pierre

0 Kudos
Message 1 of 7
(3,599 Views)

Hi pfhrenry21,

 

You could use the propertyObjectFile method as "PropertyObjectFile.IsModified", "PropertyObjectFile.IsModifiedByUser" and "PropertyObjectFile.SaveFileIfModified".

 

How are performed the changes to the parameters?

 

Best regards,

 

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

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

RunState.SequenceFile.AsPropertyObjectFile().IncChangeCount(),
RunState.SequenceFile.Save("")

CTA, CLA, MTFBWY
Message 3 of 7
(3,564 Views)

During the execution, Values from Parameters of the mainsequence are modified by sub sequence.

At the end of the execution I just want to save the new values from parameters of the main sequence but seems there's a difference between the sequence file and the current execution.

I tried already propertyObjectFile without success, I will try again.

0 Kudos
Message 4 of 7
(3,542 Views)

it doesn't work snowpunter,

 

I put a breakpoint just before the execution of this code,

In my execution the variables from parameters are changed and after the execution the sequence file still contain old values.

0 Kudos
Message 5 of 7
(3,539 Views)

When TestStand executes a sequence, it makes a copy of the entire sequence and uses the copied sequence, including the copied locals, for the execution. Making a copy of the sequence means that if you run the sequence in parallel, there will not be any conflicts between accessing the same local variable in the same memory location. Therefore, when you edit a local variable you are only editing a copy of the original local variable from the original sequence.

To reflect your changes in the original sequence, you need to access the original local variable rather than the copy made for the current sequence execution. You can do this by using the "SetVal..." methods, including SetValBoolean, SetValIDispatch, SetValInterface, SetValNumber, SetValString, and SetValVariant depending on your local variable's data type. When you specify the lookup string, instead of using Locals.myVariable which would change the copied version of the local, use the following lookup string:

RunState.SequenceFile.Data.Seq["MainSequence"].Locals.myVariable.

 

regards

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

Message 6 of 7
(3,527 Views)

thanks a lot, I succeeded to save the data from the execution to the file with your help !

0 Kudos
Message 7 of 7
(3,492 Views)