{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Kohler",
  "model": "M340",
  "models": ["M340"],
  "vendor_website": "rehlko.com",
  "revision": 3,
  "revised": "2026-11-10",
  "source": "Kohler, \"Protocol Operation: Modbus Communications Protocol\", TP-6113 12/21; https://techcomm.kohler.com/techcomm/pdf/tp6113.pdf",
  "notes": [
    "M340 / M340+ automatic transfer switch controller (through the Modbus/KBUS converter).",
    "Baud rate must be 9600 to match the KBUS side of the converter.",
    "Addresses are zero-based: the manual register 40001 is address 0.",
    "The manual limits a read to 50 registers. Only the monitoring part of the register table is in this map.",
    "Data is available over Modbus RTU (8N1); Modbus TCP needs a Modbus/Ethernet converter."
  ],
  "parity": "N",
  "databits": 8,
  "stopbits": 1,
  "max_read_registers": 50,
  "byte_order": "big",
  "word_order": "little",
  "address_base": 0,
  "x_status": "official",
  "sources": [
    {"title": "Protocol Operation: Modbus Communications Protocol (TP-6113)", "version": "12/21", "date": "2021-12", "url": "https://techcomm.kohler.com/techcomm/pdf/tp6113.pdf", "note": "section 8; register tables also compared with edition 9/14"}
  ],
  "registers": [
    {"name": "System Time", "area": "holding", "address": 1, "type": "uint16", "access": "R"},
    {"name": "Day of Week", "area": "holding", "address": 2, "type": "uint16", "access": "R"},
    {"name": "Month", "area": "holding", "address": 3, "type": "uint16", "access": "R"},
    {"name": "Day", "area": "holding", "address": 4, "type": "uint16", "access": "R"},
    {"name": "Year", "area": "holding", "address": 5, "type": "uint16", "access": "R"},
    {"name": "Week of Month", "area": "holding", "address": 6, "type": "uint16", "access": "R"},
    {"name": "Time Not In Normal Since Reset", "area": "holding", "address": 7, "type": "uint16", "unit": "h", "access": "R"},
    {"name": "Time Not In Normal", "area": "holding", "address": 14, "type": "uint16", "unit": "h", "access": "R"},
    {"name": "Time In Emergency", "area": "holding", "address": 15, "type": "uint16", "unit": "h", "access": "R"},
    {"name": "Days of Operation", "area": "holding", "address": 16, "type": "uint16", "unit": "d", "access": "R"},
    {"name": "Transfers", "area": "holding", "address": 17, "type": "uint16", "access": "R"},
    {"name": "Month in Operation", "area": "holding", "address": 18, "type": "uint16", "access": "R"},
    {"name": "Day in Operation", "area": "holding", "address": 19, "type": "uint16", "access": "R"},
    {"name": "Year in Operation", "area": "holding", "address": 20, "type": "uint16", "access": "R"},
    {"name": "Voltage A-B Normal", "area": "holding", "address": 21, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Voltage B-C Normal", "area": "holding", "address": 22, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Voltage C-A Normal", "area": "holding", "address": 23, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Freq. A-C Normal", "area": "holding", "address": 24, "type": "uint16", "unit": "Hz", "access": "R"},
    {"name": "Voltage A-B Emerg.", "area": "holding", "address": 25, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Voltage B-C Emerg.", "area": "holding", "address": 26, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Voltage C-A Emerg.", "area": "holding", "address": 27, "type": "uint16", "unit": "V", "access": "R"},
    {"name": "Freq. A-C Emerg.", "area": "holding", "address": 28, "type": "uint16", "unit": "Hz", "access": "R"},
    {"name": "Exerciser Time Remaining", "area": "holding", "address": 29, "type": "uint16", "access": "R"},
    {"name": "Month of Last Exercise", "area": "holding", "address": 30, "type": "uint16", "access": "R"},
    {"name": "Day of Last Exercise", "area": "holding", "address": 31, "type": "uint16", "access": "R"},
    {"name": "Year of Last Exercise", "area": "holding", "address": 32, "type": "uint16", "access": "R"},
    {"name": "Time of Last Outage", "area": "holding", "address": 33, "type": "uint16", "access": "R"},
    {"name": "Month of Last Outage", "area": "holding", "address": 34, "type": "uint16", "access": "R"},
    {"name": "Day of Last Outage", "area": "holding", "address": 35, "type": "uint16", "access": "R"},
    {"name": "Year of Last Outage", "area": "holding", "address": 36, "type": "uint16", "access": "R"},
    {"name": "Duration of Last Outage", "area": "holding", "address": 37, "type": "uint16", "access": "R"},
    {"name": "History Event #1 Code", "area": "holding", "address": 38, "type": "uint16", "access": "R"},
    {"name": "History Event #2 Code", "area": "holding", "address": 39, "type": "uint16", "access": "R"},
    {"name": "History Event #2 Month", "area": "holding", "address": 40, "type": "uint16", "access": "R"},
    {"name": "History Event #2 Day", "area": "holding", "address": 41, "type": "uint16", "access": "R"},
    {"name": "History Event #2 Year", "area": "holding", "address": 42, "type": "uint16", "access": "R"},
    {"name": "History Event #3 Code", "area": "holding", "address": 43, "type": "uint16", "access": "R"},
    {"name": "History Event #3 Month", "area": "holding", "address": 44, "type": "uint16", "access": "R"},
    {"name": "History Event #3 Day", "area": "holding", "address": 45, "type": "uint16", "access": "R"},
    {"name": "History Event #3 Year", "area": "holding", "address": 46, "type": "uint16", "access": "R"},
    {"name": "History Event #4 Code", "area": "holding", "address": 47, "type": "uint16", "access": "R"},
    {"name": "History Event #4 Month", "area": "holding", "address": 48, "type": "uint16", "access": "R"},
    {"name": "History Event #4 Day", "area": "holding", "address": 49, "type": "uint16", "access": "R"},
    {"name": "History Event #4 Year", "area": "holding", "address": 50, "type": "uint16", "access": "R"},
    {"name": "Alert Code", "area": "holding", "address": 51, "type": "uint16", "access": "R"},
    {"name": "Off to Emergency Time Delay", "area": "holding", "address": 77, "type": "uint16", "unit": "s", "access": "R"},
    {"name": "Off to Normal Time Delay", "area": "holding", "address": 78, "type": "uint16", "unit": "s", "access": "R"},
    {"name": "Engine Start Time Delay", "area": "holding", "address": 79, "type": "uint16", "access": "R"},
    {"name": "Normal to Emerg. Time Delay", "area": "holding", "address": 80, "type": "uint16", "access": "R"},
    {"name": "Emerg. To Normal Time Delay", "area": "holding", "address": 81, "type": "uint16", "access": "R"}
  ]
}
