Time product in server

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
louise
Posts: 7
Joined: Wednesday 30 January, 2019 - 09:29

Time product in server

Post by louise »

Hi guys,

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 !
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Time product in server

Post by HarryBunnik »

Ha Louise,

You could try: "Time - EntryTime", where "EntryTime" gives the time that a product entered another atom and the use of "time" you already found :-)

Success,

Harry
louise
Posts: 7
Joined: Wednesday 30 January, 2019 - 09:29

Re: Time product in server

Post by louise »

HiHarry!

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?
Greetz Louise
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Time product in server

Post by HarryBunnik »

Ha Louise,

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

Do(
Label([ThisProductsCycleTime], c) := NegExp(9),
If(
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,

Harry
louise
Posts: 7
Joined: Wednesday 30 January, 2019 - 09:29

Re: Time product in server

Post by louise »

Can I see the change when the atom is still in de server? Not when it exists the server

Thanks!
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Time product in server

Post by HarryBunnik »

Here I'm not fully understanding what you want to see.
  • 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).
There is no trigger to see the moment that a product is ready, but hasn't left the server yet because of the reason described above. When you're interested in the extra time the product spends within the server, because the next process step isn't directly available, you can combine both options:

(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,

Harry
Post Reply