Entrance time in resouce

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
remix568
Posts: 8
Joined: Thursday 09 January, 2014 - 10:35

Entrance time in resouce

Post by remix568 »

Hello Incontrol Team,

I am doing a model which is with different workplace. The Products should read their workplan from a excel tabel and run with his workplan. What I need is to set the entrance time for the products. eg.:

product 1 goes through workplace 1 and workplace 2, then it goes in the end to sink.

Once the product 1 arrived in sink, the product 2 goes out from resource.

Can you tell me how can I set the entrance time for products in resource, which is depends on the totally runtime from the last product.

looking forward to your reply, thank you indeed.
BR
Remix
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Entrance time in resouce

Post by HarryBunnik »

Hello Remix,

So if I understand correctly, you want to have one product in the total production line and only once the product is in the sink, allow a new product to enter the production line?

Because in that case you could use the "Lock" and "Unlock" from the "Flow Control". Using these atoms, you can control how many products are allowed between them.

I hope this helps you!

Cheers,

Harry
remix568
Posts: 8
Joined: Thursday 09 January, 2014 - 10:35

Re: Entrance time in resouce

Post by remix568 »

Hello Harry,

yes it's almost right. Once the product 1 is finished, product 2 should start as soon as possible. Is the Lock Atom right for that?
And the most important is to write the entrance time of workplace and also entrance time of sink from each product in an excel table. so that I can calculate the totally spend time for each product in the product line.

I know how to connect it with a excel table, but I am not sure how to get the real time. Which command shall I use in the 4d Script? I used Label = time at the entrance for workplace and sink, than write the labels in the excel. But it seems not right.

thx for your reply
Remix
remix568
Posts: 8
Joined: Thursday 09 January, 2014 - 10:35

Re: Entrance time in resouce

Post by remix568 »

And this morning I just tried to try my model again, unfortunately it shows me this error:

ActiveX functionality disabled. Please contact your model provider for details. (ExcelActiveX_SetupConnection)

I have done nothing. Last time as I open it was normal. Do you how to solve this problem?

BR
Remix
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Entrance time in resouce

Post by HarryBunnik »

Ha Remix,

The lock (and unlock) atom is the correct atom to achieve this. You can limit the content in a part of your model with these.

Labels you have to create by:

Code: Select all

Label([NameOfLabel], i {reference to product which can be used only on Entry and Exit triggers, also see the manual}   ) :=  time
Which sets the time (I would place it on the OnExit trigger of the source)

And :

Code: Select all

Label([NameOfLabel], i {reference to product which can be used only on Entry and Exit triggers, also see the manual}   ) :=  time - Label([NameOfLabel], i)
That will place the staying time of the product within the process on the label. Then you have to write the label into an empty spot in the table, which you have connected to Excel. This I would place on the on the OnEntry of the Sink.

As far as the error about the disabling of the ActiveX functionality I have no clue. I will ask around for you.

Cheers,

Harry
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Entrance time in resouce

Post by MatthijsJongboer »

Hello Remix,
For ED 8.2.5 Student version ActiveX is disabled. For ED9 Student Starter it should be enabled. What product and version are you using?
remix568
Posts: 8
Joined: Thursday 09 January, 2014 - 10:35

Re: Entrance time in resouce

Post by remix568 »

I used a ed9 education version at university and ed9 trial version in my own computer.
I tried both of them and it all shows this:

1 ActiveX functionality disabled. Please contact your model provider for details. (ExcelActiveX_SetupConnection)


What can I do now :cry: :cry: :cry: :cry:
remix568
Posts: 8
Joined: Thursday 09 January, 2014 - 10:35

Re: Entrance time in resouce

Post by remix568 »

I just downloaded a student start version again and it works... perfectly.

Thank you for your help :D

BR
Remix
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Entrance time in resouce

Post by MatthijsJongboer »

Hi Remix,
Good to hear it works now. Thank you for the feedback.
Post Reply