NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Labview VI from TestStand

Hi,all:

I am trying to run 2 teststand sequences calling different VIs at the same time,one sequence should set the VI action called by the other sequence to stop in the last step.

I have tried to use a StationGlobal to control the stop control button of that VI,but it does not stop the VI even after I set the StationGlobal to be true.

Anyone knows where the problem is?

0 Kudos
Message 1 of 19
(4,427 Views)

I have attached my 2 TestStand seq files and the VI I would like to be controlled.Smiley Wink

Download All
0 Kudos
Message 2 of 19
(4,424 Views)

The number of problems with your code are almost too numerous to list.

 

The simple answer to your question is that you have a while loop in the VI that can only be stopped by pressing a front panel control. Since you have no way to press it because you do not make the front panel visible, it runs forever and does not return to TestStand.

 

The VI itself is, to put it bluntly, one of the most poorly written VIs I have seen in a very long time. It is impossible to read, uses way to many local variables and property node, uses the property nodes/index array functions/etc. in an extremely inefficient manner. The entire Vi could be written so it would actually fit on a normal size screen. On top of all that, it does nothing. I already mentioned that you do not make the front panel visible but even if you did, you do not pass anything to it from TestStand and do not get anything back from it. Why would you even call if from TestStand. As it is, you could just as well call a blank VI.

 

As an example of how to write more effective LabVIEW code, the image below shows a much, much better way to set the visible property.

 

 

 

I strongly recomend you at take some LabVIEW training and do some drastic cleanup before posting code like that again. I suspect that most people on these forums will simply ignore it.
Message Edited by Dennis Knutson on 04-15-2009 08:42 AM
Message Edited by Dennis Knutson on 04-15-2009 08:43 AM
Message 3 of 19
(4,406 Views)
Thanks for you comment.This VI was done by my seniors,and I am only supposed to control their VI from TestStand,not to change the VI.What I would like to know the the solution using TestStand. Thx.
0 Kudos
Message 4 of 19
(4,341 Views)
You can't control it from TestStand. If you think it's possible, then you really have no understanding of either TestStand or LabVIEW. If that VI was created by people senior to you, they should be fired.
Message 5 of 19
(4,336 Views)

First of all,we are only undergraduate students and nobody should be fired.

In addition,as far as I know,TestStand can call LabView VIs with a variety of connector pane configurations.If you are really sure that TestStand cannot do such matters,I will turn to somebody else who are helpful.Thx.

0 Kudos
Message 6 of 19
(4,330 Views)

It has nothing at all to do with connector pane patterns. Even if you had the connector pane wired up (which you DO NOT), you cannot pass a value from TestStand to the stop button in the VI once it starts. The sequence you are running is paused until the VI finishes! The only thing you can do is make the front panel visible when called and manually press the stop button on the VI. That is just basic LabVIEW programming which you really need to take a class on (and the rest of the undergrads). At the very least, rewrite the VI and get rid of the while loop. It serves no purpose when you have a loop in TestStand.

 

 

Message 7 of 19
(4,324 Views)

I think I have wired the connector pane otherwise it won't work in TestStand ... Anything wrong with the connection?

Anyway,what I can do up to now is what you have mentioned:show front panel to control the stop button and let the steps continue.But my prof wants it to be done automatically.

 I also have noticed the problem with the while loop in the VI,but the reason why my senior students put this while loop is that the measurement should not stop untill the generation(the other VI we use)has finished.Do you know any other method to achieve that?

0 Kudos
Message 8 of 19
(4,320 Views)

The senior students are wrong, wrong, wrong.

 

You have a loop in TestStand. One is all that you need as I already said. Without the LabVIEW loop, the loop in TestStand will terminate.

Message 9 of 19
(4,318 Views)
Oh,it works,thank you.
0 Kudos
Message 10 of 19
(4,315 Views)