LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed Time with states of buttons

I am trying to count the time a button is in the "On" state. The vi that I have created does not work. I do not know why. It starts counting one the button is switched to the "On" state but never leaves it. 
CLD Certified 2014
0 Kudos
Message 1 of 5
(2,413 Views)
Your button is latching, so there is no off event, the unlatch occurs when the button is read by sofware. 
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(2,410 Views)
That is not the case because the boolean text still goes to the "Off" state. Also, when the button is changed to a switching mechanism, it still does not work. It seems to think it is always in the "On" state.
CLD Certified 2014
0 Kudos
Message 3 of 5
(2,405 Views)

Sorry I made an assumption without looking too deep. 

I few things I noted though.

You might consider simplifying the code

Make a single event on the cluster (all elements) value change event then use the = function to compare the old and new value the value that changed tells you the indes of the button pressed. Here you can then have an index and value for your button that was pressed. 

Are you trying to have a 3-state button it was unclear to me, I assumed you just wanted to time stamp the on off events for each button?

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 5
(2,395 Views)
You are correct in that  I want a three stage button. On, Off, Reset. I want to find the time the button is in the "On" state and reset when "Reset" is pressed.
CLD Certified 2014
0 Kudos
Message 5 of 5
(2,377 Views)