LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time counting

Hello everyone,

I am wondering if there is a way to measure the elapsed time since a specific boolean button was pressed (i.e., turned to 1) and then use this elapsed time as a condition for executing a particular part of the code.

Specifically, I need to send a frame to a certain device, but I want to do this after a designated amount of time has passed since the button was pressed. Both the time interval to "wait" and the boolean variable indicating the button press are located on the front panel.

 

Thank you for your help.

0 Kudos
Message 1 of 5
(461 Views)

Hi Holly,

 


@MinHolly wrote:

I am wondering if there is a way to measure the elapsed time since a specific boolean button was pressed


Wow, LabVIEW comes with a function called ElapsedTime, that will do what you are asking for!

 

(Even though it's an ExpressVI it is a quite useful one...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(444 Views)

Actually, I've seen that this function starts counting at a set "start time" input and does not take a boolean as a starting condition. am I wrong ? 

0 Kudos
Message 3 of 5
(439 Views)

Hi Holly,

 


@MinHolly wrote:

Actually, I've seen that this function starts counting at a set "start time" input and does not take a boolean as a starting condition. am I wrong ? 


Yes, this function also has boolean inputs available…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(417 Views)

@MinHolly wrote:

Actually, I've seen that this function starts counting at a set "start time" input and does not take a boolean as a starting condition. am I wrong ? 


Read the Help for Elapsed Time

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(412 Views)