08-30-2008 03:39 AM
08-30-2008 04:33 PM
08-30-2008 07:16 PM
08-31-2008 02:47 AM
Thanks, altenbach.
I comfirmed that contents of question.zip are same as my question20080829.tar.gz.
I'm a Linux user, so I normally use .tar.gz, but I'll use .zip next time.
And I used LabVIEW 8.6 in my question. I forgot to write the version.
09-01-2008 04:27 AM - edited 09-01-2008 04:34 AM
I tried LabVIEW 8.5.1 on my own PC (Intel Core2Quad Q6700, Windows2000 SP4 on VirtualBox1.6.2 of Ubuntu Linux 8.4.1).
Then it also showed the same behavior.
09-02-2008 04:06 AM
I tried to check times to call sub.vi by Tick Count in test.vi. I attach them as question20080902.zip.
The result is profile20080902.png attached.
In test.vi, Counter is a number of times that are over Threshold.
Then, Counter was 0, but a longest time of sub.vi was 15.6ms.
Why didn't Counter detect the longest time?
09-02-2008 06:32 AM
I show a profile of my research program as profile_of_research_program.png.
I hid my VIs' names and I added English name of profile data by red letters.
Some VIs' longest time are same 15.6ms.
Some VIs include other VIs whose the time are 15.6ms, but VIs whose Sub VI Time are 0.0ms don't have sub-VIs.
And their VI Time is about an integral multiple of 15.6ms.
46.9/15.6 = 3.0064...
125.0/15.6 = 8.0128...
156.2/15.6 = 10.0128...
31.2/15.6 = 2.0
109.4/15.6 = 7.0128...
62.5/15.6 = 4.0064...
Therefore, it seems that the 15.6ms sometimes occurs and makes delays in my program.
I think this is LabVIEW's bug and it's too fatal.
09-02-2008 07:03 AM
Why do you suspect it is a problem with LV? How are you measuring the time to access the sub-vi's? Is the code (in the main VI) leading to the sub-vi calls doing other tasks in parallel up to the sub-vi call? I'm trying to think of a better way of describing in words what I mean..
I'll try to describe it with an example:
MAIN VI:
Contain a While Loop that does functions-1.
Contains a second while loop that does functions-2 and runs in parallel to functions-1.
Contains other functions and or sub-vi's that run in parallel to the two While Loops.
Inside functions-2, there is a sub-vi call.
Before the sub-vi call within functions-2 (While Loop), there are other VI's doing functions that will pass parameters to the sub-vi.
Everything executes in parallel, between the loops and the function(s) outside the loops). The CPU executes the last vi before the sub-vi call. You take a timestamp.. Because there are parallel processes (especially on a single core computer), the CPU does a context switch to the ofther functions handles them (which takes a bit of time), an then returns to the sub-vi in functions-2. Time has elapsed before the call actually takes place... which is normal..
One way to verify what I am describing is to run your main vi with Highlight Execution turned on and you will see the dynamic events that take place. Also try to run it several time, because if there are parallel processes, they may not occur in the same order.
Remember that Labview uses dataflow to determine what executes next. When data is available, that portion of the code will execute.
Hope the description above helps..
R
09-02-2008 08:58 AM
I certainly use multi While Loops in my research program, but there is only one While Loop in test.vi shown in profile20080902.png and etc.
Therefore, the problem isn't caused by a parallel processes.
09-02-2008 11:32 AM
Let me try to understand your question: so you are worried that sometimes it takes a few ms and sometimes 0ms, and you want a reliable way to always execute the subVI is sub-ms time.