From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Elapse time express vi

If the express vis work for you then that's a good thing. I don't really like them personally. I am attaching a method that I frequently use for this type of thing. It is one of the easiest ways to get started with LVOOP.

=====================
LabVIEW 2012


Message 11 of 42
(1,134 Views)

Hi Steve,

 

I agree with you about the express vis. Especially the express timer. Too much overhead and side effects.

Especially when alternatives (like an action engine timer) are so easy to implement.

 

Thank you for posting the timer example.

I'd like to learn LVOOP and found your code was easy to understand - very helpful!

I like how the ENUM that is required for an action engine is not needed. 

 

One question:

 

I noticed that in the Start.vi the Timer in and Target (Seconds) inputs are not set to "required".

Is this just an oversite?

 

Thanks again,

steve

 

 

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 12 of 42
(1,125 Views)
You are right, it is absolutely good practice to set inputs to required, especially for the class input. But for certain situations it is not needed. In this case the start method doubles as the initialize method. This is the very first class I ever wrote. It works well and is in my reuse library to this day. I do have a more adavnced timer class which I later wrote that has pause, resume, reset, etc. I could share that when I get back to my computer. For the post above I wanted to show the simple one.
=====================
LabVIEW 2012


0 Kudos
Message 13 of 42
(1,116 Views)

Here is the better one. The test vi shows how you can easily do multiple timers.

 

=====================
LabVIEW 2012


Message 14 of 42
(1,108 Views)

hello and thanks for your contribution;

 

would you be able to upload again both vis since for some reason i can not reach them, it gives me HTTP Status 404 every time i attempt to click on them.

 

thanks again

0 Kudos
Message 15 of 42
(1,085 Views)

Steve, please desregard my previous post, i was able to finally download both of your documents.

 

I found it interesting since it is something i have never used before, i will try to find some sort of tutorial as well as the adantages that it has over not using classes.

 

thanks again to all that helped.

0 Kudos
Message 16 of 42
(1,077 Views)

This link on Lava is a good place to start.

=====================
LabVIEW 2012


0 Kudos
Message 17 of 42
(1,063 Views)

Hi,

 

I'm having problems with the elapsed time express vi as well. I really don't know why it doesn't output the elsapsed time value when I run my vi. It simply outputs the same set time value repeatedly. I've attached the vi.

 

I'll appreciate any suggestions.

 

Thanks

0 Kudos
Message 18 of 42
(1,023 Views)

Wadel,

 

I do not understand your question. You do not have an indicator wired to the elapsed time. The time remaining seems to count down as I would expect.  I do not have your Pressure VI so I disabled that part of the code, but that has nothing to do with the timing anyway.

 

Exactly what is your VI doing that you think it should not?

 

Lynn

0 Kudos
Message 19 of 42
(1,018 Views)

Hi Lynn,

 

The time remaining indicator does not count down in my code. I ran the VI with execution highlighting and saw that the timing express VI was constantly outputing 30 secs target time without a count down and the VI only stops when you abort it otherwise it will run indefinitely. The VI also doesn't display a message stating why the test stopped as I expected.

0 Kudos
Message 20 of 42
(1,002 Views)