 6826PN
		
			6826PN
		
		
		
		
		
		
		
		
	
			04-03-2011 07:22 PM
Dear All.
I have 2 application progrlams in the same block diagram. the intention is to use the 2 programs at different excuting time for different application, and each have stop and start button ofcourse i will have master stop. But when i run the program, it only works one program at time , that is the 1st block which i make it active only , when i tried to make active the second block it will not work, only works when i stoped the1st one. So, this it to request ur hlep how can i solve my problem. here i have attached some of my program.
Regards!
Solved! Go to Solution.
04-03-2011 08:16 PM
Dear All ,
From my program what i need is to run both blocks at the same time or for different time durations and i can make ON/Off one of them any time i need to. operate.
Thanks
 egraham
		
			egraham
		
		
		
		
		
		
		
		
	
			04-03-2011 09:34 PM
Just glancing at the block diagram, it appears the way this will work is once one of the inner two loops stops it can't be started again until the other loop stops.
It would require another iteration of your main outer loop and that can't happen until both inner loops stop. If loops are running inside of loops that prevents the outer loops from continuing to run if the inner loops are running.
What is it you are trying to do? There is probably a better way to implement this if you can describe what it is your'e trying to do.
Eric
 egraham
		
			egraham
		
		
		
		
		
		
		
		
	
			04-03-2011 09:39 PM
By the way, if you want two loops to run at the same time, just do this.
 egraham
		
			egraham
		
		
		
		
		
		
		
		
	
			04-03-2011 09:41 PM
Actually, you need a Not to reset your stop switch....
04-03-2011 09:43 PM
Thank you veery much Egraham. I tired it like this and it is ok!
But i have one more Question. I have cDAQ with three Input modules , can i use those three modules in different three loops.
Thx.
 egraham
		
			egraham
		
		
		
		
		
		
		
		
	
			04-03-2011 09:59 PM
Usually you set up a task that has all the channels from all the modules configured. When a loop starts it reserves that task and the cDAQ can't be used by other loops unless you start and stop tasks.
You can have one loop acquire all the data and if you want certain channels to go to other loops you can use the producer/consumer design pattern. If you wanted a third loop you would add another queue and the third loop would dequeue that data. See attached.
Eric
 Marty_H
		
			Marty_H
		
		
		
		
		
		
		
		
	
			04-04-2011 02:55 AM
Hi,
What is the stop (looks like a house symbol) on the second loop? I have never seen this and I can't find it anywhere.
Thanks
 PaulieQ
		
			PaulieQ
		
		
		
		
		
		
		
		
	
			04-04-2011 04:20 AM
Marty,
It's a local variable in Labview 2010.
Paul