03-18-2021 07:52 AM
hi,
I have been trying to display three different timers. The test should keep repeating as long as the timer has not reached the deisred value. For example two states, turning a lamp on and off. Therefore the three timers. For example a 20 hour test, where every 40 seconds the lamp turns on and the next 20 seconds stays off, this repeats for 20 hours. Somehow I get strange results with the Elapsed time Vi. Sometimes the time does not start from zero as it should. The timers only refresh every time the a cycle has been over. Is it posible to display the time at all times?
Thanks in advance.
03-25-2021 09:11 AM
Please, explain the deatils of the project a bit more detailed.
03-25-2021 01:19 PM - edited 03-25-2021 01:30 PM
How about something like this? (see attached)
I like to use actual time for things like this as you can do (some) math on timestamps directly and you can compare time stamps directly
EDIT: Oops you also wanted time display too. I updated it
03-25-2021 02:18 PM
You forgot to add a delay in your loop to prevent a "CPU burner" loop 🙂
03-25-2021 02:27 PM
@Frozen wrote:
You forgot to add a delay in your loop to prevent a "CPU burner" loop 🙂
Sure but I only spent 5 minutes on that as an example, the OP will have to worry about those details.
03-31-2021 07:33 AM
Thanks everyone for your comments and solutions. I already solved the problem by not using the Elapsed time Vi and using a basic countdown timer with a time (ms) Vi. I am running two parallel timers, inside a while loop. It is working now. Thanks again.