 K.Waris
		
			K.Waris
		
		
		
		
		
		
		
		
	
			04-25-2011 04:28 AM - edited 04-25-2011 04:29 AM
04-25-2011 04:39 AM
04-25-2011 04:40 AM
04-25-2011 08:54 AM
Hi there.
I had a problem with browser, now installed the latest version. Lets see if my message get posted.
I am after stopping producer and consumer loop with one stop button. Latch operation for stop button would not allow local variables added to do this operation.
I had attached in the message above snippet and vi. Any thoughts on that?
Kind Regards
Austin
 johnsold
		
			johnsold
		
		
		
		
		
		
		
		
	
			04-25-2011 09:13 AM
One way is to send a Halt command to the consumer loop via the queue. After the code executes the Shutdown case, wire a True to the stop terminal of the loop. For your system, you might consider separating the Shutdown and Error Handling into different states unless every error will force a shutdown. If an error forces a shutdown, then you need a means of notifying the Producer loop that the Consumer has shutdown.
Why do you have the Event structure inside a for loop set to iterate 10 times? To send anything to the queue the user would need to push the Confirm Input or Stop buttons a combination of 10 times before anything goes into the queue. To stop the loop the last of those ten presses would have to be the Stop button.
Lynn
04-25-2011 10:46 AM
Ya thats right.
I want user to hit Input everytime he enters the new value. When he added ten values, the mode value is calculated and displayed with the whole array of ten elements. I am just implementing everything coming in my head and refining Labview skills. I want to sit in both the test for CLAD and CLD same week. What is the best way to prepare?
Kind Regards
 JohnCS
		
			JohnCS
		
		
		
		
		
		
		
		
	
			04-25-2011 11:27 AM
Instead of sending the input value in the queue, try sending the enum each time a button is pressed. Read the input value in the acquire case and decide if you have enough values or an error. Read the stop button in the shutdown case. No variables required.
 johnsold
		
			johnsold
		
		
		
		
		
		
		
		
	
			04-25-2011 11:34 AM
Before you sit for the exams make sure you understand dataflow and how the event structure works. There are several threads on the Forums (this one and in Breakpoint) about preparing for the exams.
Turn on execution highlighting and run your VI. Try to stop it after three data points have been entered.
Lynn