LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My LV602 application works for weeks in development system, but the executable hangs at multiple places, I do use correct .ini file, who has experience with this?

Hi, I have an 800 VI LV6.0.2 app that literally runs for weeks without break on either NT4SP6 or W2K. It uses various ActiveX's, GPIB, and dll's, plus serial communication. However, it only runs in the development system. If I compile it into an executable, this executable hangs during the initialization of the program. First it would not execute a fast while loop somewhere deep down in the program. I fixed that by putting a bogus wait(0 ms) in the while loop! This is reproducible. Take the zero wait out, problem reoccurs, but only in the executable. Having fixed that, now it hangs on GPIB calls 5 sec further
down the line, again calls that work perfectly well when running in the development system on the same machine. Anybody noticed these or other incompatibilities between development system and executable for LV6.0.2? This is very annoying as I now am unable to deliver to my customers.
0 Kudos
Message 1 of 3
(2,437 Views)
Hi,

always place a Wait function (5-10ms) in while loops when you work in NT or W2K,otherwise the OS tends to allocate all resources to make the loop run as fast as possible at the expense of other processes.
If you have more while loops running in parallel (at the same time), consider using syncronization functions: occurrences, notifications and so on.In a huge application a process should execute only when needed.
Finally, in LV there's the multithreading configuration of parallel processes: you can assign a priority during execution to each process (vi-subvi).
You can refer to the multithreading documentation, and if you want some more detail I suggest this book: LabVIEW Advanced Programming Techniques by Rick Bitter, I bought it on Amazon.com

Let me know
if you need more help.

Good luck,

Alberto
0 Kudos
Message 2 of 3
(2,437 Views)
Hi Alberto, I am aware of these issues. However, in my case, this loop ought to run fast. My issue is that in the executable, the loop is not being executed at all, even though at that early stage in the program I have nothing in parallel. I found the loop to NOT EXECUTE under both NT4 and W2K. I isolated part of the program, made an executable and the problem remained. Then I made an executable of the problem VI as toplevel, and problem is gone, so it only exist when run as subvi with no async functions.
Again, when running in the development system, the loop executes fine for all OS and any complexity of the surrounding program. The wait(0) fixed this loop, so apparently this forced the labview scheduler to do something different, but there must be a thousand
while loops in the program and I don't feel like checking them all.

Regards,
0 Kudos
Message 3 of 3
(2,437 Views)