question

Jonathan_Huang avatar image
0 Likes"
Jonathan_Huang asked Felix Möhlmann commented

Conveyor maximum content

Hi everyone


Please instruct me how to close and open input port of straight conveyor using Trigger when it is containing a certain amount of flow item? for example when conveyor is containing greater than 1 flow item. the input port will be closed. And be opened again when he flow item 's number equal or less than 1

You can provide me the code


Thanks and best regards

FlexSim 23.1.2
conveyors
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

·
Dhakshna avatar image
1 Like"
Dhakshna answered Felix Möhlmann commented

Hi @Jonathan_Huang,

OnEntry: Check the content of the conveyor. If it is greater than 1, then close the EntryTransfer.

OnExit: Check the content again and open the input (EntryTransfer) if it is less than or equal to 1.

example01.fsm


example01.fsm (38.7 KiB)
· 4
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

One small addition: In the attached you can see that past the initial two items, only one item can enter the conveyor at a time. This is caused by the timing of the triggers. Because the On Exit trigger fires while the exiting item is still on the conveyor and opening the input allows the next item to enter before the current one actually exits, the input is closed again, as in that instant two items are on the conveyor.

To work around this, you can send a message with a delay of 0s in the On Exit trigger and open the input when that message is received.

example01(1).fsm

0 Likes 0 ·
example011.fsm (38.8 KiB)
Jonathan_Huang avatar image Jonathan_Huang Felix Möhlmann commented ·
Hi Mr Felix. Thanks for your comment

But I see in your attached model. There were always 2 items joined the conveyor in the same time


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Jonathan_Huang commented ·
Which aligns with the condition that the input is closed if more than 1 item is on the conveyor. In @Dhakshna​'s model, at the very start two items enter the conveyor and afterwards only ever one. Which I would classify as irregular behaviour and thus proposed a solution to always allow the same quantity regardless of the exact timing of the arrivals.
0 Likes 0 ·
Jonathan_Huang avatar image Jonathan_Huang commented ·
Thank you Mr Dhakshna!
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.