question

Mike avatar image
0 Likes"
Mike asked Mike commented

current staytime

I want to monitor the current stay time of the item on conveyor3 and divert the next flow item to conveyor2 if the staytime is more than set value. The main issue is I want to know how to monitor the current staytime of the flow item on conveyor. Could anyone help me on this? Thanks. StayTime.fsm

FlexSim 23.1.3
current staytime
staytime.fsm (39.5 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 Mike commented

You can write the entry times of items to a label on the conveyor and refer to them later when deciding where to send an item.

In your model, you have one exit transfer per connection. This means that the decision of where to send the item has to be made before the item reaches the end of the conveyor and the item has to be send to the respective exit transfer.

If both connections belong to one exit transfer, the decision can be made in its Send to Port field. Doing this, in conjunction with the extra Entry Space you added to Conveyor3 will have additional items automatically be send to Conveyor2 with the First Available Send to Port logic.

Another way to control the input could be to use a Photo Eye whose block time is set to some value greater than 0. If the Photo Eye stays blocked until its state actually changes to blocked (as mandated by the block time), the triggers can be used to close/open the entry transfer.

staytime-fm.fsm


staytime-fm.fsm (51.2 KiB)
· 6
5 |100000

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

Mike avatar image Mike commented ·
@Felix Möhlmann I would like to write a script for the following condition.

once an item enters a conveyor, Model time - entry time will be written into a label. Since the model time keeps changing. I believe the label value will be increasing. I want to make a decision if the label value is more than 100sec (For example). Could you please help me script? Thanks.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Mike commented ·
Using a tracked variable label seems unnecessarily complicated. I just send a delayed message or create token in a Process Flow on entry and delay it by 100s. Then make the decision in the On Message trigger or the Process Flow (after possibly checking if that decision is still needed).
0 Likes 0 ·
Mike avatar image Mike Felix Möhlmann commented ·

I also want to understand scripting datetime. :D

anyway, thanks.

0 Likes 0 ·
Show more comments