Skip to end of banner
Go to start of banner

Order management API

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In order to fully utilize the order management capabilities of Pally, it is recommended to set the variable rf_order_mode=2 in the initial MoveJ node. This will enable automatic order processing.

The program will wait for orders and process orders, without terminating the program. New orders can have a new pattern name, but each order can only have one specific pattern name.

In Dual Product Mode, each production line can have its own orders that will run simultaneously.

Insert Order

palletmanager_daemon.insert_order(instance, order_number, order_id, order_description, pattern_name, loads)

Creates a new order and inserts it into the list of existing orders at the specified position.

Parameters

instance: pallet manager instance to be used

order_number: a number between 0 and nr_orders-1 that depends on the total number of orders

order_id: order ID that can be used as a foreign key in external systems

order_description: description for the operator

pattern_name: name of the pattern json file to be loaded

loads: an array of integers that should be interpreted as follows:

  • element 0: the number of pallets to be done

  • elements 1…number of pallets: the number of products on the N-th. pallet

Example

palletmanager_daemon.insert_order(0, 0, 123192843, "Shipment to Sogndal", "Salmon", [5, 10, 10, 10, 10, 3])

This will create an order in the first place with name “Shipment to Sogndal”, and palletize 5 pallets, from which 4 will contain 10 boxes and the 5th will only contain 3 boxes of the pattern “Salmon”. The value 123192843 is not used by the program, but can be a foreign key reference to an external production management system in the factory.

Update existing Order

palletmanager_daemon.update_order(instance, order_number, loads)

Updates loads of the specified order. Typical use is after completing a pallet. (Set nr. pallets = nr. pallets -1, and remove the first element from the list)

Parameters

instance: pallet manager instance to be used

order_number: a number between 0 and nr_orders-1 that depends on the total number of orders

loads: an array of integers that should be interpreted as follows:

  • element 0: the number of pallets to be done

  • elements 1…number of pallets: the number of products on the N-th. pallet

Delete existing Order

palletmanager_daemon.delete_order(instance, order_number)

Removes the specified order from the order list. Typical use of this function is when all pallets of the specified order are completed and the 'empty' order can be safely deleted. 

Parameters

instance: pallet manager instance to be used

order_number: a number between 0 and nr_orders-1 that depends on the total number of orders

Delete all Orders

palletmanager_daemon.clear_orders(instance)

Deletes all orders regardless of their completion state. The order list becomes empty.

Parameters

instance: pallet manager instance to be used

Get number of Orders

palletmanager_daemon.get_nr_orders(instance)

Returns the number of orders in the system. This function is useful when creating a new order and adding it to the end of the order list.

Want to know more?

For further information, see the Pallet Manager Daemon reference manual.

  • No labels