{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Unipi Technology",
  "model": "Patron S207",
  "models": [
    "Patron S207"
  ],
  "vendor_website": "www.unipi.technology",
  "description": "Modbus TCP PLC unit with 8 digital inputs and 8 relay outputs",
  "x_status": "official",
  "revision": 3,
  "revised": "2026-11-10",
  "source": "Patron S207 Modbus map v2.0, Unipi technology",
  "sources": [
    {
      "title": "Patron S207 Modbus map",
      "version": "2.0",
      "url": "https://kb.unipi.technology/_media/files:products:patron:unipi-patron-s207-modbus-map-v2.0.pdf",
      "note": "Registers and Coils sheets"
    }
  ],
  "notes": [
    "Registers are 0-based and use the Unit 0 addresses of the document, which cover every section of the device. Multi-register values (32-bit counters, serial number, floats) are read here with the most significant register first, as the document states.",
    "Reserved, obsolete and internal registers, and registers reachable only through a section unit (Unit 1 to 3), are left out."
  ],
  "protocol": "tcp",
  "unit_id": 0,
  "port": 502,
  "byte_order": "big",
  "word_order": "big",
  "address_base": 0,
  "enums": {

  },
  "registers": [
    {"name": "Digital Input 1.1", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 0, "access": "R"},
    {"name": "Digital Input 1.2", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 1, "access": "R"},
    {"name": "Digital Input 1.3", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 2, "access": "R"},
    {"name": "Digital Input 1.4", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 3, "access": "R"},
    {"name": "Digital Input 1.5", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 4, "access": "R"},
    {"name": "Digital Input 1.6", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 5, "access": "R"},
    {"name": "Digital Input 1.7", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 6, "access": "R"},
    {"name": "Digital Input 1.8", "group": "Digital inputs", "area": "holding", "address": 0, "type": "bool", "bit": 7, "access": "R"},
    {"name": "Relay Output 1.1", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Relay Output 1.2", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Relay Output 1.3", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Relay Output 1.4", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Relay Output 1.5", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Relay Output 1.6", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Relay Output 1.7", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Relay Output 1.8", "group": "Relay outputs", "area": "holding", "address": 1, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "MWD Enable", "group": "Watchdog", "area": "holding", "address": 2, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "MWD Reboot Detected", "group": "Watchdog", "area": "holding", "address": 2, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Counter of Digital Input 1.1", "group": "Counters", "area": "holding", "address": 3, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.2", "group": "Counters", "area": "holding", "address": 5, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.3", "group": "Counters", "area": "holding", "address": 7, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.4", "group": "Counters", "area": "holding", "address": 9, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.5", "group": "Counters", "area": "holding", "address": 11, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.6", "group": "Counters", "area": "holding", "address": 13, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.7", "group": "Counters", "area": "holding", "address": 15, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Counter of Digital Input 1.8", "group": "Counters", "area": "holding", "address": 17, "type": "uint32", "access": "RW", "description": "Pulse counter; writable to reset"},
    {"name": "Synchronised DO/RO 1.1", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Synchronised DO/RO 1.2", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Synchronised DO/RO 1.3", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Synchronised DO/RO 1.4", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Synchronised DO/RO 1.5", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Synchronised DO/RO 1.6", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Synchronised DO/RO 1.7", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Synchronised DO/RO 1.8", "group": "Synchronised outputs", "area": "holding", "address": 23, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.1", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.2", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.3", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.4", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.5", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.6", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.7", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Synchronised DO/RO Lock 1.8", "group": "Synchronised outputs", "area": "holding", "address": 24, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "Firmware Version", "group": "Info", "area": "holding", "address": 1000, "type": "uint16", "access": "R", "role": "firmware", "description": "Firmware version of the section (raw number)"},
    {"name": "Number of DIs", "group": "Info", "area": "holding", "address": 1001, "type": "uint16", "bit": 0, "bits": 8, "access": "R"},
    {"name": "Number of DOs", "group": "Info", "area": "holding", "address": 1001, "type": "uint16", "bit": 8, "bits": 8, "access": "R"},
    {"name": "Number of internal RS485 lines", "group": "Info", "area": "holding", "address": 1002, "type": "uint16", "bit": 0, "bits": 4, "access": "R"},
    {"name": "Number of AOs", "group": "Info", "area": "holding", "address": 1002, "type": "uint16", "bit": 4, "bits": 4, "access": "R"},
    {"name": "Number of AIs", "group": "Info", "area": "holding", "address": 1002, "type": "uint16", "bit": 8, "bits": 8, "access": "R"},
    {"name": "Firmware ID", "group": "Info", "area": "holding", "address": 1003, "type": "uint16", "access": "R"},
    {"name": "Hardware ID", "group": "Info", "area": "holding", "address": 1004, "type": "uint16", "access": "R"},
    {"name": "PCB Serial Number", "group": "Info", "area": "holding", "address": 1005, "type": "uint32", "access": "R", "role": "serial"},
    {"name": "RS485 RX queue not empty", "group": "Interrupt mask", "area": "holding", "address": 1007, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "RS485 TX queue empty", "group": "Interrupt mask", "area": "holding", "address": 1007, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "RS485 ModBus RX frame finished", "group": "Interrupt mask", "area": "holding", "address": 1007, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Digital Input changed state", "group": "Interrupt mask", "area": "holding", "address": 1007, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "MWD Timeout (in 1ms)", "group": "Watchdog", "area": "holding", "address": 1008, "type": "uint16", "access": "RW", "unit": "ms"},
    {"name": "VRef of MCU", "group": "Info", "area": "holding", "address": 1009, "type": "uint16", "access": "R", "description": "Reference voltage of the MCU (raw)"},
    {"name": "Debounce time (in 100us) for DI 1.1", "group": "Settings", "area": "holding", "address": 1010, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.2", "group": "Settings", "area": "holding", "address": 1011, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.3", "group": "Settings", "area": "holding", "address": 1012, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.4", "group": "Settings", "area": "holding", "address": 1013, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.5", "group": "Settings", "area": "holding", "address": 1014, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.6", "group": "Settings", "area": "holding", "address": 1015, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.7", "group": "Settings", "area": "holding", "address": 1016, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Debounce time (in 100us) for DI 1.8", "group": "Settings", "area": "holding", "address": 1017, "type": "uint16", "access": "RW", "scale": 0.1, "unit": "ms", "description": "Raw unit is 100 us"},
    {"name": "Enable DirectSwitch on DI 1.1", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.2", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.3", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.4", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.5", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.6", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.7", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Enable DirectSwitch on DI 1.8", "group": "DirectSwitch", "area": "holding", "address": 1018, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.1", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.2", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.3", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.4", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.5", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.6", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.7", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Invert DirectSwitch Polarity on DI 1.8", "group": "DirectSwitch", "area": "holding", "address": 1019, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.1", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 0, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.2", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 1, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.3", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 2, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.4", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 3, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.5", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 4, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.6", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 5, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.7", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 6, "access": "RW"},
    {"name": "Enable DirectSwitch Toggle on DI 1.8", "group": "DirectSwitch", "area": "holding", "address": 1020, "type": "bool", "bit": 7, "access": "RW"},
    {"name": "Storage - Erase cycles used [%]", "group": "Storage", "area": "holding", "address": 4000, "type": "uint16", "access": "R", "unit": "%"},
    {"name": "Storage - Good blocks [%]", "group": "Storage", "area": "holding", "address": 4001, "type": "uint16", "access": "R", "unit": "%"},
    {"name": "Relay Output 1.1 (coil)", "group": "Relay outputs", "area": "coil", "address": 0, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.2 (coil)", "group": "Relay outputs", "area": "coil", "address": 1, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.3 (coil)", "group": "Relay outputs", "area": "coil", "address": 2, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.4 (coil)", "group": "Relay outputs", "area": "coil", "address": 3, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.5 (coil)", "group": "Relay outputs", "area": "coil", "address": 4, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.6 (coil)", "group": "Relay outputs", "area": "coil", "address": 5, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.7 (coil)", "group": "Relay outputs", "area": "coil", "address": 6, "type": "bool", "access": "RW"},
    {"name": "Relay Output 1.8 (coil)", "group": "Relay outputs", "area": "coil", "address": 7, "type": "bool", "access": "RW"},
    {"name": "Digital Input 1.1 (coil)", "group": "Digital inputs", "area": "coil", "address": 8, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.2 (coil)", "group": "Digital inputs", "area": "coil", "address": 9, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.3 (coil)", "group": "Digital inputs", "area": "coil", "address": 10, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.4 (coil)", "group": "Digital inputs", "area": "coil", "address": 11, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.5 (coil)", "group": "Digital inputs", "area": "coil", "address": 12, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.6 (coil)", "group": "Digital inputs", "area": "coil", "address": 13, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.7 (coil)", "group": "Digital inputs", "area": "coil", "address": 14, "type": "bool", "access": "R"},
    {"name": "Digital Input 1.8 (coil)", "group": "Digital inputs", "area": "coil", "address": 15, "type": "bool", "access": "R"},
    {"name": "MWD reset indication", "group": "Commands", "area": "coil", "address": 1000, "type": "bool", "access": "RW", "description": "Clears the MWD reboot indication"},
    {"name": "Enable/Disable 1Wire Bus", "group": "Commands", "area": "coil", "address": 1001, "type": "bool", "access": "RW", "description": "Enable or disable the 1-Wire bus"},
    {"name": "Reset section MCU", "group": "Commands", "area": "coil", "address": 1002, "type": "bool", "access": "W"},
    {"name": "Save current configuration and use on startup", "group": "Commands", "area": "coil", "address": 1003, "type": "bool", "access": "W", "description": "Stores the current configuration so it is used at startup"}
  ]
}
