question

David Seo avatar image
0 Likes"
David Seo asked Logan Gold edited

What's the way of the taskexecuter to get the only one task in his queue?

onetaskonly-lookback.fsmI am making one demo model like followed.

When the items move the position of transter and if the taskexecuter does a tasksequence - not exist at the home position, they should pass the position not waiting for the task executer - not dispatching the tasksequence to the task executer.

And the items not transfered to the task executer move back along the loop conveyor and when move the position again, the items try to get again the task executer.

How can I control it?

FlexSim 17.0.0
only one task not having the task queue and loop back
5 |100000

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

Logan Gold avatar image
0 Likes"
Logan Gold answered Logan Gold edited

Instead of using the gettasksequence() command like you are in the logic, I would use the gettasksequence() command like this:

int condition = !objectexists(gettasksequence(current.centerObjects[2], 0));

Using a 0 as the second parameter will cause gettasksequence to return the current active task sequence. The !objectexists() then will return true if the Task Executer does not have an active task sequence (it is at the home location not doing anything).

However, there is a problem doing it this way because there is a delay before the flowitem gets to the Exit Transfer where the task sequence is created and sent to the Task Executer. That means it's possible to for another box to trigger the Decision Point logic when the Task Executer does not have an active task sequence yet.

My suggestion would be to either use Process Flow and lists to handle checking when the Task Executer is being used. Or you could simply set a label on the Task Executer when you know it will be given a task sequence, then check that label as part of your condition. Then set the label to a different value as part of the travel task back to the home location. You can edit the OnResourceAvailable trigger and use the TASKTYPE_SETNODENUM task to change a label value or use the TASKTYPE_SENDMESSAGE task and have the Task Executer send a message to itself and change the label value in the OnMessage trigger.

5 |100000

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

Sebastian Hemmann avatar image
0 Likes"
Sebastian Hemmann answered Jeff Nordgren commented

Hi, what I normaly do in this case is to stop the Item on a decision Point and listen for that Event in PF. Now you can create all Options in PF (like see how full the TS Queue is and so on). If your TE is busy and can´t take the item, just resume the item and it will go on.

To go sure the TE loads the item you will have to resume the item anyway, but maybe with another Destination (in this case the Exittransfer).

· 2
5 |100000

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

David Seo avatar image David Seo commented ·

@sebastian.hemmann, Thank you

What I want to do in this case is 'NOT TO STOP in the DP'. When the item can't get the TE in that point, the item should pass the point and loop back.

I want to know how to get the status of the TE.

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren David Seo commented ·

@david.seo,

To get the status (state) of a TE, look here.

0 Likes 0 ·