LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Barrels of LabVIEW



@LabViewNubie wrote:

So is storing semaphores in an array not something one typically does in LabVIEW?


Apparently it's not something people like to admit. Smiley Wink

Yet another approach that may avoid semaphores (and the need to share them with Barrels) might be to have the Lift-driver decide whether it could accomplish a move-request, and if not, "save" the move for later.  I didn't suggest this before because (i think) it would make the Lift-driver significantly more complex and make it harder for a Barrel to know how long it's been soaking. Smiley Surprised

If you're insecure about all this, there are certainly other approaches - including ones that don't require reentrant VIs or semaphores - do whatever floats your Barrel!Smiley Very Happy

Cheers.

Message Edited by tbd on 02-12-2007 12:08 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 21 of 23
(904 Views)
Okay, I took the sage advice of johnsold and spend a week looking into state diagrams and working through some the issues that I would inherently run into with this project. I came up with a flow chart of what I want my program to do. I attached it below.
 
As a refresher, this program is to use a lift to move up to 3 different barrels at a time around to soak in one-barrel-at-a-time tanks for a particular length of time. There are only 5 different tank sequences that these barrels can take on and 1 barrel must be started with the option of starting a second and then a third barrel after the other barrel(s) are running through their sequence.
 
The big struggle I had was ensuring that the lift did not drop a barrel into a tank that already was occupied. I solved this in my flow chart through the use of semaphores, but realistically the odds of the lift dropping a barrel into an already occupied tank is really low since the soaking times are very similar and they occur in a similar order, with 10 minutes or so at least being between barrel launches. Still, a limit of 3 barrels at a time will be imposed. 
 
So anyways, I attached the flowchart I created. If anyone would be so kind, look it over and see if my logic makes sense. I need to add in an abort button, but left it off to help simplify the chart. Does this flowchart look like something to use a state machine for or is it too complicated for a beginning to code as a state machine?
 
-- Matt (Who is getting married this Saturday!)
 
 
 
 
 
Edit: Minor corrections to sentence structure and attached image as .jpg instead of .gif

 

Message Edited by LabViewNubie on 03-01-2007 03:34 PM

0 Kudos
Message 22 of 23
(861 Views)
Matt,

Congratulations! I am sure your mind is not really on vats and barrels right now.

The flow chart looks pretty good. Near the center is a "Check to see if any OTHER pickups are due..." with a TRUE output but no FALSE output. One of the really useful features of a flow chart is that it makes sure you have considered the results of every test.

The flow chart only seems to decribe Barrel 1. It is not clear how the other barrels and the interactions are handled.

Lynn
0 Kudos
Message 23 of 23
(824 Views)