08-21-2009 06:35 AM - edited 08-21-2009 06:35 AM
Hello,
I have a VI where I first select one of three switches to read from different gauges. At the moment when each gauge is selected a case structure is selected and data is recorded from that gauge until stop is pressed. There is no means within the VI to change gauges mid flow so to speak without first stopping and restarting and saving the file afresh. I would like to be able to press another gauge button and the software automatically continue recording daat from the different gauge.
To do this I need to jump out of the central case structure and revert back to the beginning. How do I do this?
Also, in each case structure there is a facility for saving data so by jumping out of the case structure and into another one it will ask me for a new file name and save a new file afresh. I need to put the SAVE File outside of the case structure. Is there a quick and easy way of doing this?
Nevica
Solved! Go to Solution.
08-21-2009 06:55 AM
Hi nevica,
you shouldn't use the local variable. It should work as expected if you stop only the inner loop. Use a second "stop" button for the outer loop. You can then use a local variable from the second stop button to stop also the inner loop. Use a or assignment to do it.
You should insert a function to select the gauge while the vi is already running. You can use an event structure for it.
Mike
08-21-2009 07:13 AM - edited 08-21-2009 07:16 AM
I am sorry. I dont quite understand what you mean.
Do I have to use a stop button for a while loop or can I jump out some other way. I need to be able to stop the inner loop or select another gauge seamlessly. I think you are saying that I put my actual stop outside of the inner loop and provide locals for the inner loop from the outside stip. Is this corrent? What difference will it make by making local 'stops' to the inner while loops? and the outer loop the actual stop button.
I don't know what an event structure is: Could you please be more specific.
What do you mean by Use a or assignment to do it.?
Nevica
08-21-2009 07:30 AM
Hi nevica,
the attached picture shows how you can stop the two loops.
I think you need the event structure to select the new gauge.
Mike
08-21-2009 07:35 AM
08-21-2009 07:38 AM
Hello Aestat,
Within each I/O Assistant I have different commands (@0000, @0001, @0002) which select different gauges over the same COM1 line. It is a device which can select to read from 1 of three pressure gauges. Does this help. That is why I need a case structure to select each of these commands.
nevica
08-21-2009 07:46 AM
08-21-2009 08:41 AM
08-21-2009 08:47 AM
08-21-2009 09:38 AM
Hello Aestat,
Thanks forthe time you have put into the VIs. Unfortunately I cannot open any off the files as I am still using LV 7.0. Could you please save in this format or do a screenshot please?
Thanks,
Nevica