PESensor: OnProductsOverlap

Invoked when the PESensor senses overlapping product. The event is triggered as the leading edge of the overlapping product breaks the PE beam.

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

Warning

If “Touching Products Do Not Unblock Sensors” is enabled in the project’s system properties, this event will not be invoked as Sym3 will treat overlapping products as one long product.

Event

void xxxxxxxxxxxxxxxxx (sender: object, products: array);

Parameters

Name Type Description
sender Object The object associated with the changed property
products Array An array of blocking Product

Example

SubscribeToEvent("OnProductsOverlap", "PESensor1", "PE Sensor", OnOverlap);

function OnOverlap(sender, units) {
    LogDebug("OnOverlap:"+sender.Name + ":" + units.length);
    PauseSimulation();
}