LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure Problem?

Solved!
Go to solution

Hello,

 

I have a vi in which I have three case structures (true or false elected by a button on the front panel). The first case structure works correctly but the second and third do not select properly. (ie, do not loop as they should when selected from the front panel individually). The vi has been written in 7 Express. Any help as to what is wrong with the structures would be most appreciated.

 

Nevica

Message Edited by nevica on 08-11-2009 03:57 AM
0 Kudos
Message 1 of 24
(3,429 Views)

Hi Nevica,

can you explain what you expect?

 

Mike

0 Kudos
Message 2 of 24
(3,423 Views)

Wow, you must have a very, very big screen or resolution!

 

Your description is vague, so I don't really know what exactly is not working.

Maybe you should delete the contents of the cases and just plase a message box inside for testing purpose to see whats going on.

 

Christian

0 Kudos
Message 3 of 24
(3,421 Views)

Hello Mike and Christian,

 

The case structures are initiated by switches on the front panel. If I select one of the switches (true) then CONTINUAL data acquired for that input channel. A loop should be initiated by selecting a switch as true. This only works for the first case structure. 

 

A loop structure, ie data is continuously acquired for the first case structure (1000 Torr Gauge) but for the second and third structures only one iteration is initiated therefore only one data point is acquired. I need the case structure that is selected to loop until stop is pressed.

 

nevica 

Message Edited by nevica on 08-11-2009 04:12 AM
0 Kudos
Message 4 of 24
(3,415 Views)

You should remove the "Flat sequence structure".

The first frame is executed but the other two won't execute as long as the first one isn't finished. 

So when you press button 2 or 3 but frame 1 is still busy, the code of frame 2 or 3 won't be executed.

0 Kudos
Message 5 of 24
(3,414 Views)

Hello Alain,

 

But surely if I just select the second structure as true and the first structure as false then when the vi pointer gets to the first structure and sees false it will select the false pane in the structure which does nothing. It should then pass onto the second structure (returning true for the error) which is true and then run that procedure. This doesn't seem to be happening in that it doesn't get past the first false structure (I am not sure if this is happening). Why is this happening?

 

What is the point of removing the flat structure? Why did you suggest this?

 

Nevica 

Message Edited by nevica on 08-11-2009 04:20 AM
0 Kudos
Message 6 of 24
(3,404 Views)
You can try doing it like this.
0 Kudos
Message 7 of 24
(3,396 Views)
Wish there was wiring charges!!!!!!!!
Message 8 of 24
(3,395 Views)

Do you need the sequence, first use 1000Torr gauge, then the 10Torr gauge, then the 1Torr gauge?

If not then you don't need flat sequence structure. Remove it so that you have three case structures in the loop.

If yes then you're on the good way but: the implementation of the stop button isn't right Smiley Sad

 

Now it's used only in the first frame, so as long as you don't press it that frame goes on, but what did you wire in the other frames is wrong for several reasons Smiley Mad

First, you use constants instead of a button

Second, the outputs aren't used to stop the loop

... ... 

 

So can you please clear out the required functionality of the code:

Succesive use of the three gauges or not?

Use of only one gauge at the time or not?

Always multiple readings until the "Stop" button is pressed or not?

Message 9 of 24
(3,392 Views)

muks wrote:
You can try doing it like this.

 

If the three gauges are to be used simultaneously or one after the other, then you can't use your code since it uses only one gauge at the time Smiley Sad
Message 10 of 24
(3,374 Views)