NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand process model sequencefile variable read

Hi,

 

I'd like modified the sequential process model to include a new callback. Then i'd like to get parameters from previous steps of my process model to override my callback from my sequence file.

How could i read/write variable from my processmodel to sequence file?

 

 

MyProcessModel                                        MySequenceFile

 

1

2 Variable = X

3 MyCallback (ProcessVariable) ---------->      MyCallback

                                                                 CallbackVariable = ProcessVariable                                                    

4                                             <-----------

 

Alex

0 Kudos
Message 1 of 5
(3,786 Views)

It might be best if you explain what you are trying to do and why. It might turn out that callbacks aren't the best way to accomplish what you are trying to do.

 

That said, if you are overriding a process model callback in a sequence file, and you are the one defining the callback in the process model, the easiest way to pass data to and/or from the process model to and/or from the sequence file would be by passing it as a parameter to the callback. If you make the parameter "by reference" (which is the default), then setting it inside of your sequence file's override for the callback changes the value in the process model. If this doesn't make sense in your particular use case, please provide more details what you are trying to do and perhaps I can suggest a better way.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 5
(3,778 Views)

Hi dug,

 

I have 2 DUTs (2 electrical component, one working with single-phase power the other with three-phase), for each of them i have to run a dozen of differents tests.

So my idea is to developpe my own process model which will include several entry points (one for ech of my differents tests) and 2 sequences file for each of my DUTs.

Like that i could run each entry point (all my differents tests) for each DUT.

 

For my 2 DUTs i want to create a set of callback in my process model that i could overwrite from my sequence files. Some of these callbacks will requier parameters from the entry points. So i would like to know how i could send parameters from a callback in the process model to this same callback in the sequence file.

 

I'm not very confortable with english so i hope you will understand what i wanna do...

 

An example to resume

 

MyProcessModel                                                        SequenceFile

 

EntryPoint_single_phase230V_10A                              Single_phaseDUT ( from this sequence file i will run EntryPoint_single_phase230V_10A)

 

WakeUpDUT        

      |

      v                                        U=230, I=10

Callback_Start_Charging (U, I)   ------------>          Callback_Start_Charging (U=230, I=10)

                                                                                         |

                                                                                         v

Stop_charging                          <------------------------------------

TestReport

 

I hope you understand to give me some advices...

 

0 Kudos
Message 3 of 5
(3,767 Views)

Hi Malexman,

 

Just add your parameters in the parameter field of your callback funktion in your process model.

Take care that your callbackfunction is defined as callback. (is it a green sequence icon? if not right click it and somewhere under sequence options you can define it as callback. should change from blue to green). Now you should place your callback with a sequence steptype and add your entry points variables to sequence parameters.

 

When calling the callback in the seqencefile you will get the entrypoints parameters value when executing the entrypoint.

 

Hope this helps

 

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 4 of 5
(3,760 Views)

Hi Doug, Hi Juergen

 

Thanks to your help it works.

 

In my ProcessModel I have defined my sequence as a callback (green icon) and defined my variables as parameters. In my SequenceFile I have included my callback who allows me to Read/Write on it parameters.

Now i know how to transfert data between my ProcessModel and my SequenceFile.

 

Best regards

0 Kudos
Message 5 of 5
(3,742 Views)