question

Michael P4 avatar image
0 Likes"
Michael P4 asked tannerp commented

How to change destination of box on conveyor if destination is full

I am trying to sort three different kinds of items down their preferred conveyors, but I need to change their destination if that lane is full. For example, the red box will go down the white conveyor if the red conveyor is full. I have tried to solve this by having a photo eye send a message to a decision point to change the labels for their destination. However, I keep getting errors in my custom scripting and the change of destination does not occur. I have posted my most recent model (19.2.0) below. I am new to custom scripting in FlexSim and any help would be appreciated.

FlexSim 19.2.0
Choose One
conveyorlabelsdecision pointsmessage trigger
blocked-sort.fsm (44.5 KiB)
· 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.

1 Answer

tannerp avatar image
1 Like"
tannerp answered

Hi @Michael P4,

I added photo eyes near the end of each of the conveyors that have a label called "Blocked" that is updated to "1" On Block and "0" On Clear. Then I added code to the existing On Arrival trigger in the Decision Point that checks to see if the label "Blocked" is 1 or 0 on its respective photo eye. If the destination is blocked according to the photo eye, the Decision Point sends the object to ExitTransfer1 by default.

Hopefully this makes sense. It's not perfect, but it might give you a sense of where to start.

blocked-sort.fsm


blocked-sort.fsm (43.2 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.