Page 2 of 3

Re: Unpack

Posted: Thursday 25 October, 2012 - 15:57
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!!

Re: Unpack

Posted: Thursday 25 October, 2012 - 16:18
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

Re: Unpack

Posted: Thursday 25 October, 2012 - 16:31
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.

Re: Unpack

Posted: Thursday 25 October, 2012 - 16:44
by giovanni
I cannot attached mine i attached a made a simple example

Re: Unpack

Posted: Friday 26 October, 2012 - 10:49
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.

Re: Unpack

Posted: Friday 26 October, 2012 - 11:05
by giovanni
Ok thank u, i will try

Re: Unpack

Posted: Friday 26 October, 2012 - 13:13
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

Re: Unpack

Posted: Friday 26 October, 2012 - 13:45
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.

Re: Unpack

Posted: Friday 26 October, 2012 - 16:21
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

Re: Unpack

Posted: Friday 26 October, 2012 - 16:24
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(,)