Page 2 of 2

Re: Create a cycle time of Assembler atom that depends on product

Posted: Wednesday 01 April, 2020 - 15:27
by HarryBunnik
Ha ASV,

Add the cycletime that you calculated for each product that enters the assembler, to the label that is defined on the assembler for the cycle time on the Entry trigger for the products (Label([], c) := Label([], c) + NewLabel([], i)).

And don't forget to set that label back to zero on the entry trigger for the container or the exit trigger of the assembler (otherwise the cycletime will keep incrementing with every product that enters the assembly, so you have to reset it when a new container arrives).

Success,

Harry

Re: Create a cycle time of Assembler atom that depends on product

Posted: Wednesday 01 April, 2020 - 15:50
by ASV
Hi.

Sorry for my stupidness in regards to this, but I don't follow what you mean. Maybe if you could try to implement what you mean in the mod. file I send you. Then I would be very grateful, and hopefully are able to follow your reply!

I forgot to mention that the assembly of the products is happening at the same time, meaning that the assembly of the 2. product does not wait on the assembly of the 1. product. They are assembled into the container simultaneously.

ASV

Re: Create a cycle time of Assembler atom that depends on product

Posted: Thursday 02 April, 2020 - 12:28
by HarryBunnik
Ha ASV,

I don't want to spoil all the fun of your project and spell it all out, but I can try to point you in the right direction. :)

And the last sentence, that you want the CycleTime of both products simultaneously makes quite a big difference.

In your last model the calculating of the CycleTime was done on the "Trigger on entry channel 2..n".
Due to the simultaneously handling of products, I would now move the calculation of the CycleTime to the CycleTime entry on the GUI of the Assembler. Note that the CycleTime is first calculated when all products have arrived into the assembler.
And note that the last result in the code is the value that will be used as the CycleTime.

What I would do is loop over the products in the container. Since you, correctly, checked the Pack contents check box, all products are placed under the container.
So, you have the assembler "c", then the container "first(c)" and the products under the container "rank(#, first(c))".
Then you'll have to calculate the maximum value of the CycleTime (if there is something left), by looping over the content of the container:
  • So, here you'll need to have the EntryTime of each product.
  • The CycleTime of each product (your Bernoulli)
  • And the current time.
I have set all interesting 4Dscript terms in italic. So, I hope that with these tips, together with the ED-help file, you'll get a bit further.

Success,

Harry

Re: Create a cycle time of Assembler atom that depends on product

Posted: Thursday 02 April, 2020 - 16:45
by ASV
Hi Harry.

Thanks a lot. You would not spoil much for the project, as this is a very small part and really not the essential part of our simulation. All though, it is needed in order for us to move on.

I will try to implement your latest reply and might get back to you if I have additional questions. In regards to the ED-help file, you are referring to - is that the help file that "pops up" if I press f1 in ED?

Best regards
ASV

Re: Create a cycle time of Assembler atom that depends on product

Posted: Friday 03 April, 2020 - 10:35
by HarryBunnik
Ha ASV,

Yes, that is the help I'm referring to. Here you have to option to search for the terms that I mentioned earlier and then I'm sure you'll find a way to do it :-)

Success,

Harry