11-23-2009 10:15 AM
I use LV 8.6 and TS 4.1.
I made a Custom Step Type where I specified a Default Module to execute and i created an Edit Substep VI from which the user can pass the input to the default maodule.
If i pass a value it's works correctly. Then I want to pass a local variable so i have a button in the Edit Vi that display the Browser Property Dialog Box from which i recover the name of the local variable selected. How can i pass the local variable to the input default module? (The value of the Local variable is setted during the execution of the sequence).
Thanks.
Max.
Solved! Go to Solution.
11-24-2009 01:05 AM
As I understood your problem, in Test Stand, if you want to pass the default value of the variable to any code module, then this value you can enter in the definition as well.
For Example: you want to pass a string variable to any method from your local variables. And you want the default value of the variable should be for example "Test", then assign the value to variable in locals as "Test" i.e. same as to pass as default.
Or if you have the problem while starting the code module, so in you custom step, you can use Pre_step code module to read and set the fields.
Hope this help!
Thanks,
Rajender
11-24-2009 02:21 AM
Hi Rajender,
Thanks for your reply but my problems is another.
I have the problem in my Custom Step.
In the Edit Substep VI I display the Browser Property Dialog Box where I want to select a local variable and assign it to the imput of the VI that will be execute during the Running of the Step. I will try to explain better with some example. When I insert my Custom Step in my Sequence and I select Edit, the Vi in the figure1.bmp is displayed. In this VI I can set the input to the VI that will be execute.
If you click on the button f(x) the Expression Browser is displayed (figure2.bmp). Here you can select the local variable, i.e. Locals.pippo.
When i click OK I recover the string Locals.pippo as espressionOut in the Edit VI (figure3.bmp). How can i pass this variable to an input of the Default Module that will be excute from the step? (The Edit VI is different from the VI that will be execute from the Custom Step).
Thanks.
Max.
11-24-2009 02:29 AM
Hi,
That expression value you will use as the lookup string for the GetVal method rather than having a fixed value.
Regards
Ray Farmer
11-24-2009 03:30 AM
Thanks Ray, your reply is correct.
The problem is that I have to use this string in another VI because the VI that I use as Edit is different from the VI I use as Default Module (Run VI). So I should create a Step Variable (String) for each input of the Default module (because I could select a local variable for each input), assign to this variable the expressionOut through a SetVAl Method and then in the Run VI I should check if the String variable linked to the input has been set and then use this as lookup string for the GetVal Method. I thought to do so but I want to know if there is another way to do this thing without declare a Step Variable String for each input (I have 20 input for the Run VI). I have already declared a Step Variable for each input to pass the value.
Thanks.
Max
11-24-2009 03:58 AM
Hi,
Yes I see what your problem is.
If I am proving an means of suppling a variable as a fixed value or a lookup string then in my step type I organise the property as a container which contains two properties, one to hold the value and the other the lookup string.
If you dont what to change your step types then you have to provide some way else to hold this lookup string ie a local / fileglobal / station global. Or keep it in memory of your labview. Neither of these are ideal, as it best to keep step properties when the step.
Regards
Ray Farmer
11-24-2009 05:30 AM
Ok!
I agreed with you. I think that i have to modify my Custom Step and organise every property as a container.
it's the better thing to do.
Thanks for your time.
Regards.
Max.