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: 

Is it Possible To Pass Parameters From Process Model Callback and back?

Hi everyone, I am trying to pass parameters from the "PreUUT" callback to a subsequence and then from the subsequence back to the PreUUT sequence.

 

This is the order:

 

1. Pass parameters from PreUUT to a subsequence (by calling subsequence with a Sequence call in the PreUUT sequence)

2. Run steps in subsequence and then within the subsequence have a Sequence Call step to call back to the PreUUT sequence.

 

Basically I am passing parameters from the PreUUT sequence to the Subsequence and then from the Subsequence back to the PreUUT sequence.

 

I keep getting the following error for each parameters passed in:

 

Error Code modules must have expected prototype General The parameter 'SKU' must be the same type as the parameter in the process model callback because this parameter has type checking enabled. You must change the parameter type to match the parameter type in the process model to avoid a run-time error. Test Loader FAT Controller.seq Seq["PreUUT"].Parameters.SKU

 

I checked and my data types are the same (data type text and by reference) for both the sequences.

 

Is it NOT possible to pass parameters back to a process model call back?  In this case "PreUUT"?

 

Thanks!

0 Kudos
Message 1 of 4
(4,615 Views)

You cannot change the prototype of PreUUT without updating the process model.  (i.e. you cannot add parameters to PreUUT)  You need to pass a local or fileglobal from PreUUT to the subsequence.  If you pass by reference then the value will come back to you which is equivelant to passing it back.

 

Regards,

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

Jiggawax,

 

Thanks for the quick reply.  That makes sense.  One question I still have is the following:

 

1. It's understood now that if I want to pass parameters from a callback that are other than the default parameters I need to pass them to the subsequence as local or global variables.  Now if in my subsequence I want to have a "Sequence Call" step to call the PreUUT callback once again do I need to pass the parameters as locals and globals from my subsequence?

 

Thanks so much for your help.

0 Kudos
Message 3 of 4
(4,559 Views)

If you call the PreUUT directly then you can pass whatever you'd like into it.  You can even pass your parameters from the PreUUT callback down to the subsequence. 

 

My point was that you cannot create new parameters in PreUUT without modifying your process model. 

 

As a rule of thumb- Don't add parameters to Green sequences (i.e. model callbacks).  Unless you are modifying the process model to handle the new parameters.

 

When calling subsequences using the Sequence Call step you can pass whatever variable you have access to whether it be parameters, locals, globals,literals, etc..  The callee doesn't care where the data comes from. 

 

You just need to realize that with model callbacks (i.e. the Green sequences) they are being called in multiple locations and not just by you.

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