FreeRollerConveyor: OnProductRemoved
Invoked when a product is removed from the free roller conveyor
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 removed product |
Example
var oConv = GetComponentByNameAndType("FreeRollerConveyor1", "Free Roller Conveyor");
function onAdded1(sender, product) { // will be called when products are added to the FRC
LogDebug("Added " + sender.Name);
LogDebug("Added " + product.Name);
}
function onRemoved1(sender, product) { // will be called when products are removed from the FRC
LogDebug("removed " + sender.Name);
LogDebug("removed " + product.Name);
}
function OnSimulationStart() {
LogDebug("OnSimulationStart called");
Subscribe("OnProductAdded", "FreeRollerConveyor1", "onAdded1");
Subscribe("OnProductRemoved", "FreeRollerConveyor1", "onRemoved1");
}