{
  "spec_version": 1,
  "slug": "waveshare-modbus-rtu-analog-input-8ch",
  "manufacturer": "Waveshare",
  "model": "Modbus RTU Analog Input 8CH / Modbus RTU Analog Input 8CH (B) (8-channel 12-bit analog input, RS485)",
  "category": "Remote I/O",
  "supplier_url": "https://www.waveshare.com/modbus-rtu-analog-input-8ch.htm",
  "default_configuration": {
    "protocol": "modbus_rtu",
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst",
    "native_interface": "rs485",
    "serial": {
      "baud_rate": 9600,
      "parity": "None",
      "data_bits": 8,
      "stop_bits": 1
    }
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [
    {
      "address": 0,
      "count": 1,
      "name": "Analog input channel 1 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1000 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 1,
      "count": 1,
      "name": "Analog input channel 2 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1001 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 2,
      "count": 1,
      "name": "Analog input channel 3 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1002 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 3,
      "count": 1,
      "name": "Analog input channel 4 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1003 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 4,
      "count": 1,
      "name": "Analog input channel 5 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1004 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 5,
      "count": 1,
      "name": "Analog input channel 6 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1005 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 6,
      "count": 1,
      "name": "Analog input channel 7 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1006 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    },
    {
      "address": 7,
      "count": 1,
      "name": "Analog input channel 8 value",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 3x0000-3x0007, read with function 04 as an unsigned 16-bit value. The document defines no fixed unit for this word: the value follows the channel's data type at 4x1007 - the standard version's default current mode reports microamps, the '(B)' version's default voltage mode reports millivolts, and in code mode (type 4) the word is the raw 12-bit ADC code, where voltage = code * 3300 / 4095 / amplifier ratio and current = voltage / sampling resistance (249 ohm on the standard version, 499 ohm on the '(B)' version)."
    }
  ],
  "holding_registers": [
    {
      "address": 4096,
      "count": 1,
      "name": "Analog input channel 1 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1000. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4097,
      "count": 1,
      "name": "Analog input channel 2 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1001. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4098,
      "count": 1,
      "name": "Analog input channel 3 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1002. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4099,
      "count": 1,
      "name": "Analog input channel 4 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1003. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4100,
      "count": 1,
      "name": "Analog input channel 5 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1004. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4101,
      "count": 1,
      "name": "Analog input channel 6 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1005. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4102,
      "count": 1,
      "name": "Analog input channel 7 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1006. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 4103,
      "count": 1,
      "name": "Analog input channel 8 data type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x1007. Five ranges; standard version: 0 = 0-5 V, 1 = 1-5 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code; '(B)' version: 0 = 0-10 V, 1 = 2-10 V, 2 = 0-20 mA, 3 = 4-20 mA, 4 = 4096-scale code. The channel's internal jumper has to match current or voltage mode."
    },
    {
      "address": 8192,
      "count": 1,
      "name": "UART parameter (baud rate and parity)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x2000. The table splits the word: high eight bits = parity mode (0x00-0x02), low eight bits = baud-rate mode (0x00-0x07), and the row is Read/Write with function codes 03 and 06. The page's own 'Set Baudrate Command' section lists the codes: baud rate 0x00 = 4800, 0x01 = 9600, 0x02 = 19200, 0x03 = 38400, 0x04 = 57600, 0x05 = 115200, 0x06 = 128000, 0x07 = 256000; parity 0x00 = none. That section contradicts itself on the parity codes - its send-code table prints 0x01 = even and 0x02 = odd while the identical return-code table prints 0x01 = odd and 0x02 = even - so only 0x00 (none) is unambiguous."
    },
    {
      "address": 16384,
      "count": 1,
      "name": "Device address",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Register 4x4000. Stores the Modbus slave address directly, 0x0001-0x00FF; 0x00 is the broadcast address."
    },
    {
      "address": 32768,
      "count": 1,
      "name": "Software version",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 4x8000. Divide by 100 for the version: 0x0064 = 100 = V1.00."
    }
  ],
  "combined_registers": [],
  "notes": "Source: Waveshare wiki page https://www.waveshare.com/wiki/Modbus_RTU_Analog_Input_8CH ('Version Comparision', 'Hardware Description', the Modbus Poll test section and 'Development Protocol V2' with its register table, its 'Set Baudrate Command' code table and worked frames), plus the vendor wiki page 'Modbus Series BootLoader Description' (https://www.waveshare.com/wiki/Modbus_Series_BootLoader_Description), which states that restoring the default device parameters sets '9600 N 8 1' and device address 0x01 - that is the cited factory frame for this module. The register table prints 3x0000-3x0007 (input data), 4x1000-4x1007 (channel data type), 4x2000 (UART parameter), 4x4000 (device address) and 4x8000 (software version); the seed stores those numbers and declares zero_based. The input data registers are deliberately seeded without a unit or scale factor: the document only says they are read as unsigned hexadecimal and that the engineering value depends on the channel's selected range and on which of the two hardware versions is in use (the standard version defaults to 0-20 mA and reports microamps, the '(B)' version defaults to 0-10 V and reports millivolts, and range 4 returns the 4096-scale raw code with the module's own conversion formula). Each channel has an internal current/voltage jumper that must match the selected type, otherwise the readings are wrong; the two versions differ in sampling resistor (249 ohm / 499 ohm) and amplifier ratio (32.4/49.9 vs 10/32.4). Two versions of the module share this map; there is no data-length or stop-bit parameter and the frame is fixed at 8 data bits and 1 stop bit."
}
