Determining process cycle time

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Steven
Posts: 13
Joined: Wednesday 06 March, 2013 - 19:16

Determining process cycle time

Post by Steven »

I would like to determine the total cycle time of a process, you could say I would like to know the age of the product.
More specific the age from the moment the product enters the first server until it exits the last server of the process.

I would like to export these ages to an excel sheet because i need the raw data.
Can this be done by using a generic monitor connected to an excel write command ?
And if so, what would be the 4D script to measure this specific age ?

Thanks !
BartC
Posts: 47
Joined: Monday 05 November, 2012 - 17:05

Re: Determining process cycle time

Post by BartC »

Hi Steven,

For the first part, you can keep track of the entry and exit times using labels on the triggers of the servers. E.g. on the entry triggers of server 1 you could use code like this:

Code: Select all

label([EntryServer1], i) := Time
Use the same principle on the exit trigger of server 2.

Now using the Excel Active X atom you can make a connection to an excel sheet (see ExcelActiveX topic in the ED Help). This atom provides you the possibility to write to Excel, for example in your model you could use:

Code: Select all

ExcelActiveX_Write(1, 1, Label([ExitServer2], i) - Label([EntryServer1], i))
This writes the "Age" of product "i" to Row 1, Column 1 in the default sheet of your connected Excel file.

Best regards,

Bart
menno
Posts: 45
Joined: Tuesday 29 March, 2011 - 16:01

Re: Determining process cycle time

Post by menno »

Hello Steven,

You could also use the function 'Age' to find out the age of an atom. The age is the difference between current time and creation time. When a run is reset, the creation time of all atoms becomes 0. If we use the example of Bart, then we can write on the exit trigger of server 2:

Code: Select all

ExcelActiveX_Write(1, 1,age(i))
This saves you some code in determining labels.

Kind regards,
Menno
Steven
Posts: 13
Joined: Wednesday 06 March, 2013 - 19:16

Re: Determining process cycle time

Post by Steven »

Bart and Menno,

Thanks for the help, I will give it a try and let you know how things turned out !

Steven
Post Reply