I have a question. I would like to model a certain situation. A transporter brings a product to a server. When the product enters the server, I would like to change the icon of the product when the product is longer in the server than 10 seconds. I thought it had something to do with the trigger on entry and "if Time>" but then it takes the simulation time and not the time that the product is in the server. Is there soms sort of timer function in enterprise or some way to model this ?
Thanks for the quick response! The problem is that if I write it in "Trigger On Entry", it only looks at it when entering. So the atom in the server doesn't change at that time, because Time-TimeEntry isn't >= 10. I tried with a while loop, but this blocks the whole program.
Can you help me?
Yes, you can first do this on the Exit trigger, since only there you officially know how long a product was in a server. That requirement I overlooked, sorry.
The staying time is a combination of Setup-time, cycle-time and, when applicable, failure-time. Since the cycle-time is first defined after the setup-time is finished, the CurCycle is 0 or of the previous product when you look at it on the Entry Trigger (even when the setup-time is defined as zero). So reading out that Attribute is also not helping you.
A way around it is to create a label on the server when a product enters (let's call it "ThisProductsCycleTime") and assign to it the code that you currently have on the cycle-time of the Server (this works only when you have no setup time and no failures).
Label([ThisProductsCycleTime], c) := NegExp(9),
Label([ThisProductsCycleTime], c) > 10,
Icon(i) := 3,
Icon(i) := 1
Then you can update the cycle-time of the Server to use the "Label([ThisProductsCycleTime], c)" as the CycleTime.
I hope this helps you further,
- The Entry trigger is triggered as soon as a product arrived in the server and the server has accepted the product.
- The Exit trigger is going off as soon as the product left the server (this can be later than the CycleTime when the conveyor/queue/transporter behind the server is not directly accepting the product and the product has to wait in the server).
(Time - EntryTime) - label "ThisProductsCycleTime"
This gives the waiting time of the product. BUt that you can first calculate when the product has left the server, so on the exit trigger.
I hope this helps you,