NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically run in Labview a Sequence with Process Model changing the parameters values

In a custom Operator Interface, while there are no running tests, I need to run a service sequence to control a mechanical panel lock by pressing a buttton on GUI.

This service sequence has one input ("Action") and one output ("Locked"). The "Locked" parameter is initialized to False before execution.

 

I can easily run the sequence without process model with the following code (run_sequence.png):

run_sequence.png

 

 

 

 

 

Since I need to log the sequence execution in TS SQL database, in order to trace operator's actions, this solution is not viable because without Process Model the NI_DatabaseLogger.seq is not called.

 

I can successfully run the sequence with SequentialModel "Single Pass" entry using the TS supplied example "Execute With Process Model.vi" but I don't know how to modify the client MainSequence parameters before execution and read them afterwards.

Reading the manual page:

https://www.ni.com/docs/en-US/bundle/teststand/page/managing-process-model-entry-points.html

was of no help.

 

Where can I find a code snippet to accomplish this?

Given it is possible, in the end...

 

Thanks for reading

 

Raffaello

0 Kudos
Message 1 of 3
(76 Views)

I have moved the in/out variables to FileGlobals scope and been able to set them before execution:

run_sequence_fglobals.png

  

but the "Locked" output variable is always read to its default value, regadless of what sequence code writes in it.

0 Kudos
Message 2 of 3
(47 Views)

I have found out that I had to get the FileGlobals runtime copy if I want to be able to read the values set at runtime

 

run_sequence_fglobals_exec.png

 

I am sure there are better ways to do this, but at least it works.

 

Raffaello

0 Kudos
Message 3 of 3
(44 Views)