Chute

Properties

Name Type Description
Width Number New in V7.9. Gets/Sets the width of chute
Height Number New in V7.9. Gets/Sets the height of chute
Arc Number New in V7.9. Gets/Sets the arc of chute
Length Number New in V7.9. Gets/Sets the length of chute
Radius Number New in V7.9. Gets/Sets the radius of chute
BaseHeight Number New in V7.9. Gets/Sets the baseheight of chute
SidePanelWidth Number New in V7.9. Gets/Sets the width of side panel
SidePanelHeight Number New in V7.9. Gets/Sets the height of side panel
ProductCount Integer Gets the number of products currently on the chute
IsFull Boolean if true, sorters won't divert bags to the chute
PESensors Array Gets an array of PE Sensors that are on the chute
BaseColor String New in V7.0. Gets/Sets the name of the color of the base
LeftSidePanelColor String New in V7.0. Gets/Sets the name of the color of the left side panel
RightSidePanelColor String New in V7.0. Gets/Sets the name of the color of the right side panel
BaseVisible Boolean New in V7.0. Gets/Sets the visibility of the base
LeftSidePanelVisible Boolean New in V7.0. Gets/Sets the visibility of the left side panel
RightSidePanelVisible Boolean New in V7.0. Gets/Sets the visibility of the right side panel
PreviousConnection Connection Gets previous connection object
NextConnection Connection Gets next connection object
 

Events

OnProductAdded

Invoked when product is added to the chute

Note: This event does not support multiple subscription. Previous subscription will be lost if subscribed twice.

Callback Signature:

void xxxxxxxxxxxxxxxxx(sender: object, product: Product);

 

Parameter NameTypeDescription
senderObjectThe object associated with the changed property
productProductThe added product object instance

OnProductRemoved

Invoked when product is removed from the chute

Note: This event does not support multiple subscription. Previous subscription will be lost if subscribed twice.

Callback Signature:

void xxxxxxxxxxxxxxxxx (sender: object, product: Product);

 

Parameter NameTypeDescription
senderObjectThe object associated with the changed property
productProductThe removed product object instance

OnChuteIsFullStateChange

Invoked when the 'Full PE Sensor' has been blocked by the same product for longer than the 'Full PE sensor Delay' value.

 

You MUST have the Simulate Full Logic property of the Chute enabled for this event to be triggered.

 

Note: This event does not support multiple subscription. Previous subscription will be lost if subscribed twice.

Callback Signature:

void xxxxxxxxxxxxxxxxx (sender: object);

 

Parameter NameTypeDescription
senderObjectThe object associated with the changed property
 

Examples:

SubscribeToEvent("OnChuteIsFullStateChange", "CEXd2.01", "Chute", "ChuteFull")
...
function ChuteFull(sender) {
  LogDebug("ChuteFull:" + sender.Name + " full=" + sender.IsFull);
  ...
}

Functions

blockagehandle CreateBlockage(distance: double, blockagehandle: integer)

New in v5.2

Called to set a blockage on the Chute at the specified distance from the beginning of the Chute with an optionally specified handle. The handle returned is the blockage handle to reference this blockage. If a handle was specified it will be the same handle returned.

NameTypeDescription
distanceDoubleThe distance of the blockage from the beginning of the Chute
blockageHandleIntegerOptional. If not specified, returns a new handle otherwise returns the handle specified

Return value - blockagehandle

By calling CreateBlockage with the same handle the blockage can be moved to a new distance.

 

Using a Product object as the blockage handle can be used to create a blockage linked to a product.

void RemoveBlockage(blockagehandle: integer)

New in v5.2

Called to remove a previously created blockage on the Chute

NameTypeDescription
blockageHandleIntegerThe handle for the blockage to remove

Return value - Void

 

No error is produced if RemoveBlockage is called with a non-existent Blockage handle.

A Blockage can only be removed by specifying its handle.

Refer to the script example for Conveyor.