NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

modify a variable of another sequence during execution

Hello

I've got a sequence which should change the value of a variable during execution. This variable is in a step which is located in another sequence that the one that is running.

When I use the API (GetSequence ang GetStep ..), it change the value of the variable in the sequencefile, but not in the execution.

 

For example, if I want to change many times the value of the variable. It doesn't work.

 

Does Anybody has a solution or a hint ?

 

Thanks

Laurent

0 Kudos
Message 1 of 5
(3,514 Views)

Is the sequence in a different sequence file?  What kind of variable is it?  File Global?  Local? Station Global?  Etc...

 

GetSequence shouldn't edit the edit time copy.  However GetSequenceFile does change the edit time copy.

 

Usually when sharing variables across sequences it is wise to either pass them around using parameters OR to use FileGlobals.

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

No, the sequence is in the same sequenceFile.

 

Let me give you more details.

 

Sequence1 :

Step1 : ...

Step2 : call to sequence2

 

Sequence2:

Step1 :

|____ Variable1

 

I want that the step1 of Sequence1 change the value of variable1. Unfortunately, step1 and sequence2 have step type that I can't change. Moreover, Sequence2 has no parameter

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

What is Variabl1?  Is it a Local?  Is it a FileGlobal?  Is it a subproperty of the step?  If so which step type and which subproperty?

 

My recommendation is to use a FileGlobal in this scenario since you claim that you cannot add a parameter.

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

Hi there,

 

maybe I don't fully understand, what you are trying to achieve, but since you only want to modify the value of the variable, why don't you introduce a parameter in your sequence call? A little old-fashioned and not as fancy as using the API, but maybe simpler Smiley Wink

 

Regards

Oli

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