ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case timestamp

Hi,

 

I have case structure inside the while loop (time Vi). I want to get the timestamp when the case structure becames true. I just need single time stamp.

 

Thanks

0 Kudos
Message 1 of 7
(489 Views)

Hi oMme,

 


@oMme wrote:

I want to get the timestamp when the case structure becames true.


So you want to get the timestamp when the case condition changes from FALSE to TRUE?

 

A boolean change is called "edge", and there are rising and falling edges. You want to know the timestamp of the rising edge of your case condition!

Happily LabVIEW comes with a BooleanCrossing function…

Best regards,
GerdW


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

Hi, Im beginer in labview. can you please provide the example? i have checked forum but could not find similer problem. 

Thanks 

0 Kudos
Message 3 of 7
(451 Views)

Hi oMme,

 


@oMme wrote:

can you please provide the example?


Please:

 


@oMme wrote:

Hi, Im beginer in labview.


Did you notice those Training resources offered in the header of the LabVIEW board?

 


@oMme wrote:

i have checked forum but could not find similer problem. 


I know there are lots of threads about the problem of detecting rising edges in boolean signals…

Best regards,
GerdW


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

For good measure, I would also recommend to set the VI properties to "clear indicators when called", else your indicator might show a stale value until the first trigger.

 

I typically just use a feedback node.

 

altenbach_0-1760122137587.png

 

(You might want to tune according to your requirements. For example what should happen if the boolean is already true when the program starts?)

0 Kudos
Message 5 of 7
(405 Views)

This is where Event Structures work better than polling. 

 

TimeTrue.png

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 7
(341 Views)

@RTSLVU wrote:

This is where Event Structures work better than polling. 


Yes, if the boolean is a user control. In a typical application it is polling of a condition (DI, threshold reached, etc.).

 

(Just guessing. Cannot look at the original VI posted in LabVIEW 2025)

0 Kudos
Message 7 of 7
(333 Views)