NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing MainSequence parameters from other sequences

I perform some hardware setup/calibration in the setup group of the main sequence.  I then set the value of a parameter (PowerMeterCalibrated) based on whether the Power Meter successfully ran through calibration.  I then want to base whether I run a VI (in another subsequence) on this parameter being true.  How do I do this?  TestStand is complaining at runtime that it doesn't know this variable.  Is there a way to reference the parameter name such that it knows which sequence contains it (i.e. MainSequence.Parameters.PowerMeterCalibrated)?
0 Kudos
Message 1 of 6
(4,101 Views)

Hi,

[TestStand is complaining at runtime that it doesn't know this variable.  ]

Can you expand on this. What variable is teststand complaining about, what error message are you seeing.

I would think that the easies solution would be to have your variable defined in the StationGlobals.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(4,096 Views)

mrbean,

Is the sequence that you would like to have act on this information called as a subsequence of the main sequence?  Or is it called asynchronously?

If your sequence is called as a subsequence of the mainsequence, then the best way to have that information available will be to create a parameter in the subsequence you are calling.  You can then pass the information set in your setup step group into the subsequence. 

Of course, if you are doing any of this asynchronously, then this approach is not appropriate.  Using notifiers, fileglobals, or stationglobals will work.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 3 of 6
(4,091 Views)

I use StationGlobals and SequenceFileGlobals but as read-only.  I don't want the user modifying these files in any way.  That is why I went with parameters, since these just get used during runtime and return to their default state upon exit. 

[You can then pass the information set in your setup step group into the subsequence] - how exactly is this done.

Also, I wrote a utility (VI) that allows me to get/set parameter values.  I don't specify in which sequence the parameter resides, yet it seems to find the parameter.  I'm not sure what it would do, however, if I had two parameters (in different sequences) with the same name.

0 Kudos
Message 4 of 6
(4,078 Views)

I'm not sure (in this context) what you mean by "asynchronously"

" ...called as a subsequence of the main sequence?  Or is it called asynchronously?"

In most cases, I call subsequences of the mainsequence.  However, I'm trying to set a parameter while in the Setup group, and read it (from a VI) called in a subsequence of the MainSequence.

0 Kudos
Message 5 of 6
(4,041 Views)
Hello MrBean,

I was curious if you ever got your TestStand sequence working?  From reading this thread, it sounds like you want to pass a variable from your MainSequence into a subsequence that is called by MainSequence.  Is this correct?  If so, I think "Passing Parameters to a Subsequence in TestStand" would definitely help you out if you are still having trouble.
Best Regards,
Software Engineer
Jett R
0 Kudos
Message 6 of 6
(3,957 Views)