02-11-2015 10:15 PM
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.
02-11-2015 10:18 PM
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
02-11-2015 10:54 PM
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).
02-11-2015 11:02 PM
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
02-11-2015 11:14 PM
Use buttons and set their mechanical action to latch. (right-click...mechanical action..latch when released).
02-11-2015 11:24 PM
Actually, i plan to replace the switches with output from a daq, so im looking for a more permanent solution
02-12-2015 12:02 AM
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?
02-12-2015 12:10 AM
Then look for FALSE->TRUE transitions to switch case.
02-12-2015 12:27 AM
Try something like this.