Distribution setup times

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
Steven
Posts: 13
Joined: Wednesday 06 March, 2013 - 19:16

Distribution setup times

Post by Steven »

I amworking on a model which has distributions as setup times since its a complex machine.
I used a setup table as the setup time and added a table to the second channel of the server.
The model worked when I used a number, for example 10 seconds as the setup time.
But the server did not use the setup time when i used normal(10,05).

Is this combination even possible and what could i have done wrong ?

Thanks !
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Distribution setup times

Post by marlies »

Hi Steven,

Did you type in Normal(10,0.5) in the table? In that case the problem occurs because ED not automatically knows that the text in your table should be executed as a piece of 4DScript.

To adjust this you will have to make a small change in the code of your setupfield. Just click the arrow down to edit the setup field and than the little square button below, this will show you the 4Dscript code behind the explanation text of the setuptime field. You will read something like:

Code: Select all

do(t-Getsetupcode(label([Test],first(c)),1),cell(ddb([t-oldsetupcode],c),ddb([t-setupcode],c),in(2,c)))
This needs to be changed into:

Code: Select all

do(
 t-Getsetupcode(label([Type],first(c)),1),
 execstring(cell(ddb([t-oldsetupcode],c),ddb([t-setupcode],c),in(2,c), 2))
)
I added an execstring command which tells ED that it needs to execute the text as a script.

Note that the labelname Type in this pieces of code needs to be replaced by the name of the label you are using for setup.

I attached a small example to show the working of this code.

Regards, Marlies
Attachments
20130528_Setuptimes.mod
(16.91 KiB) Downloaded 263 times
Post Reply