LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Delays with Real Time Clock

How would you allow the user to select the time delay in seconds (.25 seconds to 2 seconds) between each decision cycle (implemented by using the real time clock, and not the Millisecond delay function)?

 

*New Labview User*

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

What do you mean by "real time clock"?  Where are you running this VI?

 

Can you attach a VI so we can see what you are trying to do?

0 Kudos
Message 2 of 5
(3,759 Views)

I am away from my computer all day today and tomorrow, but here is the requirement:

 

  1. Using a control on the front panel, allow the user to select the time delay in seconds (.25 seconds to 2 seconds) between each decision cycle. A new decision cycle should start by reading the dial value only after the delay time has passed. This should be implemented by using the real time clock (DO NOT use the millisecond Delay function). An indicator should be included on the front panel to indicate the time remaining until the next decision cycle.

We also need an indicator that displays the time until the next cycle (like a countdown).

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

Sounds like a homework assignment.

 

Look at the timing palette and you'll see there are other functions on there to get the current time.

 

The rest involves the control where the user enters the time to wait.  It sounds like the homework is to not just wait X amount of time, but wait a much shorter time and keep looping back to check the current time vs the previous time + the user defined "wait" time.

 

Look at the Elaspsed Time express VI.  You might be able to use that with your homework, but that might be the easy way out.  If you right click on it and pick Open Front Panel, it turns it into a regular subVI.  Look into that and see how that does the job.

Message 4 of 5
(3,724 Views)

Before start you have to clear some questions 
1) what is your clock source for timing 

2) amount of precision that you want to get that 

3) amount of wait that user can exert into system

4) amount of time refresh indicator to show remain time operators 

after that you can start to think about the method and appropriate algorithm to solve your problem

 

 

Message 5 of 5
(3,696 Views)