question

Jelle B avatar image
0 Likes"
Jelle B asked Jelle B commented

how to let the operator take a break when he did his task

Hi guys

I am doing an internship and I'm pretty new to flexsim and my boss asked me to simulate a future process, as you can see in the attached file. simulated-process.fsm

I need to let the first operator put boxes on the first conveyor until it is full, then he can take a break until the conveyor is empty again. right now, when the conveyor is full, he just waits until there is enough space to put a box on it again and doesnt take a break.

Any help would be appreciated.

Greetings the internguy

FlexSim 17.0.1
operator assignmentbreak time
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Mischa Spelt avatar image
1 Like"
Mischa Spelt answered Jelle B commented

Hi Jelle,

I have attached an updated model that shows one way to solve the problem.

I added a Photo Eye (PE) at the start of the conveyor, and have its On Block trigger fire when it is covered for more than 3 seconds. Normally items pass within this time so if it stays blocked this long, the conveyor is (almost) full. In the block trigger I wrote some custom code which does the following:

  • Find the operator connected to the first center port connection ("S"-connection) of the PE (hint: you can do the same with the queues, instead of referencing the operator by name).
  • Create a new task sequence for the operator. The task type UTILIZE blocks anyone from using the operator until we manually free it. As the final parameter I chose STATE_LUNCH, you can change this to any default state to indicate that it is on break.
  • For future reference, I set a label "hasbreak" on the operator to 1.
  • The PE is connected to a Decision Point (DP) at the end of the conveyor. I tell the decision point which operator I have just blocked and which item is now sitting at the start of the conveyor so that the DP knows when to call the operator back.

You can extend this code, to insert for example a TRAVEL task for the operator, so that it first walks to the cafeteria.

Any time an item passes over the DP, it's On Arrival trigger fires. I check that this item is equal to the value that the PE had set on my label. If it is, the conveyor is almost clear and the operator can start working again. I clear the hasbreak label, call freeoperators to finish its Utilized task and then set the waitforitem label back to nothing just to be sure.

Note that I need the hasbreak label because otherwise I may give the operator two utilize tasks and it will only complete one. Wherever I wrote labelname? with a question mark, it is to supress any errors in case this is the first time the code runs and the label does not exist yet.

One more tip: if you click the conveyor, then in the Quick Properties on the right you can check the "Virtual Length" box. This allows you to make it a bit shorter and have the whole model in one screen, while still getting the correct speeds and conveying times.


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jelle B avatar image Jelle B commented ·

thank you very much!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.