NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing variables between Process Setup and Main Sequece

Solved!
Go to solution

Hi all,

I have a VI in my Process Setup which output my device analog channel name. I set the output variable as "Fileglobals.AI_Socket_Channel".

 

I need to use the variable as input in my another VI in the main sequence.

However, I realised that the "Fileglobals.AI_Socket_Channel" in Process Setup Sequence doesn't pass to the "Fileglobals.AI_Socket_Channel" in the Main Sequence.

 

Can anyone please advise on this?

**I have tried to change to Locals.AI_Socket_Channel in both sequence and allow data propagation among them but doesn't work as well.

0 Kudos
Message 1 of 10
(3,926 Views)
Solution
Accepted by topic author 123xj

The simplest answer (probably not the best) is to define a StationGlobal as it will have the scope to be available to both sequences (StationGlobals.AI_Socket_Channel).

0 Kudos
Message 2 of 10
(3,898 Views)
Solution
Accepted by topic author 123xj

Is your ProcessSetup Callback sequence in the same sequence file as your MainSequence that you wish to use the FileGlobals.AI_Socket_Channel?

 

The Locals data progagation probably wouldn't work for you because your locals would have to propagate to the Process Model from which the ProcessSetup is called, then in the Process Model sequence, you would have to propagate it to the Top Level MainSequence of the Client Sequence File.

 

I suspect that your MainSequence isn't your Top Level sequence?

If this is correct then your options are:

1) Use a StationGlobal

2) Use a Sub-sequence call not the MainSequence so that you can pass a parameter.

 

 

Regards
Ray Farmer
0 Kudos
Message 3 of 10
(3,894 Views)

Hi  SercoSteveB,

 

Thanks for the suggestion and i will try that. 🙂

0 Kudos
Message 4 of 10
(3,890 Views)

Hi Ray Farmer,

Thank you for your reply.

 

Is your ProcessSetup Callback sequence in the same sequence file as your MainSequence that you wish to use the FileGlobals.AI_Socket_Channel?

Yes they are in the same sequence file.

 

I suspect that your MainSequence isn't your Top Level sequence?

How to know whether my MainSequence is actually the Top Level Sequence?

 

I am sorry my questions might sounds stupid but i am just a beginner for NI Teststand.

Thanks a lot if you could give me some advice.

 

Best regards,

XJ

0 Kudos
Message 5 of 10
(3,889 Views)

Hi XJ,

 

It's the Sequence that is directly called by the ProcessModel: Single Pass or Test UUTs.

 

Check out "process models, architecture"  in the NI TestStand Help

 

 

 

Regards
Ray Farmer
0 Kudos
Message 6 of 10
(3,887 Views)

Hi Ray Farmer,

 

I am using NI Teststand default model, which is ParallelModel.seq.

And i realised that Main Sequence is actually call back type.

 

Does that means that my main sequence is directly called by the ProcessModel?

However i am still unable to pass the variable from Process Setup to Main Sequence by using the Fileglobals.XXX.

 

Is there any other way to achieve the goal without using Stationglobals.XXX?

 

Best regards,

Xui Jing

 

0 Kudos
Message 7 of 10
(3,863 Views)

Are the one piece of information that was missing - ParallelModel.seq.

 

In your sequencefile, open up the sequence file properties and on the General tab, change the Sequence File Globals setting to:

All Executions Share the Same File Globals.

 

This should sort your problem out.

 

 

Regards
Ray Farmer
0 Kudos
Message 8 of 10
(3,846 Views)

Hi Ray Farmer,

 

I am trying to avoid all executions share the same Fileglobals as I have set some output reading from UUTs (or sockets) as Fileglobals too.

 

In this case, if all 4 executions output reading have different values, then the Fileglobals variables which is sharing among all 4 executions will ended up to have all sockets(or all 4 executions) having similar reading.

Hopefully you could understand my concern. Do you have any other suggestions that might help?

 

Thanks a lot!

 

Best regards,

Xui Jing

0 Kudos
Message 9 of 10
(3,821 Views)

Can you not use arrays and use the TestSocket index?

 

Regards
Ray Farmer
0 Kudos
Message 10 of 10
(3,803 Views)