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: 

Can I rely on using multiple Wait (ms) in parallel to start things off at delayed intervals?

Solved!
Go to solution

Hi,

 

I am trying to do four things in a timed loop each a fixed time after the first.  I have done it with a the wait time for each created with a Wait (ms)

 

I have attached a test VI which I think is equivalent to what I have.  This test VI works the way I thought it should.

 

However, my VI with all sorts of  other stuff including waiting for queues doesn't do that.

 

I would have thought that when the loop is started LabVIEW would start all possible things at once and there would be no need for a sequence to ensure various things start at the appropriate time.

 

p.s. I tried Evan Prothro's VI Millisecond Timing probes and they seem to be marvellous but I did have one probe downstream from another returning a time of 0:00:0.0 so I am not sure if I have used them correctly.

 

Any advice welcome.

0 Kudos
Message 1 of 15
(3,067 Views)

Instead of attaching a VI that works, please attach the VI that fails so we can see what's going on.

0 Kudos
Message 2 of 15
(3,047 Views)

Also note that dequeue and timed loops don't have a "perfect match". In fact, i discourage you to combine them.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 15
(3,031 Views)

What is wrong with just using timing frames inside your timed loop?


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 15
(3,012 Views)

Hi Jeff,

 

I had never heard of timing frames before.  I am an occasional LabVIEW programmer.  I see heaps of things in the timing palette that I have not seen before.  I will investigate when I get back to work on Monday.

 

I was hoping someone would point out a flaw in the way I have done it.  I will post my code on Monday too.

 

 

0 Kudos
Message 5 of 15
(2,987 Views)
Solution
Accepted by topic author pgaastra

!2.png

Not that I ever use timed loops but, I know enough to read the help file when I'm bored!  This of course would be the preferred method of establishing relational time constrants on code sections.  Plus you get all the "what do if" start late or end late happen built in.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 15
(2,971 Views)

Hi Norbert_B,

 

You say: dequeue and timed loops don't have a "perfect match".

 

Are you saying this because there is some sinister underlying incompatibility or that I cannot rely on something arriving in the queue before the timed loop is complete.

 

In my case I am getting replies from the a device which I know are quick enough to arrive in time. 

 

There is obviously something I am not seeing or it would work as expected.

 

I have attached the VI with the problem.

 

Thanks

0 Kudos
Message 7 of 15
(2,928 Views)

@pgaastra wrote:

Hi Norbert_B,

 

You say: dequeue and timed loops don't have a "perfect match".

 

Are you saying this because there is some sinister underlying incompatibility or that I cannot rely on something arriving in the queue before the timed loop is complete.

 

In my case I am getting replies from the a device which I know are quick enough to arrive in time. 

 

There is obviously something I am not seeing or it would work as expected.

 

I have attached the VI with the problem.

 

Thanks


 I Will not look..............at the attached vi

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 15
(2,923 Views)

Sorry Jeff.  I can't figure out what I said wrong in my last post.

 

Anyway,  my next step is to try the timing frames as you suggested.

 

Thanks

0 Kudos
Message 9 of 15
(2,913 Views)

I put in the  timed sequences and the problem is solved.  Strange because to me it is equivalent to what I had originally.  I still don't see what I was missing.

 

Thanks for the advice

0 Kudos
Message 10 of 15
(2,877 Views)