LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application pauses for up to 4 seconds at random places in processing loop.

Please post an image of the performance tab of the task manager when the hits occur.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 41 of 55
(1,437 Views)
There may have been an ah ha! moment, but I don't know what to do with it. First, some pictures:



Above is the Task Manager during a lock up.



This is probably more useful. I made two little programs that share a queue. This is a very basic version of how I move data in my program, though it is running on another computer. What I have done in the image is to right-click the task bar tab of one of the vi's. I did this, then clicked off of it, and then right-clicked again. That is why there are two periods of high CPU usage. As you can see, this causes CPU usage to jump. What you can't see is that the programs themselves stop updating. I think this is some kind of OS issue. So my new theory is this: Something Windows is doing is causing an interrupt issue. In this little example, there are only two loops. In my program there are ~15. When all 15 loops go into this mode, it maxes the CPU leaving basically nothing left for calculations. This causes the FFT to take a REALLY long time. Once it is done, Windows gets itself straight and everything gets back to normal. The reason it is happening less is because I zero-padded my data and the FFT is faster, thus there is less of a chance this interrupt will happen while its calculating.

Now, the important question: Is there something I'm doing wrong with the queues? Is there another option for handling my data?

I finally think we're getting close on this.
0 Kudos
Message 42 of 55
(1,421 Views)

Please go through my check list and verify you have followed all of those recomendations before you go any farther. Virus, network, priority,indexing can all cause what you are showing me.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 43 of 55
(1,418 Views)
I have double checked a couple of times. There is no virus checker installed. There is no ethernet cable connected and the network is disabled. Even the firewire port was disabled (it shows up as a network port). Indexing has been disabled on all drives and sub-folders. Priority of LabVIEW is set to high. The only processes running are the default Windows processes, NI processes, the video driver, and the audio driver. This is a newly built computer with a clean Windows install, not a consumer model with a bunch of crap-ware. The only programs installed are NI stuff, MS Office and drivers.
0 Kudos
Message 44 of 55
(1,405 Views)

OK looking back and regrouping.

First we should stick with your applicaiton. THose examples pumping queues without reading them may be page faulting trying to allocate more space for the queues.

IN your app you decided that FFT was the the big hitter and padding the FFt to an apppropriate size helped.

Is the size of the buffer being passed to the FFT the same size?

We need to focus on what is hitting your app. Performance in LabVIEW is a delicate topic and trying to solve all performance issue in one thread is like chasing butter-flies.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 45 of 55
(1,394 Views)
Another ah ha! The odd interrupt thing I was describing yesterday doesn't happen on 8.2 or 8.5.1. I tried to demonstrate it to another LabVIEW programmer here on his machine and it wouldn't do it, so I went back to my machine and tried it again. The same program (Queue Basics.vi sample) on the same machine will hang in 8.5 when right-clicking, but will not hang in 8.2. I will try updating the system I'm running my software on to 8.5.1, or maybe running it on 8.2 and see if the problem goes away. I will also check out the release notes for 8.5.1. I'm keeping my fingers crossed.
0 Kudos
Message 46 of 55
(1,369 Views)
Bad news: 8.5.1 does the same thing. When the other programmer said it wasn't doing it on his machine in 8.5.1, he wasn't pulling up the right-click menu, he was just holding the right-click button down. 8.2.1 does the same thing. The only version I have access to that doesn't do this is 8.20. I'm tempted to install 8.20 on my test system and try my program that way. I don't really see another option at this point. I compared my options settings between 8.5 and 8.20 on my machine and they are as much the same as they can be with the different options available in each version. I may be chasing ghosts, but I have no where else to look right now, and the behavior matches almost exactly. Could someone else verify this behavior? I've gotten it on 5 different computers now, so I doubt its just me. I've attached a very simple vi that will show the behaior. It doesn't have queues, or anything else. It's a while loop with a button, a random number with an indicator, and a 250ms wait. Its saved in 8.20. You can look at the screen capture from earlier to see what I mean by the right-click menu on the taskbar.

0 Kudos
Message 47 of 55
(1,359 Views)
Wow. That is really bizarre. Usually running at around 1%, jumped to 55% when I right clicked one of the VI task buttons. Once I click anything else goes back to 1%. To get it to jump back up, I had to click on a task button other than one of the VI buttons then right click a VI button. Very bizarre.
0 Kudos
Message 48 of 55
(1,351 Views)
I concur.  I see this behavior on Win XP Pro with LV 8.5.1.  I would think this has to be classified as a bug, it seems to just freeze up all operation of the LV program running.  Turning on Highlight execution shows that no code is running while the shortcut menu is up on the taskbar.  It doesn't matter whether the taskbar item is for this VI or another VI even if the other one is not running.  No problems seen with non LabVIEW taskbar items.  If the taskbar item is LabVIEW Help, there is no problem.
0 Kudos
Message 49 of 55
(1,341 Views)
Here's an update: I installed 8.20 on my test machine and saved my program for it from 8.5.1. I had to take one thing out (the 3d text geometry wasn't in 8.2) It's been running for 2.5 hours now without a hong up. In 8.5 it would have had at least a few freezes by now. I'm going to leave it running over the weekend, but right now this is the longest it has ever run without error.
0 Kudos
Message 50 of 55
(1,316 Views)