{
  "spec_version": 1,
  "slug": "advantech-adam-4050",
  "manufacturer": "Advantech",
  "model": "ADAM-4050 / ADAM-4050-F (15/16-channel digital I/O)",
  "category": "Remote I/O",
  "supplier_url": "https://www.advantech.com/en-us/products/gf-5vwk/adam-4050/mod_02b0d2ad-0bbb-498a-8647-b910ce345125",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst",
    "native_interface": "rs485",
    "serial": {
      "parity": "None",
      "baud_rate": 9600,
      "data_bits": 8,
      "stop_bits": 1
    }
  },
  "coils": [
    {
      "address": 0,
      "count": 1,
      "name": "Digital input 0 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00001)."
    },
    {
      "address": 1,
      "count": 1,
      "name": "Digital input 1 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00002)."
    },
    {
      "address": 2,
      "count": 1,
      "name": "Digital input 2 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00003)."
    },
    {
      "address": 3,
      "count": 1,
      "name": "Digital input 3 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00004)."
    },
    {
      "address": 4,
      "count": 1,
      "name": "Digital input 4 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00005)."
    },
    {
      "address": 5,
      "count": 1,
      "name": "Digital input 5 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00006)."
    },
    {
      "address": 6,
      "count": 1,
      "name": "Digital input 6 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00007)."
    },
    {
      "address": 7,
      "count": 1,
      "name": "Digital input 7 signal",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = off, 1 = on (coil reference 00008)."
    },
    {
      "address": 16,
      "count": 1,
      "name": "Digital output 0 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00017)."
    },
    {
      "address": 17,
      "count": 1,
      "name": "Digital output 1 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00018)."
    },
    {
      "address": 18,
      "count": 1,
      "name": "Digital output 2 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00019)."
    },
    {
      "address": 19,
      "count": 1,
      "name": "Digital output 3 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00020)."
    },
    {
      "address": 20,
      "count": 1,
      "name": "Digital output 4 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00021)."
    },
    {
      "address": 21,
      "count": 1,
      "name": "Digital output 5 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00022)."
    },
    {
      "address": 22,
      "count": 1,
      "name": "Digital output 6 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00023)."
    },
    {
      "address": 23,
      "count": 1,
      "name": "Digital output 7 value",
      "data_type": "Binary",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = off, 1 = on (coil reference 00024)."
    }
  ],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 210,
      "count": 1,
      "name": "Module name 1 (characters 1-2)",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Module name register 40211. The register table's memo column prints the byte pair 0x40 0x50 for this model, so each register holds two ASCII characters."
    },
    {
      "address": 211,
      "count": 1,
      "name": "Module name 2 (characters 3-4)",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 40212; the same memo column prints 0x00 0x00 for this model."
    },
    {
      "address": 212,
      "count": 1,
      "name": "Firmware version 1",
      "data_type": "Hex",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 40213; the memo column prints 0xA2 0x00 for this model."
    },
    {
      "address": 213,
      "count": 1,
      "name": "Firmware version 2",
      "data_type": "Hex",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Register 40214; the memo column prints 0xB0 0x01 for this model."
    }
  ],
  "combined_registers": [],
  "notes": "RS-485 remote I/O: the module reaches Modbus Connect through a Modbus RTU-to-TCP gateway, and the serial block holds the factory settings the gateway must use. Addressing: the manual's Modbus mapping table prints Modbus reference numbers (\"ADDR 0X\" 00001..., \"ADDR 4X\" 40001...) and this seed stores the equivalent zero-based wire addresses (reference minus one), as the ADAM-6000 seeds in this library do. Source: Advantech \"ADAM-4000 Series User Manual\" Ed.9 (2023), Appendix G.1 \"ADAM-4000 I/O Modbus Mapping Table\", item 7 \"ADAM-4050 15 or *16-ch Digital I/O Module\" (manual page 268); factory communication settings from chapter 2.2 \"Default Factory Settings\" (baud rate 9600 bit/s, address 01 hexadecimal) and Appendix H.1 (initial COM settings 9600 baud, N-8-1). The ADAM-4050 has seven digital inputs and eight digital outputs; the eighth input (channel 7) exists only on the ADAM-4050-F, as the table's footnote \"* New Input for ADAM-4050-F\" states. The module has no analog channels and no counter block in this map. A Modbus-version module can leave the factory set to the ADAM ASCII protocol; Appendix H.1 documents switching it to Modbus with the Adam/Apax .NET utility before the map above applies."
}
