10-20-2009 05:48 AM
Its an odd problem, but i've noticed it a few times with some of my programes.
When i run a programme it sometimes runs slowly if i have alot of windows open, or the cpu is split between half a dozen tasks it makes labview run slowly.
But ocasionally it runs slowly for no desernable reason. Even more oddly, i'f i hold down the scroll bar on the right hand side, it runs faster. i let go it slows down again.
does anyone have a clue about this??
does holding down the bar stop graphs refreshing or somehow speed it up?
I can sometimes get rid of the effect 'shake it off' if you will, but opening the back panel while it is running, and then closing it again. Full screaning and windowing sometimes shakes it off to.
i really am confused about this, the slow down is significant, possibly even about 10 times slower (i managed to run half of a loop in slow and half in full and it was about 10 times the difference.)
10-20-2009 07:18 AM
What is the program doing? What is it's function?
How was the code implemented?
There could be an explanation, but we would need to see the code to determine that.
I have never seen code running faster by moving a scrollbar. Well.. except maybe for some MS applications 😉 LOL!!
10-20-2009 07:36 AM - edited 10-20-2009 07:39 AM
Ray.R wrote:
Well.. except maybe for some MS applications 😉 LOL!!
Burst of laughter, actually... ! LOL !!!
To be serious, I ve seen LV getting slowed down drastically when holding scrollbar, not of the VI's itself, but the scrollbar(s) of updating Table controls/indicators.
10-20-2009 07:36 AM
Do you have wait timers in your loops? It sounds like Windows is setting the priority of the open windows, and when you click on the scrollbar, that tell Widows to prioritize that program (i.e. it is foremost) and thus it runs more like you expect.
10-20-2009 08:09 AM - edited 10-20-2009 08:09 AM
Hi, sorry i can't post the code a.t.m becasue it is running a 'rendering' and will be doing so for another 24 hours (i can stop it but that would mean fiddling with it to get it to do the work i want it to), so lets tick them off:
* What is it doing: very simply structure wise: 7 stage stepped sequence, each has a for loop and 3 of them have shift registers on them.
* It actually speeds up when i hold the side bar, not the other way around
* There are no wait timers at all, no timing functions except 'read time interval to give me my stop and start time to file.
* This is a recurring think with alot of my VI that involve long running times. Could it actually be linked to a cumulative build up of images in memory or something?? - that was an old problem i had.
I'll psot the code in the next few days, but getting it to run would involve putting 52 mb of excel files somewhere to run it as i do.
10-20-2009 08:10 AM - edited 10-20-2009 08:12 AM
Ray.R wrote:
I have never seen code running faster by moving a scrollbar. Well.. except maybe for some MS applications 😉 LOL!!
How many years you working with LabVIEW? I have seen this many times. Usually happened if you have property nodes in cycles (or other elements executed in UI thread).
For example,
Run this code - you will be surprised:
I've got here exactly opposite effect - when mouse pressed, then code slow (35000 iteration/sec). When released - approx 55000 iterations/sec.
But if one piece of the code running more slow, then another piece of the code may be faster, isn't? 🙂 🙂 🙂
Andrey.
10-20-2009 08:14 AM
Andrey Dmitriev wrote:
I've got here exactly opposite effect
I think this is what Ray has mentioned earlier.
10-20-2009 08:17 AM
Thank god i'm not the only one. I'd mentioned it around the office and all i got was weird looks.
I have a property node in the cycle, infact i have three.
Its a really odd effect.
Any ideas of a way of combatting it? or smoothing over the probelm.
The only ways that i have found is to open the back panel, and close it again. Or maximise the front panel and then window it again. it seems to jurk it out of it again.
Weird.
10-20-2009 08:20 AM
Actually i don't have property nodes, i'm using three invoke nodes to grab an image from a 3d graph.
.....maybe property nodes slow down when mouse is clicked, and method nodes speed up when when the mouse clicks?
anyone else seen it?
10-20-2009 08:30 AM
John Pierson wrote:Actually i don't have property nodes, i'm using three invoke nodes to grab an image from a 3d graph.
.....maybe property nodes slow down when mouse is clicked, and method nodes speed up when when the mouse clicks?
anyone else seen it?
May be it happened by invoke nodes too. In general try to remove all things, which executed in UI thread. Property nodes, invoke nodes, references, CIN and DLL calls in UI Thread. Remove these functions step by step and see when speed of your application will be independent from mouse actions.
Refer to Multitasking in LabVIEW
Andrey.