LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

App builder and simultaneous loops

I have a fairly simple program that has 2 loops which run in parallel. One loop is just concerned with controlling the visibility of some controls depending on the state of some buttons. The other is the main program loop, which spends most of its time waiting for the user to hit a (different) button to start a process.
Works fine in Labview. When I create an .exe from it, the visibility control loop executes, but the main loop never executes. Even the initialisation file-access functions that link into the main loop using the error cluster don't execute. It just seems to be stuck in the first loop.
I created a test vi with just a couple of simultaneous loops flashing lights, and that executes fine when built into an .exe. I'm usin
g wait-for-ms-multiple to reduce the loop speed, so it's not due to one loop hogging processor time. Any ideas, anyone?

I'm using LV 6.1.

Chris
0 Kudos
Message 1 of 4
(2,838 Views)
Hi Chris,

have you checked yout pathnames for any ini files you're loading. Bear in mind that while it might work to strip one level from the current VI path and then append the ini file name as a VI, as an EXE, you need to strip the path twice.

Current VI path as VI = c:\myvi.vi
Current path as exe = c:\myexe.exe\myvi.vi

This same thing happens with LLBs, just as with the exe.

If your paths are wrong, maybe one loop really isn't executing, or maybe quitting early on an error message.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 4
(2,838 Views)
Shane,

That's uncanny. You described the cause of the problem exactly.
I have a vi called Strip2Home which is supposed to strip off elements of the vi's path until it reaches a directory. However, it had a fault which caused it to get stuck in a loop if it had to strip off more than 1 element.
So actually 2 loops WERE running simultaneously...

Thanks for the pointer,

Chris
0 Kudos
Message 3 of 4
(2,838 Views)
Hi Chris,

Sounds like you've fixed the problem but if your still having trouble with this or you would like further suggestions, if you attach the code for the vi I could take a look.

Lilly
0 Kudos
Message 4 of 4
(2,838 Views)