10-05-2007 12:24 PM
10-05-2007 12:55 PM
10-05-2007 01:28 PM
Thanks smercurio, The XOR merely flashes the LED (boolean) on the front panel to see if it is being scanned. It changes state each time the loop is executed. Just for troubleshooting.
Each case statement has a while loop in it, which is kept running by the state of the tab control. Perhaps this is not the best architecture scheme to use for this, but I would like to select a tab, and then continually run a while loop only while I am in that case . If I had Ver. 8.5 (waiting - said to be sent on the 10th), I could perhaps use a state machine for this. There should be a way in 8.2.1 though. One question: Is there an event fired when I enter or leave a case? I could perhaps use that to stop the while loop from running. Another question: When you enter a new case, when does the while loop start to be scanned. Why does it continue to be scanned when I go to another case? What automatic ways are there to automatically stop the while loop when I leave the case it is in?
Thanks again.
10-05-2007 01:36 PM
10-05-2007 01:56 PM - edited 10-05-2007 01:56 PM
Message Edited by Dennis Knutson on 10-05-2007 12:57 PM
10-05-2007 02:28 PM
10-05-2007 02:31 PM
10-08-2007 09:01 AM
Thanks everyone for the help! I guess I didn't make myself clear, and used a poor example. I understand about the dataflow. I am attaching an example of what I need to do. There is one primary application While loop. On the Front Panel is one big Tab Control. On one of the pages (in the example - page 2) there is a stop button to stop the entire application. This works OK as shown. My real problem is stopping the multiple while loops that are in each case statement as I leave the case and go to another case (ie. select a different tab page). I need to do this automatically without using a push button. The 'or' as shown using the property value for the Tab Select does not work correctly. If I change tab pages, the while loop for the previous page continues and does not stop. I think this is because it never sees the value of the tab change, so doesn't know to stop. This is why I was wondering if there is an event that fires when I leave a tab page. Maybe this is not a good architecture for this. I am open to suggestions. I just started using LabVIEW about 3 months ago, so am still learning.
10-08-2007 09:47 AM
10-09-2007 08:05 AM
smercurio,
Your loop test works OK. I see that my actual program is hanging up on one page called the "documentation" page. Here I can select from an array of .pdf files to view. The viewing, and selection works fine. However; the program hangs like it is waiting on the event structure to process something. I thought that if there were no events, that it ignored the event structure, and kept the while loop going waiting for an event. I am sure you can tell me right away what my data dependency is that is causing me trouble, but with my lack of experience, I can't see it. Let me know what you think. The LED says it is stlll on the document page, but the tabs show I am on another page. The Tab Select input is still "document", and I am not updating the 'seconds' on the clock (in the main application while loop) either.
Thanks