a materials handling device , such as a palletizer and / or depalletizer , which may be adapted to operate in either mode , has a mechanism , for feeding pallets to be loaded and ejecting pallets which have been unloaded , at the top of the device . the pallets are introduced into a bay and placed onto an elevator and sequentially indexed upwards a distance equal to each layer to be unloaded or downward a distance equal to each layer to be loaded . the pallets in the machine are indexed to a standard position . ejection and introduction of loaded and unloaded pallets is automatically sequenced .