question

Farah_najihah A avatar image
0 Likes"
Farah_najihah A asked Felix Möhlmann commented

item continue when conveyor is full

block test.fsm


Hi, how do I make if the conveyor is full with products, the products will continue flowing? any help would be very much appreciated.


FlexSim 22.1.1
conveyorflowitemflow
block-test.fsm (43.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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You could use a photo eye instead of a decision point. Then you can use its state to determine if the conveyor is currently full (last item couldn't continue) and use that as a condition for sending the item.

1652871753043.png

block-test_fm.fsm


1652871753043.png (298.5 KiB)
block-test-fm.fsm (44.0 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.

Farah_najihah A avatar image Farah_najihah A commented ·
Thank you @Felix Möhlmann , btw can I do it with multiple conveyors? for example using round robin? is it possible to use the same method?


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Farah_najihah A commented ·

You can build a basic (strict) round robin system with the same method. Each junction would have its own decision point. A global variable dictates which conveyor should receive an item next. Each decision point has a label that determines its 'number'. Only if the global variable is equal to the number and the conveyor is free is the item redirected. The global variable is incremented in the cover trigger of the photo eye. So after an item is redirected, the next decision will redirect if possible.

This system only works well if the loop is saturated. Otherwise many items will already be past the first decision point when it becomes its turn again.

A more robust approach would be to have a label to show the current content of each conveyor on the photo eye. That way the decision of whether/where to send an item can be done by a single decision point ahead of time. By incrementing that counter each time an item is redirected to the respective conveyor, the items that are still en route are also counted towards the capacity. It also means that the next output number can be stored on the decision point directly, rather than as a global variable.

This requires some custom code to be added to the trigger function of the decision point.

1652941613827.png

(The color changing is just to show which item will go where)

The counter label can be decremented in the 'On Uncover' trigger of the photo eye at the end of the conveyors.

This logic could then also be further modified into 'Round Robin If Available', by adding a for loop to the code that checks all connections in order, starting with the next one that is due, and sending the item to the first available one it finds.

1652941843032.png

block-test-fm2.fsm

0 Likes 0 ·
1652941613827.png (43.6 KiB)
1652941843032.png (24.7 KiB)
block-test-fm2.fsm (101.3 KiB)
Farah_najihah A avatar image Farah_najihah A Felix Möhlmann commented ·

Hi @Felix Möhlmann , that really helps a lot! However, I have encountered another error, could you help clarify on the variable nextOut? was I supposed to declare or add it somewhere for it to function? Thanks!


Flexscript Error MODEL:/PE7>variables/onCover Line 9 Undefined variable nextOut being used.

Flexscript Error MODEL:/PE7>variables/onCover Line 9 Undefined variable nextOut being used.

Flexscript Error MODEL:/PE7>variables/onCover Line 9 Invalid type for left side of assignment operation. Must be valid l-value. Type is (invalid)

Flexscript Error MODEL:/PE7>variables/onCover

Could not finish parsing because of previous errors.


0 Likes 0 ·
Show more comments

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.