LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add timing delay in between case structure

I think everyone eventually builds a wait with error clusters. There are a couple enhancements you might want to consider.

1. Include a case structure so of there is an incoming error the delay is bypassed. For short delays it won't make much of a difference, but for delays of multiple seconds it is a good thing to have.

2. Configure this VI as a shared clone. In one of the posts I wrote on dynamically launching VIs I talked about this feature in detail, but the short version of the story is that they offer all the runtime benefits of reentrancy but without the need to have maybe hundreds of instances in memory at once. It does this by creating a pool of clones. When one is needed, the execution engine goes to the pool and uses one that is not currently busy.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 11 of 12
(838 Views)

@mikeporter wrote:
I think everyone eventually builds a wait with error clusters. There are a couple enhancements you might want to consider.

1. Include a case structure so of there is an incoming error the delay is bypassed. For short delays it won't make much of a difference, but for delays of multiple seconds it is a good thing to have.

2. Configure this VI as a shared clone. In one of the posts I wrote on dynamically launching VIs I talked about this feature in detail, but the short version of the story is that they offer all the runtime benefits of reentrancy but without the need to have maybe hundreds of instances in memory at once. It does this by creating a pool of clones. When one is needed, the execution engine goes to the pool and uses one that is not currently busy.

Mike...

I learned #2 the hard way.  I was wondering why my waits were a lot longer than they should be.  Then I realized the waits were approximately the same as all the waits on the program added together.  That was what tipped me off.  How embarrassing.  Thankfully I only embarrased myself because it was something I was working on at home.  (But I see this a lot when I go to a new place.  Of course I then go into the existing code and see that they don't have anything running in parallel so they just never noticed it.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 12 of 12
(825 Views)