LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help with case structure

In the VI that i'm enclosing, i have used a boolean array of two booleans to operate two case structures. Inside the case structure, when the boolean is true the shift register value is to be incremented once.The difference between the two incremented values is taken as count. I am facing two problems, firstly, the increment takes place continously instead of just once every time the boolean is true, secondly, the count switches to zero when the switch is turned back to false.

Thanks in advance.

0 Kudos
Message 1 of 9
(3,265 Views)

Okay, the second problem is because i have not wired the false condition in the case structure, which i have now rectified. Still stuck with the increment part

0 Kudos
Message 2 of 9
(3,263 Views)

You need to wire across in the other case. Currently it outputs zero because the tunnel is unwired.

 

(also, "index array" is resizable. You only need one instance).

0 Kudos
Message 3 of 9
(3,256 Views)

Thank you for the index array part, but i am still stuck with the increment part, as in the value keeps on getting incremented when the switch is on, i just want it to be incremented once when the switch is on

0 Kudos
Message 4 of 9
(3,242 Views)

Use buttons and set their mechanical action to latch. (right-click...mechanical action..latch when released).

0 Kudos
Message 5 of 9
(3,237 Views)

Actually, i plan to replace the switches with output from a daq, so im looking for a more permanent solution

0 Kudos
Message 6 of 9
(3,231 Views)

What behavior are you looking to measure with the DAQ device?  It's difficult to point you in the right direction without knowing that.  It's likely you're approaching this from entirely the wrong direction if you view the switch's behavior as something you want.

 

Are you going to be taking an analog input?  Digital? 

0 Kudos
Message 7 of 9
(3,224 Views)

Then look for FALSE->TRUE transitions to switch case.

0 Kudos
Message 8 of 9
(3,221 Views)

Try something like this.

0 Kudos
Message 9 of 9
(3,213 Views)