Skip to main content
Version: V3 (Ignition 8.3)

system.mes.productionOrder.stopProductionOrder

Description

Stops a production order. Sets the status to STOPPED, records the end time (defaulting to now if omitted), and optionally updates the produced quantity.

caution

Throws if the order's status is already CLOSED - no execution operations are permitted on a closed order.

Permissions

This method requires the PRODUCTION_ORDER.EXECUTE permission.

Syntax

system.mes.productionOrder.stopProductionOrder(idOrName, [endDate], [quantityProduced])

Parameters

ParameterTypeNullableDescription
idOrNameStringFalseThe ULID or name of the production order.
endDateDateTrueOptional stop time. If null, the current time is used.
quantityProducedDoubleTrueOptional produced quantity to set on the order.

Returns

Returns a JSON representation of the updated production order.

Code Examples

# Stop a production order
order = system.mes.productionOrder.stopProductionOrder(idOrName="ORDER-001", quantityProduced=200.0)
print order["status"] # "STOPPED"