Assembler - flowtime

All topics on coding 4Dscript in Enterprise Dynamics.
EvelineHermans
Posts: 28
Joined: Tuesday 28 July, 2015 - 10:34

Re: Assembler - flowtime

Post by EvelineHermans »

Hi Simon,

Sorry for my late reply but this was exactly where I was looking for :). Thanks!
Unfortunately I now discovered that I need to "feed" 5 different components in stead of 4.

Although I did change every 4 into a 5, I initialized the 5th reservoir and I changed the BOM, I am not able get it working again for the 5th component as well.
Flow_assembler_5components.mod
(41.98 KiB) Downloaded 293 times
I think there's a little problem in the control of the reservoir-outlet as it seems not to automatically close after resetting my model. As a result component 5 is fed directly after the recipe has "entered" the assembler.

Can you help me with this?

Thanks!!

Eveline
Bram de Vries
Posts: 60
Joined: Thursday 08 January, 2015 - 13:29

Re: Assembler - flowtime

Post by Bram de Vries »

Hello Eveline,

The output of your fifth reservoir is closed when you reset your model, but almost immediately opened afterwards... I will explain why this happens. If you look at the model tree in your model, you will see that the new reservoir is located lower than the Initialize atom (because you added it to the model at a later time). If you now press reset and enable the visualisation of the channels, you will see the red square behind the output channels of the first four reservoirs which indicates that their output has been manually closed, but not behind the output channel of the fifth reservoir. This is because resetting the model undoes any closeoutput step by step for each atom in the model tree (but at the same time it executes any code that should be executed on reset that it finds at the atoms its processing, like the Initialize atom). Because the Initialize atom was located lower than your initial reservoirs, their output was first manually opened by resetting and then closed by the Initialize atom. However, since your new reservoir is located below the Initialize atom in the model tree, its output is first manually closed by reset and afterwards this is undone when the reservoir is 'reached' in the model tree.

I hope this makes sense :) This problem can be fixed by moving the Initialize atom to the lowest position in the model tree. I did this in the attached model and you can use the function SetRank for this (see the help files in Enterprise Dynamics for an explanation). So in this case I selected the Initialize atom in the model tree and executed this code in the Interact Window:

Code: Select all

SetRank(30, TreeAtom)
Kind regards,

Bram
Attachments
Flow_assembler_5components_v2.mod
(41.95 KiB) Downloaded 315 times
EvelineHermans
Posts: 28
Joined: Tuesday 28 July, 2015 - 10:34

Re: Assembler - flowtime

Post by EvelineHermans »

Thank you! I now see where it went wrong.. :x

Kind regards,
Eveline
Post Reply