There are several ways to place or remove Entities to/from containers. One can access the next available or a specific location/MU.
These methods are not interchangeable. Each requires different error checking.
Note, when the Container is created, the contents list is empty.
The software handles 2 cases.
1. The container/transport contains all the same objects. For example, a box full of lug nuts. It does not matter which lug nut you remove as all are exactly the same.
For this case one can use cont.move() to remove the next available object.
An error will occur if the container/transport is entirely empty.
2. The container/transport contains different objects arranged in a specific order/placement.
Where a particular object resides in a particular location one can use
The cont[Column,Row] method has these caveats:
1. If the container slot addressed is empty, an error is issued. This error can be avoided by checking that the slot is not empty before trying to move.
2. If the load sequence changes the wrong part may be removed.
3. If the dimensions (Column,Row) of the container are changed, the subscripting must be changed.
This implies that if one changes the dimensions after creating the controls the model will error out.
The method 'pe' should be used to move MU's to specific positions if they may not yet exist. It will create the slot if it does not exist.
Examples where container has 1 Row and 4 Columns:
Sensor1 loads 4 MU's into the container. It uses 'pe' to place them in the slots.
for ii := 1 to 4 loop
Then Sensor2 removes the 3rd MU.
Then Sensor3 puts an MU in the empty slot
The Sensor4 moves an MU to a slot that does not yet exist.
Notes and References
OS Version: 764SP1