LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why does my executable runs at different computer using 100% CPU resource?

I created the executable file from Labview 8.0. When I run the executable at different computer, the executable uses 100% of the CPU resources.
DId i do something wrong during executable build? Has anybody ever have this experience?
 
Thanks,
Aristo Wibawa
0 Kudos
Message 1 of 8
(3,059 Views)

Sounds like you need to add some pause statements to your loops (While and For).  A small pause like 20 milliseconds will make a difference.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 8
(3,051 Views)

Matthew, thanks for the reply. Yes, I have 12.5 ms time delay to my while loop.

Here's what i suspected, the spect for computer #1 (development computer) is Pentium 4 with 2.4 GHz and 1 GB RAM. While the spec computer #2 (where the executable run) is Pentium 3 with 1.2 GHZ and 256 MB RAM.

Do you think this will create problem?

Thanks.

 

0 Kudos
Message 3 of 8
(3,034 Views)
That all depends on what your application is actually doing. Are you doing data collection? Are you accumulating data? Are you parsing large files? Without further details it's pure guess work, and the reason can be anything.
0 Kudos
Message 4 of 8
(3,032 Views)
I'm not doing any data collection from the DAQ hardware if that's what you mean. All my application doing is capture user inputs from the panel, sends those data through serial port to another device and then receive data from that device every 12.5 ms, and also displays some data.
0 Kudos
Message 5 of 8
(3,028 Views)

Change your pause to 50 milliseconds.  That is 20 times a second that is plenty fast enough to get user inputs.  The alternative is to use the event structure that is available on more expensive versions of LabVIEW.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 6 of 8
(3,026 Views)
Yes, I actually have a 1 second derived from 12.5 ms to get user inputs. When i run my executable in the development computer, it runs fine eating up only 20% resources. I tried running the executable in to another computer (Pentium 4, 3 GHz, 512 MB RAM) and it eats up 50% of the resources (not as good as in the development computer). Therefore I suspected that the specs of the computer matter.
0 Kudos
Message 7 of 8
(3,002 Views)
Unless you are doing serious computations, You should design the program to only use a few percent of CPU on the average.
 
It seems your program runs at full bore. Could it be that the computer that uses 50% is a dual core chip and the one that uses only 20% a quad core? If your program is highly serialized and uses only a single core, that would explain the findings.
 
A loop time of 12.5ms seems fast, especially since you do two-way serial transfers, graphing, and UI. Can it even keep up with this on the slow computer? Did you ever measure the actual loop rate?
 
Can you show us some code? How much data do you transfer per iteration?
Do you run a tight "inner" loop without wait to poll for serial data, for example?


Message Edited by altenbach on 03-08-2008 10:07 AM
0 Kudos
Message 8 of 8
(2,979 Views)