03-24-2014 01:39 PM
I have a project that contains separate programs. In the past (for 15 years) I develop a "Main Menu" that uses a producer-consumer structure (events). The user selects "Program 1", event tells consumer loop to open "Program 1". Program one opens, tests are run, exit button returns user to Main Menu. All the separate programs are maximized, open front panel when called, closed when done, etc.
This is the first project I've done in LV 2013 like this and now it doesn't work. If I return to the Main Menu and re-enter Program 1, none of the operator buttons work, which are taken care of in an event structure/consumer loop also.
No variables are passed to/from the Main Menu. Each separate program uses the producer consumer structure with an additional 10 ms loop that reads/writes to DAQmx tasks. All tasks are stopped and deleted upon exist, the queues are closed.
I will continue searching for a solution in the discussion forums and knowledge base but if someone sees what I'm doing wrong, please let me know!
Thanks.
Solved! Go to Solution.
03-24-2014 01:42 PM
Post your code of it not working, then it can be debugged. Also you may want to look into adding debugging and EXE to help probe when the EXE is built.
http://digital.ni.com/public.nsf/allkb/8DA679805915DE40862572D5007B2F70?OpenDocument
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-24-2014 01:55 PM
I assume this is in the development system. Are the buttons completely unresponsive or do they still react to clicks, but nothing else happens. You said exactly the same code worked before upgrading. Is this correct? Were there any warnings when you upgraded? Did you install all drivers in the new version?
03-24-2014 02:49 PM
I'm trying to put together an example because my actual project is large and of course confidential (customer request). I had no warning when upgrading. The problem exists on my development machine and the executable on the customer's machine. The buttons switch but don't do anything. All the other tasks are working because I can see the analog and digital functioning.
I'll try to finish my example asap.
Thanks.
03-24-2014 03:32 PM
I put this little sequence in before I call the Initialization block and now it is working...I usually initialize all my variables in the Initialization block but for some reason this program doesn't like it. My producer loops check for "first time through" so they don't abort so I don't know why this had to be added.
Seems to be working but I'll run the whole project a couple of times to make sure.
03-24-2014 04:04 PM
This seems like a kludge, especially since you apparently don't know why it works.
My guess was a race conditions exposed by recompiling.
You better fully understand why it works, else we'll have the same discussion again when you upgrade to a new LabVIEW version in the future.
03-25-2014 09:29 AM
I've dealt with the race condition before and I thought all was good but as I said before I haven't used this method of a main menu with sub vis in awhile, I've been using tabs for the different screens in a control program. If I would have had more time I would have made this program the same but it was a do-over. I wrote the original program in Labview 5.0, then upgraded to 7.1, then upgraded to 8.6. This was before I knew how to use the producer-comsumer method so I re-wrote everything. Each of the 11 tests were too specialized to combine so I generated a "master" screen and read different text files to set up each particular test.
I have a little time so I'm going to keep investigating and "beating it up" just to make sure this was the issue.
Thanks.