NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Access SequenceFile Globals in Process Model

I would like to add step to my Process Model.
Its purpose is to read the values of the Globals in the Sequence File that I am about to execute and verify that they are valid.
 
How do I read out those values? I don't see them in when I browse the Context during the execution of my process model.
0 Kudos
Message 1 of 7
(5,008 Views)

RunState.ProcessModelClient.Data.FileGlobalDefaults will give you the values in the file.

However, at runtime these values are copied. To access the runtime copies, use the ActiveX adapter to call:

Execution.GetFileGlobals(RunState.ProcessModelClient)

 

 

 

Message 2 of 7
(5,009 Views)


@James Grey wrote:

RunState.ProcessModelClient.Data.FileGlobalDefaults will give you the values in the file.

However, at runtime these values are copied. To access the runtime copies, use the ActiveX adapter to call:

Execution.GetFileGlobals(RunState.ProcessModelClient)


I'm interested in doing the same so I'm asking for some clarification. I created a VI which runs in a sequence called by the process model. I've attached an image. I'm new to TS but can work well with LV that's why I'm using LV for this.


The Global is called:LogFileDataContents. My question is what do I pass for "SequenceFilepath"? I was thinking to use: "RunState.ProcessModelClient".
I guess the real question is: is this the best way to pass data from the test sequence to the process model? What is the recommended method?

Message Edited by Test_Stand_Newbie on 01-18-2006 06:39 PM

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

Hi Test_Stand_Newbie ,

Why dont you just set the client sequencefile properties to use a common fileglobals. By default each sequencefile is set to use seperate fileglobals.

The Engine.GetSequenceFile wont work because you are opening a new reference to a sequencefile, when in fact when your sequencefile is executing, your process model is all ready loaded.

Where is this sequence, is in the processmodel sequencefile or the client sequencefile?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(4,970 Views)
That worked out great, thanks.
0 Kudos
Message 5 of 7
(4,964 Views)


Why dont you just set the client sequencefile properties to use a common fileglobals. By default each sequencefile is set to use seperate fileglobals.


My understanding is that this option just allows multiple executions of the same sequence file to share globals. This has nothing to do with making these globals visible to the processmodel.


The Engine.GetSequenceFile wont work because you are opening a new reference to a sequencefile, when in fact when your sequencefile is executing, your process model is all ready loaded.


Yes, after looking at the docs, I came to the same conclusion.


Where is this sequence, is in the processmodel sequencefile or the client sequencefile?


The sequence is called from the processmodel sequencefile. I am trying to access the globals in the client sequencefile.


0 Kudos
Message 6 of 7
(4,960 Views)
Hi,
 

@Test_Stand_Newbie wrote:


Why dont you just set the client sequencefile properties to use a common fileglobals. By default each sequencefile is set to use seperate fileglobals.


My understanding is that this option just allows multiple executions of the same sequence file to share globals. This has nothing to do with making these globals visible to the processmodel.




The Process Model sequencefile has the same properties as the client file, so I thought it might also apply. But it doesn't, my mistake.

So, its as James outlined using the method :

Execution.GetFileGlobals(RunState.ProcessModelClient) which will return a PropertyObject reference.

You would use this reference with the PropertyObject methods and Properties,  to do what you need to do with the fileGlobals of the client file.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 7
(4,942 Views)