02-09-2007 09:50 AM
02-09-2007 10:45 AM
02-09-2007 01:51 PM - edited 02-09-2007 01:51 PM
Hmmm still can't seem to figure out how to get semaphores to limit each vat to 1 barrel at a time. While the NI examples do show how to use semaphores, I can't find anything quite like what I am trying to accomplish. All the examples restrict usage to 1 subVI at a time or one section of code contained in a loop. There isn't one that shows how to properly "protect" particular values (vats in my case) in an array.
-- Matt
Message Edited by LabViewNubie on 02-09-2007 01:52 PM
02-09-2007 02:25 PM
02-09-2007 03:07 PM - edited 02-09-2007 03:07 PM
Message Edited by LabViewNubie on 02-09-2007 03:08 PM
Message Edited by LabViewNubie on 02-09-2007 03:10 PM
02-09-2007 03:27 PM - edited 02-09-2007 03:27 PM
Message Edited by LabViewNubie on 02-09-2007 03:29 PM
02-09-2007 03:35 PM
02-10-2007 12:23 AM
Hi Matt,
Be careful! In the scheme you proposed, two barrels may want to move to the same [empty] vat at the same time - and they could both decide it was safe to move there.
I liked Lynn's suggestion of having a semaphore for each vat. Keep them in an array, either pass the array to the barrels on launch, or have this Semaphores-array in a Global. Force Barrels to acquire the specific Vat-semaphore before issuing the Lift's move-command. I'd have the Lift-driver release the semaphore as it unloaded a Vat. I'd also make the lift smart-enough to know when a vat was occupied - and raise an alarm if it received an illegal move-command.
... not that that could ever happen!
Cheers!
02-12-2007 09:52 AM
02-12-2007 11:33 AM - edited 02-12-2007 11:33 AM
In fact, the search string " +labview +semaphores +array " on google brings up this very thread as the first two responses. Crazy internet tubes!
So is storing semaphores in an array not something one typically does in LabVIEW?
-- Matt
Message Edited by LabViewNubie on 02-12-2007 11:35 AM