question

Afthab L avatar image
0 Likes"
Afthab L asked Afthab L commented

Rotating Disk Sorter Imitation

Hi,

Recently I've been trying to imitate the behavior of a disk sorter. When a package arrives, the disk sorter rotates to the direction the package needs to go. However, when a package arrives that needs to go to another direction, the disk sorter should rotate back to the original position and this requires some time. So my question is, how do I add a delay when the package is being sent to a different direction. Items that follow which are being sent in the same direction do not need this delay. The delay should be added as a start up time delay.

I've tried to use conveyor stop item and delay but this adds the delay to every single package of that type irregardless whether the next one is going in the same direction. Any help would be appreciated.


Sorter Seperation Problem.fsm

-- -----------
sorter-- -----------
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 Afthab L commented

I would add a label to the Decision Point, that stores the direction the sorter is currently set to. This label can then be compared to the direction the item needs to go. The delay is only triggered if they are different (condition in "Stop Item and Delay" option). Then the label gets updated to the new direction.

sorter-seperation-problem-fm.fsm

In the model I also added the direction as an extra label on the items in the first DP on the conveyor to make the logic of the "sorter" DP a little simpler.


· 3
5 |100000

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

Afthab L avatar image Afthab L commented ·
This works perfectly. May I please ask on what language is the coding based on (It looks like C++), if not where can I find the relevant commands?


Thank you so much by the way! Appreciate it a lot!

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Afthab L commented ·

FlexScript, the coding language of FlexSim is indeed based on C++. You can find an introduction and a class/command reference here:

https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/WritingLogic/



0 Likes 0 ·
Afthab L avatar image Afthab L Felix Möhlmann commented ·
Thank you so much!
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.