LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.exe is very slow...

Hi all,
I've got a big problem concerning my program. I tested everything and all went fine. Then I created an executable file and some errors occured. When I open the front panel of a sub VI it takes a lot of time now, till I can change something on that panel. When I was testing it , it wasn't any problem, so the reason has to be the .exe. I don't know what might be the reason. Hopefully anyone of you knows why this is much slower now. Thx for your help
Greets Thomas
0 Kudos
Message 1 of 14
(4,116 Views)
Hi Thomas

There my be several things that slow down your application (e.g. dynamic array building, loops without time-delay, ...).

You should provide some more information or maybe code, so that the community can have a look at it and find things to improve.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 14
(4,106 Views)
I don't know how to add code. This was my first program with LabView. The thing I don't understand is, why is it running ok when i run it from LabView and why is it very slow when I create a executable. Shouldn't it be the same?
0 Kudos
Message 3 of 14
(4,092 Views)
Sometimes it's not the same.

The development environment of LabVIEW DOES compile code before running it, so from this point of view there should be no difference, I agree, but unfortunately an EXE will sometimes behave differently than a VI.

One example is the referencing of items in the same folder as a VI. A Vi will have the path \Directory\Vi.vi in the development environment, but \Directory\App.exe\vi.vi as an EXE. This can mess up all kinds of file functions.

In addition to this example, some VI server peoperties and methods only work in the development environment.

So as you see, it would indeed be useful if you could attach your code, or at least a picture of it (No BMPs please, their file sizes are too big) we can have a look to see if any of this applies to your code.

When answering a post, you should have an "Attrachment" field below your text with a "Browse" button where you can select a file to attach. This way you can attach your VI or a picture of your block diagram.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 14
(4,064 Views)
Now I made some screenshots of the subVI which is called during the program. When I was running it in LabVIEW I could immediatly change the settings, but in the exe I had to wait for about 10 seconds. If you also need the main VI where the subVI is called, plz tell me. Then I can add this, too.
Thx for all of your help...
Greets Thomas
0 Kudos
Message 5 of 14
(4,059 Views)
Data manipulation you are doing on arrays up to cluster building are repeated for each loop. This is not necessary. Take them all out of the while loop.
Also, put a Wait function (e.g. 300 ms) in the main loop. This structure is running at the maximum speed available and sucking out almost all processor time.
Both remarks apply wether you run in LabView or an executable.

Hope this helps.
Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 6 of 14
(4,044 Views)
Pincpanter is correct,

You really need a "wait until ms multiple" in the loop somewhere to make sure you're not tying the CPU up.

This is of course another area where EXE and VI can behave differently as the VI has the development environment controlling it, the EXE doesn't.

I think your problem will be solved with a "Wait until ms multiple" with a wait of, say 10 ms.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 7 of 14
(4,033 Views)
Hi again,
thx for all your help. But I still got the same problem. I now have a "wait for 10 ms" function in the while loop, but its still the same. It didn't really change the speed. I just attached my main vi (HP8714ET S11.vi) and the subVI (save tocuhstone.vi) which is called from this VI. So if somebody plz could have a look at that. I really don't know what to do else. Thx in advance.
Greets Thomas
0 Kudos
Message 8 of 14
(3,997 Views)
oops I forgot the attachement....
0 Kudos
Message 9 of 14
(3,996 Views)
Plz help....
I become desperate...
0 Kudos
Message 10 of 14
(3,987 Views)