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: 

How to create an event based timer

Hi,

I'm using LabView 7.1 and in my application I need a timer/clock which will do the following things depending on imputs

 

1. When I pass 1 as an input, the timer should not increament and stay in its previous position.
2. When I pass 2 as an input, the timer should start increamenting from the previous value

3. When I pass 3 the timer should clear itself and come back to 0.

I don't need much accuracy and just resolution of seconds will suffice.

 

Can anyone help me out as I'm new to the LabView

Looking forward for the help

 

Thanks

0 Kudos
Message 1 of 5
(3,487 Views)

You should use a Case Structure (equivalent of Switch Case in C) & pass the desired values (0,1,2) to it. So, there ll be 3 seperate cases in the CS for 0,1 & 2.

 

Perform each logic inside each of those cases as per your need.

 

Also, you need to put this CS inside a while loop & use Shift Regusters (SR) to keep track of the old value.

Message Edited by parthabe on 08-03-2009 05:32 AM
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 5
(3,482 Views)

Hi,

Correct...I had thought of this scheme but I'm struggling with time operations...Don't know how to perform it...Could you please explain in detail...

 

Thanks

0 Kudos
Message 3 of 5
(3,478 Views)
Sorry, I dont have LV installed in my PC.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 5
(3,466 Views)
TIME.jpg
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 5
(3,445 Views)