Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

To calculate the led glowing time

I am reading a digital input through ni DAQ USB 6225  , I am using a Boolean indicator (LED) in while loop to continuously monitor the status of the port,

The LED on the front panel will be glowing only for some amount of time and I want to calculate the amount of time the led glow

is it possible to get the amount of time the led glows? Or is there any other method to determine the time?

0 Kudos
Message 1 of 2
(4,362 Views)

the status of the port is a digital event of "0" or "1" (On/Off, Hi/Lo,TRUE/FALSE)...hook your status to a "statement case" and clock the differences inside and outside of that case statement as it toggles between the two states...

0 Kudos
Message 2 of 2
(4,320 Views)