question

Mathilde DOUSSET avatar image
0 Likes"
Mathilde DOUSSET asked Joerg Vogel commented

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

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

FlexSim 16.2.0
stay time
5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

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");
· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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) 
1 Like 1 ·
Mathilde DOUSSET avatar image
0 Likes"
Mathilde DOUSSET answered Joerg Vogel commented

@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


· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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")

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.