03-20-2014 10:02 PM
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.
Solved! Go to Solution.
03-21-2014 12:19 AM
Instead of attaching a VI that works, please attach the VI that fails so we can see what's going on.
03-21-2014 05:18 AM
Also note that dequeue and timed loops don't have a "perfect match". In fact, i discourage you to combine them.
Norbert
03-21-2014 08:30 AM
What is wrong with just using timing frames inside your timed loop?
03-21-2014 01:42 PM
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.
03-21-2014 04:05 PM
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.
03-23-2014 02:37 PM
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
03-23-2014 02:47 PM
@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
03-23-2014 03:04 PM
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
03-24-2014 02:22 PM
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