{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Circutor",
  "model": "CEM-C31",
  "models": ["CEM-C31", "CEM-C31-485-T1", "CEM-C31-485-DS", "CEM-C31-485-T1-MID", "CEM-C31-485-DS-MID"],
  "vendor_website": "circutor.com",
  "description": "Three-phase energy meter for current transformers, DIN rail, with RS-485 (Modbus RTU) on the -485 models",
  "revision": 2,
  "revised": "2026-10-17",
  "source": "Circutor, \"CEM-C31 energy meter instruction manual\", M017B01-03-23A",
  "sources": [{"title": "CEM-C31 Energy meter, Instruction manual", "version": "M017B01-03-23A", "url": "https://docs.circutor.com/docs/M017B01-03.pdf", "note": "section 7.2.3, tables 17-25"}],
  "notes": [
    "Read with FC03 or FC04 and write with FC10; a request must cover the full size of each variable.",
    "Energies per tariff (0x0100-0x0137), the digital input and impulse counters are only on the CEM-C31-485-DS with the matching digital input type."
  ],
  "protocol": "rtu",
  "unit_id": 1,
  "baudrate": 9600,
  "parity": "N",
  "databits": 8,
  "stopbits": 1,
  "byte_order": "big",
  "word_order": "big",
  "address_base": 0,
  "x_status": "official",
  "registers": [
    {"name": "Imported active energy", "group": "Energy", "area": "holding", "address": "0x0000", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Exported active energy", "group": "Energy", "area": "holding", "address": "0x0002", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Q1 reactive energy", "group": "Energy", "area": "holding", "address": "0x0004", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q2 reactive energy", "group": "Energy", "area": "holding", "address": "0x0006", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q3 reactive energy", "group": "Energy", "area": "holding", "address": "0x0008", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q4 reactive energy", "group": "Energy", "area": "holding", "address": "0x000A", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Partial imported active energy", "group": "Energy", "area": "holding", "address": "0x0030", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Partial exported active energy", "group": "Energy", "area": "holding", "address": "0x0032", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Partial q1 reactive energy", "group": "Energy", "area": "holding", "address": "0x0034", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Partial q2 reactive energy", "group": "Energy", "area": "holding", "address": "0x0036", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Partial q3 reactive energy", "group": "Energy", "area": "holding", "address": "0x0038", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Partial q4 reactive energy", "group": "Energy", "area": "holding", "address": "0x003A", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Imported active energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x0100", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Exported active energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x0102", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Q1 reactive energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x0104", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q2 reactive energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x0106", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q3 reactive energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x0108", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q4 reactive energy tariff 1", "group": "Tariffs", "area": "holding", "address": "0x010A", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Imported active energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x010C", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Exported active energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x010E", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Q1 reactive energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x0110", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q2 reactive energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x0112", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q3 reactive energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x0114", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q4 reactive energy tariff 2", "group": "Tariffs", "area": "holding", "address": "0x0116", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Imported active energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x0120", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Exported active energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x0122", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Q1 reactive energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x0124", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q2 reactive energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x0126", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q3 reactive energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x0128", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q4 reactive energy tariff 1, partial", "group": "Tariffs", "area": "holding", "address": "0x012A", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Imported active energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x012C", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Exported active energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x012E", "type": "uint32", "unit": "Wh", "access": "R"},
    {"name": "Q1 reactive energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x0130", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q2 reactive energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x0132", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q3 reactive energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x0134", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Q4 reactive energy tariff 2, partial", "group": "Tariffs", "area": "holding", "address": "0x0136", "type": "uint32", "unit": "varh", "access": "R"},
    {"name": "Partial energy reset", "group": "Commands", "area": "coil", "address": "0x0800", "type": "bool", "access": "W", "description": "Write ON (0xFF00) with FC05"},
    {"name": "Phase 1 voltage", "group": "Measurements", "area": "holding", "address": "0x0732", "type": "int32", "scale": 0.1, "unit": "V", "access": "R", "description": "Primary value"},
    {"name": "Phase 2 voltage", "group": "Measurements", "area": "holding", "address": "0x0734", "type": "int32", "scale": 0.1, "unit": "V", "access": "R", "description": "Primary value"},
    {"name": "Phase 3 voltage", "group": "Measurements", "area": "holding", "address": "0x0736", "type": "int32", "scale": 0.1, "unit": "V", "access": "R", "description": "Primary value"},
    {"name": "Phase 1 current", "group": "Measurements", "area": "holding", "address": "0x0738", "type": "int32", "scale": 0.01, "unit": "A", "access": "R", "description": "Primary value"},
    {"name": "Phase 2 current", "group": "Measurements", "area": "holding", "address": "0x073A", "type": "int32", "scale": 0.01, "unit": "A", "access": "R", "description": "Primary value"},
    {"name": "Phase 3 current", "group": "Measurements", "area": "holding", "address": "0x073C", "type": "int32", "scale": 0.01, "unit": "A", "access": "R", "description": "Primary value"},
    {"name": "Phase 1 cos φ", "group": "Measurements", "area": "holding", "address": "0x073E", "type": "int32", "scale": 0.01, "access": "R"},
    {"name": "Phase 2 cos φ", "group": "Measurements", "area": "holding", "address": "0x0740", "type": "int32", "scale": 0.01, "access": "R"},
    {"name": "Phase 3 cos φ", "group": "Measurements", "area": "holding", "address": "0x0742", "type": "int32", "scale": 0.01, "access": "R"},
    {"name": "Phase 1 active power", "group": "Measurements", "area": "holding", "address": "0x0746", "type": "int32", "unit": "W", "access": "R"},
    {"name": "Phase 2 active power", "group": "Measurements", "area": "holding", "address": "0x0748", "type": "int32", "unit": "W", "access": "R"},
    {"name": "Phase 3 active power", "group": "Measurements", "area": "holding", "address": "0x074A", "type": "int32", "unit": "W", "access": "R"},
    {"name": "Total active power", "group": "Measurements", "area": "holding", "address": "0x074C", "type": "int32", "unit": "W", "access": "R"},
    {"name": "Phase 1 reactive power", "group": "Measurements", "area": "holding", "address": "0x074E", "type": "int32", "unit": "var", "access": "R"},
    {"name": "Phase 2 reactive power", "group": "Measurements", "area": "holding", "address": "0x0750", "type": "int32", "unit": "var", "access": "R"},
    {"name": "Phase 3 reactive power", "group": "Measurements", "area": "holding", "address": "0x0752", "type": "int32", "unit": "var", "access": "R"},
    {"name": "Total reactive power", "group": "Measurements", "area": "holding", "address": "0x0754", "type": "int32", "unit": "var", "access": "R"},
    {"name": "Phase 1 apparent power", "group": "Measurements", "area": "holding", "address": "0x0756", "type": "int32", "unit": "VA", "access": "R"},
    {"name": "Phase 2 apparent power", "group": "Measurements", "area": "holding", "address": "0x0758", "type": "int32", "unit": "VA", "access": "R"},
    {"name": "Phase 3 apparent power", "group": "Measurements", "area": "holding", "address": "0x075A", "type": "int32", "unit": "VA", "access": "R"},
    {"name": "Total apparent power", "group": "Measurements", "area": "holding", "address": "0x075C", "type": "int32", "unit": "VA", "access": "R"},
    {"name": "Digital input status", "group": "Digital input", "area": "holding", "address": "0x0020", "type": "uint16", "access": "R"},
    {"name": "Total impulse count", "group": "Digital input", "area": "holding", "address": "0x0180", "type": "uint32", "access": "R"},
    {"name": "Partial impulse count", "group": "Digital input", "area": "holding", "address": "0x0182", "type": "uint32", "access": "R"},
    {"name": "Cost of the partial consumption", "group": "Counters", "area": "holding", "address": "0x00C0", "type": "uint32", "access": "R"},
    {"name": "CO2 emissions of the partial consumption", "group": "Counters", "area": "holding", "address": "0x00C2", "type": "uint32", "unit": "kg", "access": "R"},
    {"name": "Partial operating time", "group": "Counters", "area": "holding", "address": "0x00C4", "type": "uint32", "unit": "s", "access": "R"},
    {"name": "Total operating time", "group": "Counters", "area": "holding", "address": "0x00C6", "type": "uint32", "unit": "s", "access": "R"},
    {"name": "Energy meter model", "group": "Device", "area": "holding", "address": "0xF010", "type": "string", "length": 6, "access": "R", "description": "12 ASCII characters coding the options (manual table 24)"},
    {"name": "Serial number", "group": "Device", "area": "holding", "address": "0x0060", "type": "uint32", "access": "R", "role": "serial"},
    {"name": "Identifier ID number", "group": "Device", "area": "holding", "address": "0x0068", "type": "uint32", "access": "R"},
    {"name": "Firmware version major", "group": "Device", "area": "holding", "address": "0x0050", "type": "uint16", "access": "R", "role": "firmware"},
    {"name": "Firmware version minor", "group": "Device", "area": "holding", "address": "0x0051", "type": "uint16", "access": "R", "role": "firmware"},
    {"name": "Firmware version revision", "group": "Device", "area": "holding", "address": "0x0052", "type": "uint16", "access": "R", "role": "firmware"},
    {"name": "Voltage primary", "group": "Settings", "area": "holding", "address": "0x044C", "type": "uint32", "unit": "V", "access": "RW"},
    {"name": "Voltage secondary", "group": "Settings", "area": "holding", "address": "0x044E", "type": "uint32", "unit": "V", "access": "RW"},
    {"name": "Current primary", "group": "Settings", "area": "holding", "address": "0x0450", "type": "uint32", "unit": "A", "access": "RW"},
    {"name": "Current secondary", "group": "Settings", "area": "holding", "address": "0x0452", "type": "uint32", "unit": "A", "access": "RW"},
    {"name": "Impulse output type", "group": "Settings", "area": "holding", "address": "0x0080", "type": "uint16", "access": "RW", "enum": {"0": "Active energy", "1": "Reactive energy"}},
    {"name": "Impulse output weight", "group": "Settings", "area": "holding", "address": "0x0081", "type": "uint16", "unit": "Wh", "access": "RW", "description": "Wh per impulse"},
    {"name": "Digital input type", "group": "Settings", "area": "holding", "address": "0x0454", "type": "uint16", "access": "RW", "enum": {"0": "Tariff", "1": "Impulse counter"}},
    {"name": "Modbus address", "group": "Settings", "area": "holding", "address": "0x03E8", "type": "uint16", "access": "RW", "write_min": 1, "write_max": 254, "description": "Default 1"},
    {"name": "Transmission speed", "group": "Settings", "area": "holding", "address": "0x03E9", "type": "uint16", "access": "RW", "enum": {"0": "9600", "1": "19200", "2": "38400"}, "description": "Default 0"},
    {"name": "Communications configuration", "group": "Settings", "area": "holding", "address": "0x03EA", "type": "uint16", "access": "RW", "enum": {"0": "8N1", "1": "8E1", "2": "8O1", "3": "8N2", "4": "8E2", "5": "8O2"}, "description": "Default 0"},
    {"name": "Cost per kWh", "group": "Settings", "area": "holding", "address": "0x00B0", "type": "uint32", "scale": 0.0001, "access": "RW"},
    {"name": "CO2 per kWh", "group": "Settings", "area": "holding", "address": "0x00B2", "type": "uint32", "scale": 0.0001, "unit": "kg", "access": "RW"},
    {"name": "Display visualisation", "group": "Settings", "area": "holding", "address": "0x00B4", "type": "uint16", "access": "RW", "description": "Bit 0 partial energies, bit 1 tariffs, bit 2 reactive energy, bit 3 impulse, bit 4 efficiency factors"},
    {"name": "Backlight", "group": "Settings", "area": "holding", "address": "0x00B5", "type": "uint16", "unit": "s", "access": "RW", "write_min": 0, "write_max": 120, "description": "Default 60"}
  ]
}
