NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Access client step properties & attributes from process model

Hi, 

  I am trying to allow technician's to import results from a previous test execution into the current execution that shares the same part number and serial number. I have been able to do it using code in my main sequence, but I would really like to handle all of that in the process model so our test engineers do not have to worry about implementing the import feature in every test sequence. 

 

  I have so far been largely successful, except for one big issue: When I try to set properties or attributed of my client sequence from my process model it is actually changing the editable version of my client, not my runtime copy.

 

For instance, the following expression is used to indicate on the report that the result for a certain step was imported from a prior execution.

 

RunState.Execution.GetRunState.ProcessModelClient.Data.Seq["MainSequence"].SequenceContext.Main.GetStepByUniqueID(Locals.Import.StepID).Result.ReportText="Imported from "+Locals.ImportedExecution

 

It works great, but I would like to do the same thing in my runtime copy. Is there a way to get to the client sequence's runtime copy as an object?

 

Thanks,


Corey Rotunno

0 Kudos
Message 1 of 3
(2,763 Views)

Good Morning Corey,

 

Since you said that it is working when you put it directly in the main sequence, could you try running your code in a Process Model Callback instead of in the Process Model itself? Or, is this what you are already doing?

 

I have run into this problem before where TestStand, in general, does not grab the run time copy of a sequence or sequence file when using the API. During execution, TestStand makes and copies the sequence. Typically the response from the TestStand developers is to structure the code differently, as TestStand does not support the structural modification of any sequence file that is currently loaded for execution.

 

Regards,

Hannah 

Applications Engineering 

National Instruments 

www.ni.com/support 

Message 2 of 3
(2,718 Views)

Hannah,

 

  It's not that it works from the main (which it does), its that the client process properties I changed from the model was actually trying to change the client sequence file rather than the runtime copy. I have since done more reading and it seems only the "SequenceFile" reference is available to the process model, not the "Sequence" reference.

 

  I ended up doing just as you said, instead of having the model do the property modifications directly, I call sub-sequences of the process model file from my client main and all is well since my client does have access to its' runtime copy.

 

Thanks!


Corey Rotunno

0 Kudos
Message 3 of 3
(2,689 Views)