From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between 2 time in case structure

Hello Guys,

i want to know How long the LED ( pin 13 ) was on? in this format (Minute:Second). When i click on the button, start counting the times until when i click again. i need to calculate the 2 times between the True and False case structure. 

0 Kudos
Message 1 of 21
(1,580 Views)

cross-posting is ok, just mention it please

 

https://lavag.org/topic/22890-difference-between-2-time-in-case-structure/


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 21
(1,577 Views)

Hi amir,

 


@amirdifraxe1 wrote:

When i click on the button, start counting the times until when i click again. i need to calculate the 2 times between the True and False case structure. 


Use a shift register to hold a timestamp. Set the timestamp in one case and subtract in the other case…

 

Btw. we cannot edit/run/debug images with LabVIEW!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 21
(1,562 Views)

Thank you Dear, i will test it 

0 Kudos
Message 4 of 21
(1,546 Views)

thank you , i have attached my VI. if its possible for you can you do it like example for me ? because when i subtract it between two case error me. 

0 Kudos
Message 5 of 21
(1,542 Views)

Hi amir,

 

many of us aren't using the most recent LabVIEW version because of changes in the license scheme, so you better attach a downconverted version of your VI! (File->Save for previous)

 

Suggestion:

There might be simpler solutions… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 21
(1,486 Views)

oh sorry Dear, i forgot it. i have attached Version 2016. 

0 Kudos
Message 7 of 21
(1,470 Views)

Excuse me Dear, what is the name of these components? 

0 Kudos
Message 8 of 21
(1,374 Views)

First one is "feedback node", under Programming -> Structures

Second one is "Boolean crossing PtByPt.vi", under Signal processing -> Point by point -> Other functions

0 Kudos
Message 9 of 21
(1,370 Views)

Thank you Dear

could you please to explain these schemes? 

 

when i press the button(button=1), the input of crossing will be false-True then, on the selector, select True and start timing.  but on the 2 selector and feedbacks i don't understand whats happened.if i know the concepts of this method will be ok. 

0 Kudos
Message 10 of 21
(1,360 Views)