How to put a stay time for a pallet in a queue?

How to put a stay time for a pallet in a queue?

mathilde_dousset
Not applicable
19 Views
4 Replies
Message 1 of 5

How to put a stay time for a pallet in a queue?

mathilde_dousset
Not applicable

[ FlexSim 16.2.0 ]

Hi!

I have pieces on the pallet and I must have a stay time when I load it on the queue (in production line) then they go to the sick.

But I don't arrive to make it.

Thank you for your help.

Mathilde DOUSSET

I've shared my model: 100uagvtoutespieces.fsm

0 Likes
Accepted solutions (1)
20 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

OnExit Trigger

double staytime_queue = time() - getentrytime(item);

Another approach:OnEntry Trigger set a label on the item to store the entering time, on Exit you compute the difference

setlabel(item,"QueueStaytime",time());

OnExit Trigger

double staytime_queue= time() - getlabel(item,"QueueStaytime");
Message 3 of 5

joerg_vogel_HsH
Mentor
Mentor

If it is just for a statistical matter you like to store the staytime, you can use the template option: Data > Set Tracked Variable. Inside the To field you write the code:

time() - getentrytime(item) 
Message 4 of 5

mathilde_dousset
Not applicable

@Jörg Vogel

Hi!

Your solution doesn't start in my model, I just try in the queue 483.

Or maybe , I don't understand yous answer.

Thank you for your help!

I join you my model:100uagvtoutespieces.fsm

0 Likes
Message 5 of 5

joerg_vogel_HsH
Mentor
Mentor

Mathilde, your code in the Queue483 set a label value to 70 on entry. On exit you compute 70 - this label value. Then you write a new label to the item again with this result which is of course 0. What is not working in your opinion beside, that the functions contains a syntax error in the model you have attached? Following you find the corrected value for the fields in the trigger templates you have chosen:

OnEntry Trigger Template values:

  • Object: item
  • Label: "QueueStaytime"
  • Value: 70

OnExit:

  • Object: item
  • Label: "staytime_queue"
  • Value: 70- getlabel(item,"QueueStaytime")

4256-staytime-of-item-in-queue.jpg

0 Likes