Skip to main content
Version: V2 (Ignition 8.1)

system.mes.oee.newCalculationConfig

Description

Generates an empty, non-persisted OEE Calculation Configuration object populated with default values. This object provides the structure required to save a new calculation configuration record using system.mes.oee.saveCalculationConfig.

Permissions

This method does not require any permissions.

Syntax

system.mes.oee.newCalculationConfig()

Parameters

This method does not take any parameters.

Returns

A JSON representation of an OeeCalculationConfigurationDTO object with default values, ready to be populated and saved.

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Calculation Configuration (ULID).null
locationIdStringFalseIdentifier for the associated location.null
locationPathStringTruePath for the associated location. For display purposes only.null
periodTypeStringFalsePeriod granularity: HOUR, DAY, WEEK, MONTH, or SHIFT.null
numRowsPerCycleIntegerFalseMaximum number of records to generate per job cycle.1
weekStartDayStringFalseFirst day of the calendar week for WEEK bucketing. One of MONDAY to SUNDAY."MONDAY"
numDaysDelayIntegerFalseMinimum number of days a period must end before it is pre-computed.1
latestCalculationTimestampInstantTrueISO-8601 timestamp of the most recently computed period.null
notesStringTrueNotes associated with the configuration.null
enabledBooleanFalseWhether this configuration is active.true
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

# Create a new OEE calculation configuration object
config = system.mes.oee.newCalculationConfig()

# Populate the required fields
config['locationId'] = 'some-location-id'
config['periodType'] = 'DAY'

# To persist the configuration, pass it to the saveCalculationConfig function
# savedConfig = system.mes.oee.saveCalculationConfig(**config)