From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add PostUUT callback programatically ?

Hi there. 

 

I want to ocassionally add a PostUUT callback override sequence to a client sequence however I need to do this programatically from within an operator interface.

 

Anyone tried this or know if it can be done ?

 

Regards

Chris

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 1 of 7
(4,315 Views)

The short answer is yes it can be done.  Pass the sequence context through a UI message.  Then you can use the API to do whatever you want.

 

However, if you give more details there may be a better solution to your problem.  Having the UI do something like this is then coupling it to your sequence file/s.  This is not good practice when dealing with UI creation.  The best place to get shared functionality would be in the Process Model.  That way you just have a flag that turns on and off code depending on your situation.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 7
(4,308 Views)

Unfortunately I ca't modify the process model. It's already customised by the customer however what I do want to do is override this custom models PostUUT behaviour for some executions (but not all)

 

The UI is already heavily couppled and is veey customer specific. This is not intended to be re-used elsewhere or outside this one customer.

 

I have found a way to "Insert Callback Override Sequence" however I still need to specify a new module to be added to that override.

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
Message 3 of 7
(4,306 Views)

To insert modules you have a couple options.

 

Option 1- Have a sequence file on disk with the correct steps and settings.  Then just copy them over to the newly inserted callback.  This is similar to the example SequenceBuilderTool in the TestStand examples.  Except that they call the API from TestStand instead of the UI like you want.

 

Option 2- Create the step and call the module dynamically from scratch.  You would need to go through the API to find the correct methods and such in order to accomplish this.  Also, which API calls will work for the correct adapter.  Without knowing specifically which adapter and module you are calling it would be hard for me to give any input.  If you need specific help on which one though let me know.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(4,301 Views)

It's a single Action step (adapter type is LabVIEW) that needs inserting into the callback.

 

I can see how to insert the step into the sequence, I'm just missing the part where I define the module specifier. 

 

Chris

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 5 of 7
(4,297 Views)

I also tried the clone method just like the sequence builder example however there's a wire class conflict between the return value of the clone step method and the insert new step input.......

 

grrrrrrr

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 7
(4,292 Views)

It's possible that the cloned output is a generic PropertyObject, while the InsertStep method is expecting a Step object. Try putting an invoke node on the output from the Clone operation and select the AsStep method. This should allow you to wire the output to the InsertStep method.

0 Kudos
Message 7 of 7
(4,283 Views)