LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application sometimes fails to populate front panel indicator array?

So I have two odd issues with my programs after they have been built into applications.  These all use state machines with one of the states containing an event structure.  This is the state all other states return to to wait for user input.  The button controls are all inside their event structure call too.  Again, this behavior only happens after I build it into an application and it is random when it happens.

 

One - Sometimes the buttons appear to stay pressed.  They still work, but they look like they are pressed.  You can see them toggle again when you press them again.

 

Two - This code runs a bunch of tests on product.  When done an array of the results are returned to be displayed on the front panel in an array indicator.  Sometimes, this array just doesn't populate.  When this happens, when you start another test, it populates with the previous results as soon as you hit the run test button which is odd because that has nothing to do with the results array.  It is almost like the front panel is just not updating

 

I do not have the "timeout" case wired in the event structure.  Do I need to do that to force the front panel to update?  Or do I need a small delay before returning to the event structure to await user input?  Again, this all only happens after it is built into an application.  In development mode it all runs perfectly.  It have this same issue across several of my programs, but they are all coded similarly with the state machine.

0 Kudos
Message 1 of 2
(1,933 Views)

If you have latch action buttons in your code, they wills stay pressed until the flow of code execution gets to reading them again.

 

Beyond that, we can't answer your questions because you failed to attach and code that demonstrates what the problems are.  If code runs correctly in development mode and not in a compiled executable, my guess is you have a race condition in there.  By any chance are you using/abusing local variables?

 

Attach code!

0 Kudos
Message 2 of 2
(1,927 Views)