Unpack

All topics on the Atoms in any Enterprise Dynamics Library.
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

It still pointining the container

Case(
Label([Containerontrain],i),
do(
zloc(rank(1,i)):=1.5

),
do(
zloc(rank(1,i)):=1.5,
zloc(rank(2,i)):=1.5,
xloc(rank(2,i)):=6
))

i don´t know why?
i put the label only on the container!!
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

Case(
Label([Containerontrain],i),
do(
zloc(rank(1,i)):=1.5

),
do(
zloc(rank(1,i)):=1.5,
zloc(rank(2,i)):=1.5,
xloc(rank(2,i)):=6
))

i used this code but still pointing the container.
The label is on the container
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Unpack

Post by MatthijsJongboer »

Can you attach a model where this is happening?
The code seems ok but it could very well be the order of unpacking that rank will not work anymore.
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

I cannot attached mine i attached a made a simple example
Attachments
Example.mod
(31.52 KiB) Downloaded 280 times
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Unpack

Post by MatthijsJongboer »

The reason you don't see it is because the Unpack atom acts this way.
If you add a cycle time you see the behavior.
What happens is that the product are taken from the pallet and moved into the unpack atom itself (but this time without the entrytrigger). This places the products again at the origin of Unpack atom. Since you have no cycle time, it seems as if the entrytrigger is not executed.
To get the behavior you want, you need to do some advanced programming in the atom editor.
You best copy the OnEntered code from the mother and modify it. The code contains an if statement that checks if the event was triggered through an input channel. You can add the 'else' code here to fit your needs.
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

Ok thank u, i will try
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

i try to change the mother atoms but.
- at the beginning it worked, but after a second the come back at the 0,0,0 position
-now a change something more and doens´t work at all.

If u have time give a look

Thank u
Attachments
Example.mod
(31.37 KiB) Downloaded 267 times
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Unpack

Post by MatthijsJongboer »

The modifications made in the mother atom are not included in the model.
In this case I copied the code from the mother into the daughter (in the model).
I made a small modification to the OnEntered routine.
Attachments
Example_altered_OnEntered.mod
(32.1 KiB) Downloaded 288 times
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

Ok i made some change but works thank
here it is
{if needed because moveatom is used causes this trigger to go off}
if(
<>(ic(c),0),
do(
setloc(0,0,zsize(c),i),
closeallic(c),
setstatus(2,c),
att(4,c),
createevent(att(2,c),c,1)
),
{else products come from the container}
do(if(Label([Containerontrain],first(c))=1,
zLoc(rank(2,c)) := 2.5,
do(zLoc(rank(2,c)) := 2.5,
zLoc(rank(3,c)) := 2.5,
xLoc(rank(3,c)) := 6
)
)
)
)

Because at Entered Rank 1= conteiner then product
giovanni
Posts: 97
Joined: Friday 21 September, 2012 - 17:30

Re: Unpack

Post by giovanni »

ops

it works but give this error for two product.
779 Time: 1380.15143547813 Atom: Unload1-1 (ID=1732), OnEntered>No atom currently selected: Rank(,)
Post Reply