{
 "manufacturer": "Analytical Technology (ATI)",
 "manufacturer_slug": "analytical-technology",
 "model": "D12 / F12 gas transmitter (H10, catalytic bead, wet H2S sensors) Modbus interface",
 "model_slug": "d12-f12",
 "short_model": "D12 / F12",
 "aliases": [
  "D12",
  "F12",
  "D12 gas transmitter",
  "F12 gas transmitter"
 ],
 "equipment_type": "Sensor (gas transmitter / gas detector)",
 "applies_to": "ATI D12 and F12 transmitters with the Modbus option fitted to H10 toxic, catalytic bead or wet H2S sensors (Appendix table 4.1). IR-sensor D12s use a different table.",
 "summary": "ATI's D12 (explosion-proof) and F12 (NEMA 4X) gas transmitters can carry a Modbus RTU option on RS-232 or RS-485. Everything sits in holding registers: a block at 40033-40052 gives fault and status words, gas concentration, temperature and loop current, and settings or calibrations are run by loading parameters and writing a subroutine number to 40001.",
 "transport": [
  "RTU"
 ],
 "defaults": {
  "unit_id": 1,
  "baud": 9600,
  "parity": "None",
  "data_bits": 8,
  "stop_bits": 1,
  "tcp_port": null
 },
 "addressing": {
  "convention": "Modicon",
  "note": "The manual numbers holding registers 40001-40999 and states address = register number - 40001 (e.g. 40043 is sent as 42 / 0x2A)."
 },
 "default_word_order": "CDAB",
 "firmware": null,
 "source": {
  "title": "D12/F12 Series Modbus Interface O&M Manual",
  "doc_number": "Rev G",
  "revision_date": "2007-08",
  "url": "https://loewener.dk/wp-content/uploads/2023/09/D12-F12-Modbus-Manual.pdf",
  "unofficial": true,
  "pages": "Addressing p. 6; data types and endian pp. 8-10; subroutine registers p. 11; error, status and fault tables pp. 33-34; comm setup pp. 41-42; register table 4.1 pp. 43-44"
 },
 "notes": [
  "Source is a copy hosted by the Danish distributor Loewener; ATI does not host this Modbus manual publicly as far as two searches showed. It is the unaltered ATI document (Rev G, Aug 2007).",
  "32-bit values (REAL and LONG) are low word first (CDAB): the manual's example puts 0x4000 in 40003 and 0x459C in 40004 for 5000.0, and says only the register order, not the bytes, has to be swapped.",
  "Only registers 40001-40014 can be written; writing above 40014 returns exception 02. Settings and calibrations are changed through subroutines: load 40003-40006 (a float parameter fills two of them, low word first), write the number to 40001, then read 40002 for the result.",
  "The table lists 'LDATA' long parameters as type REAL, which conflicts with their name; they are left out. The raw ADC registers 40053-40069, gain/offset internals 40071-40083 (except range 40073), and the internal ADC words 40088 on are also left out.",
  "The manual's own table header for 40015 (listen-only) gives no value coding, so it is not listed.",
  "Concentration units depend on the fitted sensor (ppm, %LEL and so on); the transmitter shows them on its display."
 ],
 "registers": [
  {
   "table": "holding_register",
   "address": 0,
   "documented": "40001",
   "name": "Subroutine select",
   "description": "Write a subroutine number to run it, after loading parameters into 40003-40006.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": {
    "10": "Zero sensor",
    "11": "Span sensor",
    "12": "Get calibration history info",
    "13": "Get calibration record",
    "14": "Change sensor range",
    "15": "Change sensor damping",
    "16": "Change sensor blanking",
    "17": "Change autotest state",
    "18": "Calibrate temperature reading",
    "20": "Change alarm set point",
    "21": "Change alarm reset point",
    "22": "Change alarm set delay",
    "23": "Change alarm reset delay",
    "27": "Change alarm options",
    "28": "Change relay configuration",
    "29": "Change inhibit timeout period",
    "30": "Change alarm inhibit state",
    "31": "Reset alarms",
    "32": "Start alarm relay test",
    "33": "Stop alarm relay test",
    "40": "Change inhibit mA level",
    "41": "Change fault mA level",
    "42": "Change autotest mA level",
    "47": "Force mA output",
    "48": "Correct 4 mA level",
    "49": "Correct 20 mA level",
    "50": "Change lock status",
    "51": "Change password",
    "60": "Change system clock",
    "61": "Input keycode",
    "70": "Change datalog state",
    "71": "Change datalog sampling rate",
    "72": "Get datalog info",
    "73": "Get datalog record",
    "100": "Convert concentration real to %FS integer",
    "101": "Convert %FS integer to real"
   },
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 1,
   "documented": "40002",
   "name": "Error status",
   "description": "Result of the last subroutine; 0 = success.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": {
    "0": "No errors",
    "1": "Sensor removed",
    "2": "No data in data log",
    "3": "Data log busy",
    "4": "Cannot update sensor calibration memory",
    "6": "Cannot perform this action",
    "7": "Sensor output too low",
    "8": "Sensor output too high",
    "9": "Power-up timeout active",
    "10": "Sensor/transmitter fault present",
    "11": "Autotest in progress",
    "12": "Input parameter too small",
    "13": "Input parameter too large",
    "14": "Cannot verify CPU memory",
    "15": "Alarm disabled, cannot change reset point",
    "16": "Not in fixed current output mode"
   },
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 2,
   "documented": "40003",
   "name": "Parameter data 0",
   "description": "16-bit subroutine parameter (integer or unsigned).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 3,
   "documented": "40004",
   "name": "Parameter data 1",
   "description": "16-bit subroutine parameter (integer or unsigned).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 4,
   "documented": "40005",
   "name": "Parameter data 2",
   "description": "16-bit subroutine parameter (integer or unsigned).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 5,
   "documented": "40006",
   "name": "Parameter data 3",
   "description": "16-bit subroutine parameter (integer or unsigned).",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 6,
   "documented": "40007",
   "name": "Return data 0",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 7,
   "documented": "40008",
   "name": "Return data 1",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 8,
   "documented": "40009",
   "name": "Return data 2",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 9,
   "documented": "40010",
   "name": "Return data 3",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 10,
   "documented": "40011",
   "name": "Return data 4",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 11,
   "documented": "40012",
   "name": "Return data 5",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 12,
   "documented": "40013",
   "name": "Return data 6",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 13,
   "documented": "40014",
   "name": "Return data 7",
   "description": "16-bit subroutine return value.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "RW",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 32,
   "documented": "40033",
   "name": "Expanded faults",
   "description": "",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": {
    "0": "Factory calibration fault",
    "1": "Stack overflow"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 33,
   "documented": "40034",
   "name": "Expanded status",
   "description": "",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": {
    "0": "Gas generator installed",
    "1": "Gas generator type valid",
    "2": "Gas generator range valid",
    "3": "Alarm test active",
    "4": "Autotest in progress",
    "5": "Autotest pass",
    "6": "Cannot begin autotest",
    "7": "Autotest failed",
    "8": "Auto-clean active",
    "9": "Auto-clean recovering"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 34,
   "documented": "40035",
   "name": "Faults",
   "description": "",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": {
    "0": "Gas sensor ADC read fault",
    "1": "LCD bus fault",
    "2": "SPI bus fault",
    "3": "Temperature ADC read fault",
    "4": "Gas sensor input fault",
    "5": "Gas sensor removed",
    "6": "Gas sensor memory checksum fault",
    "7": "Gas sensor configuration fault",
    "8": "Gas generator removed",
    "9": "Gas generator configuration fault",
    "10": "System setup memory checksum fault",
    "11": "Alarm memory checksum fault",
    "12": "Operator interface memory checksum fault",
    "13": "HART memory checksum fault",
    "14": "Autotest failure",
    "15": "Relay jumper fitted but no relay voltage"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 35,
   "documented": "40036",
   "name": "Status",
   "description": "",
   "data_type": "BITMAP16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": {
    "0": "Caution active",
    "1": "Warning active",
    "2": "Alarm active",
    "3": "Fault active",
    "4": "CWAF inhibit active",
    "5": "Transmitter security active",
    "6": "System data log active",
    "7": "Current loop output fixed",
    "8": "Temperature input over range",
    "9": "Temperature input under range",
    "10": "Gas sensor input over range",
    "11": "Gas sensor input under range",
    "12": "Data log checksum error",
    "13": "Calibration history not initialised",
    "14": "Sensor in power-on delay"
   },
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 36,
   "documented": "40037",
   "name": "Gas concentration",
   "description": "Unblanked reading in the sensor's concentration units.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 38,
   "documented": "40039",
   "name": "Concentration % of full scale",
   "description": "Unblanked.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "%",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 40,
   "documented": "40041",
   "name": "Temperature",
   "description": "",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "°C",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 42,
   "documented": "40043",
   "name": "Gas concentration (blanked)",
   "description": "Sensor units, blanked around zero; the manual's main reading.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 44,
   "documented": "40045",
   "name": "Concentration % of full scale (blanked)",
   "description": "",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "%",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 46,
   "documented": "40047",
   "name": "Current loop output",
   "description": "Loop current derived from concentration.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "mA",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 48,
   "documented": "40049",
   "name": "Fixed loop current",
   "description": "Loop held at this value when above 0.0.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "mA",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 50,
   "documented": "40051",
   "name": "Loop DAC value",
   "description": "10-bit DAC value behind the analog output.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 51,
   "documented": "40052",
   "name": "Concentration 12-bit code",
   "description": "0 = fault, 300 = inhibit, 800 = 0 %FS, 4000 = 100 %FS.",
   "data_type": "UINT16",
   "length": 1,
   "word_order": null,
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 72,
   "documented": "40073",
   "name": "Sensor full-scale range",
   "description": "Concentration that equals full scale.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  },
  {
   "table": "holding_register",
   "address": 84,
   "documented": "40085",
   "name": "Blanking",
   "description": "Readings within +/- this % of full scale show as zero.",
   "data_type": "FLOAT32",
   "length": 2,
   "word_order": "CDAB",
   "scale": 1,
   "units": "%",
   "access": "R",
   "values": null,
   "bits": null,
   "offset": 0
  }
 ],
 "integration": {
  "summary": "Read holding registers 40035-40048 (address 34, 14 registers) in one FC03 request: faults, status, concentration, %FS, temperature and blanked readings, with floats low word first. Use subroutine 31 (with the alarm bits in 40003) to reset latched alarms.",
  "minimum_registers": [
   {
    "table": "holding_register",
    "address": 34,
    "why": "Fault bits"
   },
   {
    "table": "holding_register",
    "address": 35,
    "why": "Status bits (caution/warning/alarm/fault)"
   },
   {
    "table": "holding_register",
    "address": 42,
    "why": "Gas concentration (blanked)"
   },
   {
    "table": "holding_register",
    "address": 38,
    "why": "Concentration % full scale"
   },
   {
    "table": "holding_register",
    "address": 40,
    "why": "Temperature"
   },
   {
    "table": "holding_register",
    "address": 46,
    "why": "Loop current"
   }
  ],
  "enable": "Modbus is a factory-installed option. Set slave address on the transmitter at Menu > Setup > Modbus and baud/parity at Menu > Setup > System > Commun.",
  "watchdog": null,
  "quirks": [
   "Floats and longs are CDAB.",
   "FC01/02/04 return zeros rather than exceptions.",
   "Report Slave ID returns 1100."
  ],
  "setup": [
   "Defaults: address 1, 9600 baud, N,8,1.",
   "Baud can be 300-28.8k; parity options N81, N82, E81, O81."
  ],
  "gotchas": [
   "The transmitter answers within about 250 ms, so poll no faster than about 3 times a second.",
   "D12 units with IR sensors use a different register table."
  ]
 },
 "page": "https://easymodbus.com/modbus-register-maps/analytical-technology/d12-f12",
 "address_note": "address = 0-based Modbus wire (PDU) address; documented = as printed in the source.",
 "note": "Re-typed from the manufacturer's public documentation (see source) and verified against it. Registers vary by firmware and options; verify against the live device before writing."
}
