Page 1 of 3

Unpack

Posted: Tuesday 23 October, 2012 - 16:12
by giovanni
Hello

I´making my the three d visualization.
When the container with product go in the unpack atom, the product on the container go down or mix with the container.
How can i manage this problem, the product must stay on the container?

Thank

Giovanni

Re: Unpack

Posted: Tuesday 23 October, 2012 - 16:43
by giovanni
Sorry another thing if there are two products they are set in the same posisiton
Is it possible that the two product stay in two different position ?

Re: Unpack

Posted: Wednesday 24 October, 2012 - 18:04
by MatthijsJongboer
The unpack atom is used to split the atoms; the products go to channel 1 and the container to channel 2 as described in the help.
So when you have a mixer, what functionality do you expect? multiple products go in and 1 comes out? This is more a assembler.

If your interest is in 3D, you can modify the locations (x,y,z) of the contents of the container.

Re: Unpack

Posted: Wednesday 24 October, 2012 - 18:11
by giovanni
yes 3D how can i manage this : to select the position of the contenet of container. I just need for the 3D simulation.

Re: Unpack

Posted: Wednesday 24 October, 2012 - 18:31
by giovanni
I found no problem

thank u very much

Re: Unpack

Posted: Thursday 25 October, 2012 - 09:36
by MatthijsJongboer
You're welcome.
In addition, you can have a look at the On3DDraw eventhandler to fully tweak your 3D visualization.

Re: Unpack

Posted: Thursday 25 October, 2012 - 10:51
by giovanni
Hello

For the same problem how can i point the product on the container i try but i don´t find any solution.

I put i label on product and say :
if(Label([Positionontrain],i)=1,
zloc(i):=2,
if(Label([Positionontrain],i)=2,
do(
zLoc(i):=1.5,
xloc(i):=6
),0
)

But doesn´t work.
Can u give me some advace ?

Thank u

Re: Unpack

Posted: Thursday 25 October, 2012 - 14:04
by MatthijsJongboer
Your code contain syntax errors.
If you were to have multiple position available, you can use the case statement for each position.
Place them with comment and within 'do ()' code to make it readable.
Your code would then look something like:

Code: Select all

Case(
 Label([Positionontrain],i),
 {position 1}
 do(
  zloc(i):=2
 ),
 {position 2}
 do(
  zloc(i):=2.5,
  xloc(i):=6 
 ),
 {position 3}
 do(
  zloc(i):=2
 ),
 {position 4}
 do(
  zloc(i):=2
 )
)
Make sure atom reference i exists (so on the entrytrigger or exittrigger).

Re: Unpack

Posted: Thursday 25 October, 2012 - 14:45
by giovanni
I put the code in the trigger on entry, right?

And it still doesn´t work because with (i) it point every time the container and no the proudct on it.
How can i point the product?

Re: Unpack

Posted: Thursday 25 October, 2012 - 15:02
by MatthijsJongboer
Of course. You're right. The products are inside the container.
Then you need to get the product from the container.
the first product will then be:

Code: Select all

first(i)
or using the rank

Code: Select all

rank(1,i)