{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Socomec",
  "model": "DIRIS A-40",
  "models": ["DIRIS A-40"],
  "vendor_website": "socomec.com",
  "description": "Multifunction power monitoring device — V/I/P/Q/S per phase and system, power factor, frequency, THD and energy meters (scaled U32/S32, BE).",
  "revision": 2,
  "source": "Omni Console device library (OmniCoreST), modbus-library/socomec-diris-a40.toml; Source: Socomec \"DIRIS A-40 v1.7.4 communication table\" (Power Monitoring AC. Not verified against the manufacturer's documentation",
  "notes": [
    "Socomec DIRIS A-40.",
    "Converted automatically from the Omni Console device library (OmniCoreST).",
    "Not verified against the manufacturer's documentation.",
    "Corrections are welcome (CONTRIBUTING.md). Change x_status once this table has been checked against the manual.",
    "| Socomec DIRIS A-40 — Modbus / JBUS register map for Omni Console",
    "|",
    "| Source: Socomec \"DIRIS A-40 v1.7.4 communication table\" (Power Monitoring AC",
    "| real-time block @ 0x4804 and Energy AC block @ 0x4D80). Read with FC03.",
    "| - Multi-register values are Big-Endian (most-significant word first), the",
    "| Socomec default — `word_order` defaults to \"be\" and is omitted.",
    "| - Manual \"value weight\" is folded into `scale`:",
    "| V x10^-2 -> 0.01    mA -> 0.001    mHz -> 0.001",
    "| PF /1000 -> 0.001   THD % /100 -> 0.01     W / var / VA -> 1 (raw)",
    "| Active energy counts in kWh, apparent in kVAh and reactive in kvarh",
    "| (manual weight varh x10^3) — represented directly in those units (no scale).",
    "| - Addresses are the protocol addresses, in decimal (e.g. 0x4804 = 18436).",
    "| - Factory defaults: device address (slave) = 5, RTU = 9600 baud (check unit).",
    "|"
  ],
  "byte_order": "big",
  "word_order": "big",
  "address_base": 0,
  "x_status": "unofficial",
  "x_origin": "omniconsole",
  "registers": [
    {"name": "System voltage Ph-N", "area": "holding", "address": 18436, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "System voltage Ph-Ph", "area": "holding", "address": 18438, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "System current", "area": "holding", "address": 18440, "type": "uint32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Frequency", "area": "holding", "address": 18442, "type": "uint32", "scale": 0.001, "unit": "Hz", "access": "R"},
    {"name": "Voltage V1 (L1-N)", "area": "holding", "address": 18444, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage V2 (L2-N)", "area": "holding", "address": 18446, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage V3 (L3-N)", "area": "holding", "address": 18448, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage Vn (neutral)", "area": "holding", "address": 18450, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage U12 (L1-L2)", "area": "holding", "address": 18452, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage U23 (L2-L3)", "area": "holding", "address": 18454, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Voltage U31 (L3-L1)", "area": "holding", "address": 18456, "type": "uint32", "scale": 0.01, "unit": "V", "access": "R"},
    {"name": "Current I1", "area": "holding", "address": 18458, "type": "uint32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current I2", "area": "holding", "address": 18460, "type": "uint32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current I3", "area": "holding", "address": 18462, "type": "uint32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Current In (neutral)", "area": "holding", "address": 18464, "type": "uint32", "scale": 0.001, "unit": "A", "access": "R"},
    {"name": "Total active power", "area": "holding", "address": 18476, "type": "int32", "unit": "W", "access": "R"},
    {"name": "Total reactive power", "area": "holding", "address": 18478, "type": "int32", "unit": "var", "access": "R"},
    {"name": "Total apparent power", "area": "holding", "address": 18484, "type": "uint32", "unit": "VA", "access": "R"},
    {"name": "Total power factor", "area": "holding", "address": 18486, "type": "int16", "scale": 0.001, "access": "R"},
    {"name": "Active power P1", "area": "holding", "address": 18488, "type": "int32", "unit": "W", "access": "R"},
    {"name": "Active power P2", "area": "holding", "address": 18490, "type": "int32", "unit": "W", "access": "R"},
    {"name": "Active power P3", "area": "holding", "address": 18492, "type": "int32", "unit": "W", "access": "R"},
    {"name": "Reactive power Q1", "area": "holding", "address": 18494, "type": "int32", "unit": "var", "access": "R"},
    {"name": "Reactive power Q2", "area": "holding", "address": 18496, "type": "int32", "unit": "var", "access": "R"},
    {"name": "Reactive power Q3", "area": "holding", "address": 18498, "type": "int32", "unit": "var", "access": "R"},
    {"name": "Apparent power S1", "area": "holding", "address": 18512, "type": "uint32", "unit": "VA", "access": "R"},
    {"name": "Apparent power S2", "area": "holding", "address": 18514, "type": "uint32", "unit": "VA", "access": "R"},
    {"name": "Apparent power S3", "area": "holding", "address": 18516, "type": "uint32", "unit": "VA", "access": "R"},
    {"name": "Power factor PF1", "area": "holding", "address": 18518, "type": "int16", "scale": 0.001, "access": "R"},
    {"name": "Power factor PF2", "area": "holding", "address": 18519, "type": "int16", "scale": 0.001, "access": "R"},
    {"name": "Power factor PF3", "area": "holding", "address": 18520, "type": "int16", "scale": 0.001, "access": "R"},
    {"name": "THD voltage V1", "area": "holding", "address": 18751, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "THD voltage V2", "area": "holding", "address": 18752, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "THD voltage V3", "area": "holding", "address": 18753, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "THD current I1", "area": "holding", "address": 18757, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "THD current I2", "area": "holding", "address": 18758, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "THD current I3", "area": "holding", "address": 18759, "type": "uint16", "scale": 0.01, "unit": "%", "access": "R"},
    {"name": "Total hour meter", "area": "holding", "address": 19841, "type": "uint32", "unit": "s", "access": "R"},
    {"name": "Total positive active energy Ea+", "area": "holding", "address": 19843, "type": "uint32", "unit": "kWh", "access": "R"},
    {"name": "Total negative active energy Ea-", "area": "holding", "address": 19846, "type": "uint32", "unit": "kWh", "access": "R"},
    {"name": "Total positive reactive energy Er+", "area": "holding", "address": 19849, "type": "uint32", "unit": "kvarh", "access": "R"},
    {"name": "Total negative reactive energy Er-", "area": "holding", "address": 19852, "type": "uint32", "unit": "kvarh", "access": "R"},
    {"name": "Total apparent energy Eap", "area": "holding", "address": 19855, "type": "uint32", "unit": "kVAh", "access": "R"}
  ]
}
