Bill Nordgren
08-02-2007, 06:34 PM
Hi
I am new to Flexsim but not new to Simulation, I have used Witness extensively.
I want to simulate a gantry robot picking parts from a processor and dropping onto a conveyor. I intend to used the crane object.
However the problem I want to get round if possible is that when the gantry crane is over the drop off area on the conveyor it needs to take control of the conveyor and possibly wait in a hover position for a gap to arrive on the conveyor (there are other parts on the conveyor).
The drop off zone is controlled using photo eyes.
So my question is:
Is it possible to pause the crane mid-movement and execute logic?
Any Help is greatly appreciated
Anthony Timmiss
Here's one way I might do it. First, dispatch a tasksequence to the crane that was made up of the following task types:
TASKTYPE_TRAVEL (travel to the processor)
TASKTYPE_FRLOAD (load item from processor)
TASKTYPE_TRAVELTOLOC (travel to spot above the conveyor drop point)
TASKTYPE_CALLSUBTASKS (you'll want to read up on this tasktype in the help, but basically it provides an opportunity to execute code (usually in an OnMessage trigger that can decide what tasksequence (if any) to dispatch to the robot once the robot has finished the above traveltoloc task).Then in the crane's OnMessage trigger that is executed by both the callsubtasks task as well as by a photoeye trigger that fires when flowitems clear the "drop zone" on the conveyor, I would check whether or not the drop zone is occupied to determine if I create and dispatch another tasksequence to actually drop off the item onto the conveyor right then, or do nothing and wait for the zone to clear. This will probably require two photeye triggers on the conveyor one at the beginning of the drop zone and one at the end. When an item enters the drop zone, I could set a label called "occupied" to 1, and when the item exits the drop zone I could set it back to 0 as well as check if there is an item in the crane that was waiting for the zone to clear; if there was then I could send the crane a message that fires the same OnMessage trigger executed by the callsubtasks.
Good luck,
Cliff
Thanks Cliff I will give that a try you've understood what I want to do perfectly. Looks like I have a bit of reading up to do!
Thanks
Anth
have uploaded a small model that demonstrates a method very similar to what Cliff has explained above. Instead of the CALLSUBTASKS, it uses a SENDMESSAGE followed by a UTILIZE task. The OnMessage of a Dummy Queue is fired (instead of the crane) where the decision whether or not to free the crane to continue and UNLOAD is made. The zone Cliff described is defined by the photoeye and OnExit of the first conveyor.
I hope this helps.
Kris Geisberger
Thanks Kris
That looks excellent. I will have a look trhough this later this week and make sure I understand what you've done.
Thanks Again
Anth
I am new to Flexsim but not new to Simulation, I have used Witness extensively.
I want to simulate a gantry robot picking parts from a processor and dropping onto a conveyor. I intend to used the crane object.
However the problem I want to get round if possible is that when the gantry crane is over the drop off area on the conveyor it needs to take control of the conveyor and possibly wait in a hover position for a gap to arrive on the conveyor (there are other parts on the conveyor).
The drop off zone is controlled using photo eyes.
So my question is:
Is it possible to pause the crane mid-movement and execute logic?
Any Help is greatly appreciated
Anthony Timmiss
Here's one way I might do it. First, dispatch a tasksequence to the crane that was made up of the following task types:
TASKTYPE_TRAVEL (travel to the processor)
TASKTYPE_FRLOAD (load item from processor)
TASKTYPE_TRAVELTOLOC (travel to spot above the conveyor drop point)
TASKTYPE_CALLSUBTASKS (you'll want to read up on this tasktype in the help, but basically it provides an opportunity to execute code (usually in an OnMessage trigger that can decide what tasksequence (if any) to dispatch to the robot once the robot has finished the above traveltoloc task).Then in the crane's OnMessage trigger that is executed by both the callsubtasks task as well as by a photoeye trigger that fires when flowitems clear the "drop zone" on the conveyor, I would check whether or not the drop zone is occupied to determine if I create and dispatch another tasksequence to actually drop off the item onto the conveyor right then, or do nothing and wait for the zone to clear. This will probably require two photeye triggers on the conveyor one at the beginning of the drop zone and one at the end. When an item enters the drop zone, I could set a label called "occupied" to 1, and when the item exits the drop zone I could set it back to 0 as well as check if there is an item in the crane that was waiting for the zone to clear; if there was then I could send the crane a message that fires the same OnMessage trigger executed by the callsubtasks.
Good luck,
Cliff
Thanks Cliff I will give that a try you've understood what I want to do perfectly. Looks like I have a bit of reading up to do!
Thanks
Anth
have uploaded a small model that demonstrates a method very similar to what Cliff has explained above. Instead of the CALLSUBTASKS, it uses a SENDMESSAGE followed by a UTILIZE task. The OnMessage of a Dummy Queue is fired (instead of the crane) where the decision whether or not to free the crane to continue and UNLOAD is made. The zone Cliff described is defined by the photoeye and OnExit of the first conveyor.
I hope this helps.
Kris Geisberger
Thanks Kris
That looks excellent. I will have a look trhough this later this week and make sure I understand what you've done.
Thanks Again
Anth