PESensor: OnProductUnblocking
Invoked when the sensor ‘Blocked’ property value changes to false
Note: This event does not support multiple subscription. Previous subscription will be lost if subscribe twice.
Event
void xxxxxxxxxxxxxxxxx (sender: object, product: Product);
Parameters
Name | Type | Description |
---|---|---|
sender | Object | The object associated with the changed property |
product | Product | The unblocking product item |
Example
function OnSimulationStart() {
LogDebug("OnSimulationStart called");
SubscribeToEvent("OnProductUnblocking", "PESensor1", "PE Sensor", handleproduct);
}
function handleproduct(sender, product) {
LogDebug("handleproduct:");
MoveProduct(product, "Conveyor2", 0.3);
}