Hi, how do I make if the conveyor is full with products, the products will continue flowing? any help would be very much appreciated.
Hi, how do I make if the conveyor is full with products, the products will continue flowing? any help would be very much appreciated.
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.
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.
(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.
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.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved