LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queues in application made with application builder don't work?

(Labview 2011) I have a medium sized application that runs just fine within the Labview environment. It uses event trapping for most things and passes longer tasks off to a consumer loop using a queue. Having gotten it to run the way I want, I want to use the application builder to turn it into a stand alone exe that can be distributed. It compiles without any errors or warnings and starts up fine. However, anything that happens via a queue doesn't work. The very first thing that should happen within any of the queues is that it should disable and grey out certain buttons to prevent unwanted behaviour. They don't get disabled and greyed out. So it's pretty clear nothing gets started. The queues also all have error handlers and there's no peep from them. Everything that doesn't use a queue works OK. Is there some kind of option in the application builder I need to activate to get the queues to work properly? The consumer loop does use an enum to figure out what it should do. On the off chance that the queue was mistakenly running the default (blank) case, I stuck a message box in there to warn it was being accessed. No message comes up so there is no indication that it is running the queues at all. The program doesn't hang when it should be running a queue. It just doesn't do what it should. ANy help would be greatly appreciated.

0 Kudos
Message 1 of 6
(2,528 Views)

Strange. All I can say that I use queues in most of my built applications and they work just fine without any special tricks.

 

Can you reduce it to a very simple project that still shows the problem and attach it here?

0 Kudos
Message 2 of 6
(2,520 Views)

The same here. I have used queues in my application with LabVIEW 2011 and I didn't have any problem. I am curious to see how queue is intialized and used in the design.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 6
(2,515 Views)
Are you sure it's the queues? Do you chain the error wire from somewhere else through the obtain queue at startup? Maybe you're using a VI property or method that isn't supported in an executable so it returns an error, and that error propagates and prevents obtain queue from creating the queue.
0 Kudos
Message 4 of 6
(2,495 Views)
Thanks for the replies. The answer is a bit bizarre, but might be useful to know. Apparently, in some of the cases in the event structure (producer loop), the Boolean value that gets wired to the stop control in the surrounding while loop was missing. In the Labview environment,this didn't cause a problem (default value?), but in the application it did. Making sure they were all fixed made the issue go away. Interestingly, which events were missing the Boolean and what didn't function were not correlated. The program never got hung in the event loop I.e. the interface didn't freeze.
0 Kudos
Message 5 of 6
(2,481 Views)

@rossu wrote:
Thanks for the replies. The answer is a bit bizarre, but might be useful to know. Apparently, in some of the cases in the event structure (producer loop), the Boolean value that gets wired to the stop control in the surrounding while loop was missing. In the Labview environment,this didn't cause a problem (default value?), but in the application it did. Making sure they were all fixed made the issue go away. Interestingly, which events were missing the Boolean and what didn't function were not correlated. The program never got hung in the event loop I.e. the interface didn't freeze.

This does not make any sense either. There should be no difference between development and build. Most of my output tunnels of event structures are only wired in the non-default situations. I suspect there was maybe some corruption and changing the tunnels forced a recompile, clearing things up. No way to really tell.

0 Kudos
Message 6 of 6
(2,471 Views)