04-15-2009 03:07 AM
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?
04-15-2009 03:15 AM
I have attached my 2 TestStand seq files and the VI I would like to be controlled.
04-15-2009 09:42 AM - edited 04-15-2009 09:43 AM
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.
04-15-2009 07:46 PM
04-15-2009 09:22 PM
04-15-2009 09:32 PM
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.
04-15-2009 10:02 PM
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.
04-15-2009 10:20 PM
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?
04-15-2009 10:31 PM
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.
04-15-2009 10:37 PM