02-06-2007 10:16 AM
02-07-2007 12:43 AM
Hi Matt,
I think a single queue solution might work very well. You might implement each "Barrel" as an independent program (a reentrant VI.) When a barrel-program decides it's time to be moved, it sends a barrel-identifier, "From Vat#" and "To Vat#" to a Lift-driver via a Lift-command-queue. The Lift-driver need only go where it's told, pick-up the specified barrel, and deposit it where told.
The [reentrant] barrel VIs need not be permanent diagram objects (as shown in this example) they could be launched dynamically and will run completely independently of where other barrels are in their processes. This example makes no attempt to deal with resource scheduling! (given a limited number of "slots" per vat...)
Cheers.
02-07-2007 07:53 AM
02-07-2007 10:26 AM
... I'll carve your name into my desk as a tribute or something
02-08-2007 01:20 PM
02-08-2007 02:42 PM
02-08-2007 03:24 PM
Hi LVNube,
A "cleaner" solution might be to launch the Barrel VIs dynamically "on-demand" so to speak. Search examples and subjects re: "VI Server". Running VIs "dynamically" is a very common practice - though less so with re-entrant VIs. You'll want to create a VI that takes the Index, Occurrance, and Queue as parameters and launches an "instance" of Barrel.vi - which will then exist in memory - but nowhere on a diagram. In this case it will probably be good for each "Barrel" to have a unique "Quit" occurrance. Note: LV8.0 or 8.2 introduced user-definable class objects which offers another (similer) solution to your application, but my experience with these tools is Nil.
I'd like to help more but can't until much later.
02-08-2007 03:33 PM
Thanks again tbd! I'll read up on that and do some homework on it tonight. I didn't fully understand the advantage of dynamically loading VIs until your last post. I was assuming the sole purpose of them was to save room in memory.
I'll also try my global variable idea out. Everything ON PAPER or IN MY HEAD always seems so easy until I get to coding it. I guess as they say, "the devil is in the LabVIEW details".
-- Matt
02-08-2007 04:05 PM
02-09-2007 09:19 AM