07-15-2020 06:47 AM
Hi team ,
My requirement was need to call one by one (10 to 15 ) different testcases dynamically from main VI program during each state execution from main vi . i used call by reference because i can control/ Change parameters . so only i choose call by reference method
i have attached a image . Please see for reference
In that image ,
Method 1 : I used a static reference for getting a VI path and VI server class i browsed and choose a particular VI and its connector pane was turned out as a strict reference type . I got the output successful in this method . But for 10 to 15 test cases i am planning for method 2
Method 2 :. Here i like to put reference only. 10 to 15 test cases are .there . so i cant create vi for every test case as like method 1 . Because i will plan to call particular vi from main vi . there are so many states in main vi . During their each state execution , i just need to call particular VI ( sub VI ) server class type reference from main VI .
It was accepting only the strict type reference only in call by reference . How to convert . ?
i used type cast and tried . i like to Progress in method 2 only . Please see image for better understanding
please give suggestions for this
Thanks in advance
07-15-2020 07:41 AM
For Method 2, use a strict VI reference constant, just like you did in Method 1.
07-15-2020 08:18 AM
Seems like this would be easier to use Object Oriented with Dynamic Dispatch. Then you can just use a simple Factory Pattern using Get LV Class Default Value.vi to load up the tests you need. You could then possibly just use a FOR loop to iterate over the tests you created.