08-18-2008 01:23 PM
Hi all,
I'm creating my first producer-consumer program, and I've run into a few problems. I have two producer loops (one is a pressure controller and the other is power reading loop). I've used queues to pass data into the consumer loop which records the data (at a much slower rate). The problem is that the producer loop (the pressure controller) contains the stop signal for the program. So I've had problems shutting down all 3 loops.
My questions are......Do I have to shut down the consumer loop first, then the producers? What is the best way to pass stop signals (local variables, booleans in a queue, etc)? Also when I try to use the producer loop to stop the other loops I get the attached error. Anyone have any recommendations for making an efficient stopping procedure? The wait inside the consumer loop is quite long (5 min), so I'd like the minimize the stopping time, if possible.
I've attached two versions that I've been working with. They use version 8.5.
Thanks in advance - Dan
08-18-2008 01:33 PM
08-20-2008 11:37 AM