LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

processor usage 100% after bulding an application

Hi,

I've got a pretty urgent problem.

I have a quite large application which I reworked a bit to have better code recently. Everything runs fine in the development environment. But after building an application the cpu usage goes to 100%! If executed in the development environment the cpu usage is most time lower than 5%.

I tried to remove as much code as possible. Now there's just some initializational stuff and an event structure left, which does nothing almost all the time. All things (updates of controls) which could use the cpu, I removed!

I don't know where to look now and what to test...

Thanks for any hints,
Carsten
0 Kudos
Message 1 of 10
(3,408 Views)
NOt much info to go on here...

I have read about the the strict typdefs getting disconnected in a build. This could have negative effects on strict type def'd constants in the diagram that are used to "throttle" your code or configure it.

There is an INI files setting that shuts this down.

Another approach would use normal constants on the diagram that feed "bundle by name" nodes.

Just my first thought, tyring to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 10
(3,408 Views)
Ok, I added many typedefs (because changing a structure works out more nicely throughout all the VI using those structures), but none of them is strict...

Thanks for the hint.

Carsten

PS: I forgot to say that I use LV 7.0 still (German version).
0 Kudos
Message 3 of 10
(3,408 Views)
Setting

BldApp.RemovePolyVIsandTypedefs=False

in labview.ini doesn't help.

Unfortunately I can't give you better information because I don't have any as I can't debug a built application easily.

Carsten
0 Kudos
Message 4 of 10
(3,408 Views)
Could you post the "stripped down" version?

Maybe I or others can spot something.

Still trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(3,408 Views)
Well that's still pretty difficult. I'll try to strip heren and there further...

What I really don't understand why the hack it does work OK in the development environment and just uses so much cpu time after being built as application.

Thanks for your help. I think I'll continue tomorrow.

Cheers,
Carsten
0 Kudos
Message 6 of 10
(3,408 Views)
OK.

One more wild guess.

This application does not use VISA by any chances, does it? I have seen lock issues when opening FP that have a VISA resource control on the FP. Just a guess.

I will watch for your post in the AM.


Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 10
(3,408 Views)
What I usally do is if there is some while loop in there that is mainly for graphical purposes or somthing to just wait on an event, i throw a little 30ms wait time in there, usally helps quite a bt or else the cpu will run at full speed, and easily eat up 100% of an application.
0 Kudos
Message 8 of 10
(3,408 Views)
So I found the culprit!

First we did want to implement some user control. So I included the security UI of the DSC module. In my changes it wandered into a sub VI of the initilization process -- but as it activates the security features of a front panel, I suppose it should be located on the block diagram of the main VI! And that works. If I move it back to my main VI, all is OK. (Well I'll remove it as we don't need this feature anymore.)

So actually it was really the initilization code. And now I understand too, why it worked in the development system. I suppose that the dev system loads theses function and by that this VI doesn't have any impact.

Thanks for all your help.

Cheers,
Carsten
0 Kudos
Message 9 of 10
(3,408 Views)
Thanks for the update.

You have saved me the same headache somewhere in the future.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(3,408 Views)