displaying of unpack content

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
LAC-Bursi
Posts: 41
Joined: Friday 09 November, 2012 - 10:37

displaying of unpack content

Post by LAC-Bursi »

Hi,
I want to display the unpack content. i have a container with some products inside, but i can't displaying the products on 3D. Could you help me please?

thank you in advance

Fabio
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: displaying of unpack content

Post by marlies »

Hello,

It might be for several reasons:
- When you use a container atom it is important to check the settings "container sizes" and "storage sizes" on the container atom.
- When you use a assembler to pack the contents it is important to check the settings "pack contents" and "display contents" in the parameter window of the assembler atom.

To see the effect of these settings you could have a look at the example model Assembly1.mod which can be found in the ED directory \Work\Examples\English\Operations\

I hope this gives you a clue to solve the problem. If not, could you please attach (part of) your model?

Regards, Marlies
LAC-Bursi
Posts: 41
Joined: Friday 09 November, 2012 - 10:37

Re: displaying of unpack content

Post by LAC-Bursi »

I have attached my project.
In the Unpack1 atom I can display the container centered, but I do not know where I should write the code to display the container contents.

I have also attached the txt with custom features to be loaded into the library

Thanks for your reply

Fabio
Attachments
Unpack.mod
Project
(234.3 KiB) Downloaded 326 times
LAC - Functions.atm
Functions
(3.43 KiB) Downloaded 306 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: displaying of unpack content

Post by marlies »

Hi,

I assume that you mean to set the location of the products when the unpack is blocked and products are waiting to be sent to the next queue. That's a nice one..

I noticed that you already changed some of the standard atom code in the Atom Editor. I would advice that you that for this problem as well.

The unpack atom now has the following code in the OnEntered:

Code: Select all

{if needed because moveatom is used causes this trigger to go off}
if(
 <>(ic(c),0),
 do(
  setloc((xsize(c)-xsize(i))/2,(ysize(c)-ysize(i))/2,zsize(c),i),
  closeallic(c),
  setstatus(2,c),
  att(4,c),
  createevent(att(2,c),c,1)  
 )
)
Because of the condition

Code: Select all

ic(c) <> 0
the code is executed only when a new container entered. When the products are being unpacked, they get moved from the container into the unpack atom. As they are moved directly, the channel through which they enter is 0. So, you could use the else statement and change the ontered like this:

Code: Select all

{if needed because moveatom is used causes this trigger to go off}
if(
 <>(ic(c),0),
 do(
  setloc((xsize(c)-xsize(i))/2,(ysize(c)-ysize(i))/2,zsize(c),i),
  closeallic(c),
  setstatus(2,c),
  att(4,c),
  createevent(att(2,c),c,1)  
 ),
 { else this is a unpacked product, change location }
 setloc(0.5,0.5,zsize(c), i)
)
Regards, Marlies
LAC-Bursi
Posts: 41
Joined: Friday 09 November, 2012 - 10:37

Re: displaying of unpack content

Post by LAC-Bursi »

PROBLEM SOLVED!! :D

Your reply was very useful!

Thank you so much!

Fabio
Post Reply