10-18-2006 11:49 PM
10-19-2006 10:24 AM
Offhand, I'd say that "something" is requiring execution time that you didn't anticipate. Without posted code, I don't think anyone else can identify what that "something" might be. Can you post it?
You might be able to find it yourself by simply watching the diagram with execution highlighting on. If there's one specific call to a vi that requries seconds to execute, you'll probably be able to notice that. Some of the standard candidates include:
1. Calls to DAQ functions requesting to Read samples which aren't yet available. The call will wait to accumulate them or else time out.
2. Calls to VISA communication functions requesting to read bytes that aren't yet available. The call will wait to accumulate them or else time out.
3. Operations on very large arrays that require memory management. This seems less likely to cause a consistent timing delay though.
-Kevin P.
10-27-2006 09:12 AM
10-27-2006 12:08 PM
@Nishant wrote:
... two are continuously run while loop and two are timed loops running at 50 ms and 60 ms, with having different priorities,
10-27-2006 11:31 PM
Hiii, Ray
No, there is no nested loops in the VI.
Thanks,
Nishant
10-27-2006 11:42 PM
10-29-2006 03:03 PM
I have hade the same type of problem with one off my own program. It was halted for some seconds at irregular times.
The computer I used for this application is with dual cores. If a disable one of those for LabVIEW I newer has the problem that the program is halting for some time.
What I found was that one off the processors gets a very high load and the anther has zero loads under the time the process is halted. Then the process get on it get to normal levels on both processors.
Bosse11-01-2006 11:25 AM
@Nishant wrote:
the other one doesnt have any kind of wait and it has comparitively high load rather than everybody, so could it become problem? Is there any requirement of wait in the while loop? if yes then why?
Yes, place a short wait within this loop as well. The value can be as low as 5 ms (also try 10 ms). This one can be choking the other loop by hogging the processor. Also make sure that there is a valid trigger to stop the loop. While debugging, you can insert a timeout case
Ray
11-01-2006 09:58 PM
Dear Ray,
But doin so, will it delay my execytion? bcos of sm big amount code and fetching the data from data acquisition card we are already in a bit delay, if this will add the delay, we ll be in trouble, that is why i am cautious about this thing.
Thanks,
Nishant
11-02-2006 07:37 AM
Hi Nishant,
I've read a post by Dennis where he mentionned that the delay could actually be as little as 0 ms. I haven't tried such a small amount myself 😉
T\Basically, the delay will allow the processor to share some resource for your other loop, so that it can execute as well as your OS (which is probably Windows). If you do not put any delay, you will get the impression that your entire PC has frozen up. If you are running Windoze, that is because it is not a Real-Time OS, thus it services routines on a priority / resource basis.
If your environment requires strict timing during execution, you may have to consider some alternatives. There may be some info in the Knowledge Base somewhere on this forum.. I'll have to go over the posts in this thread to see what you are trying to achieve. Otherwise, you may have to post the constraints that you have to work with so that we can propose something reasonable.
Hope this helps,
RayR