LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have an labview application which takes around 50% of CPU usge but wen the same is running throgh code it takes only maximum of 12-16% can any body suggest me what might be the wrong.

Solved!
Go to solution

Wow. The only approriate things with this project is that most VI names end in "BS". I could not agree more! 😄

 

Why are there 100 duplicate loops, each only differing by an array index diagram constant and each running in parallel every 100ms. Wouldn't it be sufficient to do a single instance of that code and iterate over all array elements instead?

 

50% cpu sounds suspiciously like a single CPU core pegged at 100% on a dual core machine. Most likely they UI thread gets hammered with these millions of thread swaps. Could it be that the 12-16% is on a 8 core machine?

Message 11 of 36
(1,219 Views)

For fun, I am running VI analyzer on it. We'll see.... ok....It's been 4 minutes and the progress bar is still near 0%. This might take a while 😄

 

In the meantime, see also this comment.

0 Kudos
Message 12 of 36
(1,205 Views)

@smercurio_fc wrote:

 

 

But then, you have other problems with your VI:

  • Your diagram is WAY TOO BIG. This isn't an issue just with you - it's an issue for anybode else who tries to modify your code down the road, or to try and, oh, I don't know, help you with a problem that you might be having. 

 



Very rarely when I say "lol"do I actually laugh out loud. This time, though, lol.

0 Kudos
Message 13 of 36
(1,196 Views)

I think I saw some SQL operations in all this. Perhaps all this or at least most of job. Can be done by a clever SQL query and then writing this query result.To a table



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 14 of 36
(1,167 Views)

Kudos for making me realize that the monster I inherited is just a furry little kitten with teeny little claws and ity bity teeth. Yes they are sharp and draw blood but it is no Siberian Tiger! And kudos for the bravery and strength to work with such a beast! If you took the time to learn "the right way" you would be awesome.

 

Oh and kudos for the pretty front panel. My only advice is to realize it is a Siberian Tiger and cannot be tamed. Unfortunately the best thing is to start over again. If it does what you need it to do then just get a faster computer. You can try turning off debugging which may help some but then, well, you wouldn't be able to debug it. But I suggest living with it while you refactor rewrite your program.

 

[Edit: pretty front panel - NOT block diagram Smiley Very Happy (It's early)]

=====================
LabVIEW 2012


0 Kudos
Message 15 of 36
(1,122 Views)

@Steve Chandler wrote:

[Edit: pretty front panel - NOT block diagram Smiley Very Happy (It's early)]


Obviously, you have not looked at the front panel via the navigation window... 😄

0 Kudos
Message 16 of 36
(1,106 Views)

@altenbach wrote:

@Steve Chandler wrote:

[Edit: pretty front panel - NOT block diagram Smiley Very Happy (It's early)]


Obviously, you have not looked at the front panel via the navigation window... 😄


Oh dear! No I guess I didn't Smiley Very Happy.

 

Well the part you can see looks good.

=====================
LabVIEW 2012


0 Kudos
Message 17 of 36
(1,103 Views)

@altenbach wrote:

For fun, I am running VI analyzer on it. We'll see.... ok....It's been 4 minutes and the progress bar is still near 0%. This might take a while 😄

 

In the meantime, see also this comment.


So did this ever finish?

 

The OP seems to have abandoned this thread. Smiley Sad

0 Kudos
Message 18 of 36
(1,099 Views)

@smercurio_fc wrote:
So did this ever finish?


Yes, it only took about 10 minutes and ended up not looking too bad (relatively speaking, of course). Unfortunately, I used the default option and many analysis categories (e.g. about "value property use") gave up after five instances, while there were probably a few hundred more. 😄

0 Kudos
Message 19 of 36
(1,093 Views)

I actually got up the nerve to start looking more closely at the code. In fact it looks very easy to refactor. It apears to be nothing but a copy and paste job gone wild. LOTS of duplicate code. Maybe nothing but duplicate code? I only gave it a cursory look because changing cases or sequence frames takes far too long on my Core i7-920 quad core multithreaded 64 bit Windows 7 machine with only 6GB of ram.

 

It looks like all those loops could be replaced with a SubVI. Remove the property nodes from the SubVI and replace them with terminals or better a cluster of the data. Remove the loop inside the SubVI and put an instance in a for loop indexing on an array of clusters containing the data used by the SubVI. Put that for loop in a while loop and there is your main top-level VI. That might not be the best way but I obviously have not studied each detail of your code.

=====================
LabVIEW 2012


0 Kudos
Message 20 of 36
(1,089 Views)