question

Alex H4 avatar image
0 Likes"
Alex H4 asked Alex H4 commented

Process Flow stops running on Task Executor travel task

The OP10_Load process flow I have created for the system stops running around 7075 seconds. It works correctly before that time and then stops suddenly with a flow item in the OP10_Load queue. Why is this happening?

FlexSim 18.2.0
process flowqueuetask executer
fsq.fsm (210.8 KiB)
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

·
Regan Blackett avatar image
4 Likes"
Regan Blackett answered Alex H4 commented

Looks Like you've got a Delay Time 0 infinite loop happening right here:

You can tell because, first when the model stops you can open the event list and see that this token wants to finish a delay activity that is almost exactly the same as the current clock time, and second because if you use the step button you can see the token constantly moving from the Delay to the OP10Content to the Decide and so on, without moving the clock. So basically each time the token cycles around it's creating an event to end the delay time, which is essentially like having infinite events because nothing else can happen while the token is cycling.

So this is Delay for zero, decide, repeat is something that sounds Ok logically in theory but this type of out of control loop is almost always the result and you should avoid it. If I'm reading the activities right, it looks like you want to do something if the Queues OP10 or 20 receive a flowitem, in which case it may be better to listen to the OnContentChange trigger of the queue and execute your activities then.


infiniteloop.png (52.8 KiB)
· 3
5 |100000

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

Alex H4 avatar image Alex H4 commented ·

Thank you for your help with this. What I am looking to do is when the processor finishes I want to check the content of the Queue before moving the flow item using the AGV to either OP10_Load or OP20_Load. These queues have a max content of 1 and with the process flow approach this is the only way I know to make sure no flow items is placed in the queue if there is already one inside it.

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Alex H4 commented ·

My preferred method might be to treat the two OP load Queues as resources that can be acquired like anything else but this would means a pretty hefty redesign of your model that I'm sure neither of us want to do :). So in keeping with some of the strategies that you are already using I would do something like this:

This would replace what you are doing in the ProcessFinishLoad process flow window. So listen for the processor like you are doing, and assign your "Pass" label, but also assign a label that figures out what OP Load queue you are going to use based on the Pass label (replaces your OP10/20 check activity). The wait for the Load Queue found in the label to be empty, then acquire your robot, etc. See attached model.

A couple of other things to potentially watch for with regards to your AGV and Robot. You are mixing default task sequences created by standard object options and task sequences created from process flow. This could give some weird results based on the timing of when those tasks are created and sent to the objects. For example you may notice the robot doing a load activity from Process flow, and when finished, begins executing a standard task sequence given by one of the Queues. This is because the two approaches don't naturally work together unless you plan for it. Also, I noticed that in multiple process flow windows, your AGV and Robot are set up as resources; this could also lead to some strange behavior because the tokens in each window would be sending their own requests to the resource and they wouldn't naturally queue up because it would treat than as indiovidual resources rather than one shared object. It would be better to set up resources for these task executors once and then have the Acquire activities refer to the one single resource rather than in each window.

alex-newprocessfinish.fsm

0 Likes 0 ·
Alex H4 avatar image Alex H4 Regan Blackett ♦ commented ·

fsq.fsmThanks for the help. I am having an issue stemming from the queues being used by both the AGV and Robot independently. A flow item will be sent from a processor to OP10_Load and a new item will be sent to OP10_Load from the conveyor. One of the items will then be sent to the wrong location after this occurs slightly after time 19100. The OP10_Load gets the item type and OP_Code from the first item to enter and applies this to both items.

How would I go about using queues as resources? Another option I thought of would be setting a label on the processor or conveyor when sendtoport is triggered and then have the resources check the label before executing the load/unload.

0 Likes 0 ·
fsq.fsm (241.4 KiB)

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.