Skip to main content
Version: V2 (Ignition 8.1)

system.mes.meter.getMeterConfigurationsForEquipment

Description

Retrieves all Meter Configuration records for a specific piece of equipment.

Permissions

This method requires the METERING.READ.GET permission.

Syntax

system.mes.meter.getMeterConfigurationsForEquipment(equipmentIdOrPath)

Parameters

ParameterTypeNullableDescription
equipmentIdOrPathStringFalseThe ID or path of the equipment.

Returns

Returns a list of JSON objects representing all Meter Configurations for the specified equipment. Each object in the list has the following properties:

NameTypeDescription
idString (ULID)The ULID of the Meter Configuration.
nameStringDisplay name for this meter configuration.
descriptionStringOptional description.
equipmentIdString (ULID)The ULID of the equipment this configuration is attached to.
equipmentPathStringPath of the associated equipment.
locationPathStringPath of the equipment's location.
maxRecordDurationSecondsIntegerMaximum record duration in seconds.
maxTimeBetweenExecutionsSecondsIntegerMaximum seconds between data collection executions.
maxFlushIntervalSecondsIntegerMaximum seconds between database flush operations.
pruneDaysIntegerNumber of days to retain completed records before pruning.
meterTypeIdString (ULID)The ULID of the Meter Type being measured.
meterTypeNameStringName of the associated Meter Type.
usageExpressionStringIgnition expression returning the current usage counter value.
overflowValueDoubleMaximum counter value before rollover. Null means no rollover.
costSourceStringSource for cost calculation. One of: STATIC, FROM_METER_TYPE, EXPRESSION.
costDoubleStatic cost per unit of measure.
costExpressionStringIgnition expression returning cost per unit.
notesStringNotes related to the meter configuration.
enabledBooleanIndicates if the meter configuration is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve all Meter Configurations for a specific piece of equipment
meterConfigs = system.mes.meter.getMeterConfigurationsForEquipment('Enterprise/Site/Line1')

# Output the list of Meter Configurations
print(meterConfigs)