LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure Sequence does not move to next iteration

Solved!
Go to solution

Hi,

     I am trying to create a multi-function Data aquisition and control for a laboratory instrument. As shown in the attached VI, I will eventually have 3 different modes: Single Gate, Dual Gate, and GC, each with their own functionality. Thus far, I have only worked on the Single Gate Mode, so the rest are blank. However, In trying to make the system wait for user interactions, if the "start single gate mode" button is pressed, it moves into that case with no problem, and if it is not pressed, it waits, cycling back to the tab control as I want it to. However, after running the VI with the button pressed, it will not revert back to the "Wait" case, it freezes in "aquire" and refuses move back to the "Wait" case. I am sorry if this is confusing, I think it will be clear when highlight execution is used, it simply freezes after the correct number of iterations in the for loops. Thanks for your help,

<>< Eric

0 Kudos
Message 1 of 6
(3,608 Views)

The only thing that controls which case of the largest case structure that executes is the tab control wired to its case selector.  So the user has to manually make the change.

 

If you want to have it programmatically move to the next, you will have to feed the tab control into a shift register, and use a local variable to write to it to jump it to the next state.

0 Kudos
Message 2 of 6
(3,593 Views)

I want that to be user controlled, what I am trying to get to work programattically is the sub case structure under the largest in "Single Gate Mode." Thanks for the help, I am trying to learn LabView, and only have a few examples to go off of.

<>< Eric

0 Kudos
Message 3 of 6
(3,590 Views)

There are also  online courses for free. There is also the Learning Center which provides links to other materials and other tutorials.

0 Kudos
Message 4 of 6
(3,575 Views)
Thus far, I think the program I am trying to create is doing what I want it to, I just need to figure out how to make this sequence work. Thank you for the links, though, they should prove helpful in the future.
0 Kudos
Message 5 of 6
(3,572 Views)
Solution
Accepted by topic author Eric-APU

Hi Eric,

I think the sequence is working as you want.  When I run it on my computer it on my computer it moves back to the wait case like you want.  I do have to open the VI called Single Gate Pulser.vi and manually hit the stop button inside the VI but after doing that it moves to the wait cae.  Also I noticed that you have a constant wired to the stop of the outer while loop. This is not really a good idea as it forces you to use that abort button.  The abort button will not correctly stop the VI and could cause other problems.  I would suggest having a stop button on the Front Panel somewhere to let the user stop the VI.

Adam H
National Instruments
Applications Engineer
Message 6 of 6
(3,538 Views)