question

wang W2 avatar image
0 Likes"
wang W2 Suspended asked wang W2 Suspended commented

onblock senditem

hello

I want to simulate that when a flowitem block the photo eye ,the PE send the item to the outobjector[1],but when on block trigger fired ,it execute the command Conveyor.sendItem(item, newDest);But the flowitem still blocked there,didnot move at all,like pic show below,would you please help me solve the problem?thanks alot

FlexSim 19.2.4
flexsim 19.2.4
无标题.png (314.9 KiB)
· 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.

Regan Blackett avatar image Regan Blackett ♦ commented ·

When a Photoeye stops a flowitem from moving,a call to senditem will not restart it again. That's not what it does; all it does is set what the destination will be when it can start moving again. Are you stopping the flowitem yourself or is it stopping due to the natural flow of the conveyor system? We may need to see your model to give you a good solution in either case.

0 Likes 0 ·
wang W2 avatar image wang W2 Regan Blackett ♦ commented ·

i will upload wy model ,hope it can illustrate my issue,thank you

obblock.fsm

0 Likes 0 ·
obblock.fsm (32.5 KiB)

1 Answer

·
Regan Blackett avatar image
0 Likes"
Regan Blackett answered wang W2 Suspended commented

This is a tough problem to solve in my opinion, because to solve it you need to know some things that the conveyor system doesn’t tell you.

The big thing is needing to know at the discrete moment that a transfer is to be made, will transferring to that side conveyor the item doesn’t know if it can “fit” onto that segment. If it can, it continues on but if it doesn’t it gets blocked but it’s already made the decision to go there and I didn’t find an easy way to get the item to change its mind.

So you need a way to look downstream before the decision to transfer off and see if the item would be be blocked if it went that way. Which is hard to do because if you look downstream and see a flowitem in a place that would block the upstream, how do you know the difference between something that is present but still moving vs stopped?

So here’s my solution, and I’m not 100% convinced it’s a good one so if anyone has any other thoughts on this please chime in. The idea is to use a List to check the availability of the upstream section of conveyor before it tries to transfer over, so it could choose instead to continue if it there’s a flowitem in the way. Hopefully that makes sense.

In the attached model you’ll see a general process flow where when the photoeye on that middle conveyor executes “OnCover” a token is created and pushed to a list. At the push activity, I have a max wait timer set to a zero time delay and keeps the token on the list on early release. This will send the token to a wait for event that has the token wait for the OnUncover of that same photeye. This will help us know if there is something there, and when OnUncover happens the token will pull itself off the list.

There is also a little flow of activities for the photoeye right before that transition. When that upstream photoeye covers, it creates a token and will pull from the list of things at the downstream photoeye. The pull activity is also using a wait time of zero, and it leaves the entries on the list (because if there is something downstream, we want it to stay there for subsequent upstream flowitems to know about). If the pull is successful, the upstream flowitem is sent to a different destination in the conveyor system. If the pull “fails” due to the max wait timer, the flowitem continues to its previous destination.

OnBlock Change Destination_1.fsm


· 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.

wang W2 avatar image wang W2 commented ·

thanks for enlighting me.

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.