NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

finding the location of VI running ----dynamically

Solved!
Go to solution

Hi evryone,

 

I am planning to use a single VI in main step and post-step actions. Part of this VI behaves differently based on whether we are in main step or post-step action. But the problem is finding the location..where we are???? main step? or post-step action?........How to find this dynamically??? Any idea????

 

Thanks in advance..........

 

 

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 1 of 9
(4,300 Views)

Hi Anil,

 

I just want to make sure I understand you correctly. When you say you have VI in main step and post-step actions, do you mean that you have an action step where you specify the VI as a code module and the action step has a post-step substep where you are calling into the VI again? What exactly does the VI do different based on the two cases?

Raj
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(4,260 Views)

 

Hi Raj,

 

Yes, I am calling the same VI as code module in action step and post-step substep also.

 

I am testing a printer firmware, so I will not be transmitting the graphics in main step. If the result of main step is FAIL, I will be running the post-step action with the same VI, there we send some extra commands to transmit graphics, we capture graphics and we convert them into PNG image file for debugging purpose, so that we actually know what it was printing.

We can do this with 2 separate VIs, but lot of other actions are common in these VIs except sending and extra command and reading more data from printer. So i am planning to have single with case statement inside that VI to do different actions based on the location this VI called as module.

 

 

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 3 of 9
(4,249 Views)

Why don't you simply pass the information to the VI?

0 Kudos
Message 4 of 9
(4,247 Views)

Thanks you Dennis

 

well...the question is....how to know whether I am in Action step or Post-Step substep during run time......then I can pass the information to the VI right......I just started using Test Stand......Please let me know if I am missing any basic thing in this...........

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 5 of 9
(4,243 Views)

Sorry, I misread what you are doing so ignore my comment. This is a custom step type?

0 Kudos
Message 6 of 9
(4,230 Views)

Hi Dennis,

 

If you are asking about the main step tye, yes it is custom step type. In that I have couple of post-step substeps.

 

 

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 7 of 9
(4,202 Views)
Solution
Accepted by topic author Anil_Reddy

Hi Anil,

 

Why can't we make it simpler and simply add an extra input to your VI. Possibly a boolean whereby you can pass a true in the case of the action step and a false in the case of the post step substep. It would be much easier to implement this than trying to figure out programatically where the call originated.

Raj
National Instruments
Applications Engineer
Message 8 of 9
(4,167 Views)

 

Hi Raj,

 

Thank you man..that worked....sometimes we leave simple things and start thinking in big way........Smiley Happy

 

 

 

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 9 of 9
(4,117 Views)