This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.

Go Back   FlexSim Community Forum > FlexSim Software > Q&A

Q&A Using Flexsim and building models

Old 08-02-2007
Bill Nordgren's Avatar
Bill Nordgren Bill Nordgren is offline
Join Date: Jul 2007
Posts: 86
Downloads: 123
Uploads: 2
Thanks: 38
Thanked 184 Times in 35 Posts
Rep Power: 362
Bill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud ofBill Nordgren has much to be proud of
Default Gantry Crane Control (from the old user community)

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:
  1. TASKTYPE_TRAVEL (travel to the processor)
  2. TASKTYPE_FRLOAD (load item from processor)
  3. TASKTYPE_TRAVELTOLOC (travel to spot above the conveyor drop point)
  4. 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,

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!

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.

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

Attached Files
File Type: zip (45.2 KB, 424 views)

Last edited by Bill Nordgren; 08-02-2007 at 06:37 PM.

All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.