NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Process Model file global from client sequence

Hi all,

As I set in the message subject, I would like to change (increment a number in fact) a fileglobal of my process model from a client sequence.

I found help in this forum to change the client globals from the process model, but what I want to do is the opposite.

 

Thanks in advance for your help.

 

Micaël.

Cordialement,


Micaël DA SILVA
0 Kudos
Message 1 of 4
(3,265 Views)

Hi,

 

The following link may help

 

http://forums.ni.com/ni/board/message?board.id=330&message.id=6240&query.id=43249#M6240

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,261 Views)

Thanks Ray,

 

The last post on the link says :

 

"In addition, you can also check whether you are in the process model by checking the state of
RunState.InProcessModel. If this is True you are in the process model."

 

I got the error "Unknown variable or property name 'RunState.InProcessModel'. "

 

I did not find information about this property. Is it available in teststand 4.1?

 

Micaël.

Cordialement,


Micaël DA SILVA
0 Kudos
Message 3 of 4
(3,256 Views)

You can also use RunState.Root.FileGlobals.myFileGlobal. RunState.Root. is the sequence context for the root sequence invocation. So even if you have nested execution entry points, RunState.Root always puts you at the highest level on the call stack, in the execution. This is like a short cut in the situation of a nested sub sequence, RunState.Caller.RunState.Caller.RunState.Caller.RunState.Caller.Fileglobals.x

 

If you initiate an execution on a sequence without using a Process Model entry point, Execute >> Run Main Sequence, the Root property object is the sequence context for the sequence you run. So you could check to see where you are in the call stack or etc.  to verify there is a process model there and you aren't getting fileglobals from your client seq.

 

cc

0 Kudos
Message 4 of 4
(3,229 Views)