{
  "$schema": "https://raw.githubusercontent.com/nobrega8/mbmap-library/main/schema/mbmap-2.schema.json",
  "mbmap": 2,
  "vendor": "Alfa Instrumentos",
  "model": "3100D / 3100DS",
  "models": [
    "3104D",
    "3107D",
    "3104DS",
    "3107DS"
  ],
  "vendor_website": "alfainstrumentos.com.br",
  "description": "Weighing indicators with Modbus RTU and Modbus TCP",
  "revision": 1,
  "revised": "2026-10-18",
  "source": "Alfa Instrumentos user manual 0132-MN-03, 3100D/DS weighing indicators, Modbus TCP commands",
  "sources": [
    {
      "title": "Manual do usuário Indicadores de Pesagem Linha 3100D/DS (0132-MN-03)",
      "url": "https://alfainstrumentos.com.br/wp-content/uploads/2025/04/0132MN-1.pdf",
      "note": "Section 6.1, Modbus TCP commands (same register layout as Modbus RTU)"
    }
  ],
  "notes": [
    "The manual says the Modbus TCP commands keep the structure of the Modbus RTU ones; the RTU command manual 0060MN was not available, so this map follows section 6.1 of 0132-MN-03.",
    "Registers are numbered as in the manual, which gives the same number in decimal and in hexadecimal start addresses (register 80 is 0x0050).",
    "Supported functions: 0x03 read, 0x06 write one register, 0x10 write several registers.",
    "The weight and tare are 32-bit counts; the manual does not state the word order (big assumed), the sign (a separate flag in register 80) or a scale. Divide by 10 to the power of the decimal places in bits 0 to 2 of register 80.",
    "Registers 160 to 165 set the clock together with function 0x10; the manual lists register 163 as hour and the quantity as 6.",
    "The manual gives the editable tare as start register 850 with quantity 2 but names registers 851 and 852; 851 and 852 are used here.",
    "Serial defaults: 8 data bits, no parity, 2 stop bits; baud rates 4800 to 230400. Factory device address 01.",
    "Level numbering: values and states are given for levels 0 to 7 depending on the model (3104D/DS has 4 levels, 3107D/DS has 8)."
  ],
  "protocol": "tcp+rtu",
  "unit_id": 1,
  "data_bits": 8,
  "parity": "N",
  "stop_bits": 2,
  "byte_order": "big",
  "word_order": "big",
  "address_base": 0,
  "x_status": "unofficial",
  "enums": {
    "unit": {"1": "g", "2": "kg", "3": "t"},
    "zero": {"0": "Automatic and manual zero off", "1": "Automatic zero", "2": "Manual zero", "3": "Automatic and manual zero"},
    "tare": {"0": "Single", "10": "Single and stored", "20": "Successive", "30": "Successive and stored", "40": "Editable", "50": "Editable and stored", "60": "Disabled", "70": "Automatic and stored", "80": "Automatic"},
    "filter": {"0": "R1", "1": "R2", "2": "R3", "3": "P1", "4": "P2", "5": "P3", "6": "P4", "7": "G1", "8": "G2", "9": "LN"},
    "weekday": {"1": "Monday", "2": "Tuesday", "3": "Wednesday", "4": "Thursday", "5": "Friday", "6": "Saturday", "7": "Sunday"}
  },
  "registers": [
    {"name": "Negative weight", "group": "Weight", "area": "holding", "address": 80, "type": "bool", "access": "R", "bit": 3},
    {"name": "Unstable weight", "group": "Weight", "area": "holding", "address": 80, "type": "bool", "access": "R", "bit": 4},
    {"name": "Saturation", "group": "Weight", "area": "holding", "address": 80, "type": "bool", "access": "R", "bit": 5},
    {"name": "Overload", "group": "Weight", "area": "holding", "address": 80, "type": "bool", "access": "R", "bit": 6},
    {"name": "Weight at zero", "group": "Weight", "area": "holding", "address": 80, "type": "bool", "access": "R", "bit": 8},
    {"name": "Decimal places", "group": "Weight", "area": "holding", "address": 80, "type": "uint16", "access": "R", "bit": 0, "bits": 3, "description": "Bits 0 to 2: decimals of the weight and tare values"},
    {"name": "Weight unit", "group": "Weight", "area": "holding", "address": 80, "type": "uint16", "access": "R", "bit": 9, "bits": 4, "enum": "unit", "description": "Bits 9 to 12"},
    {"name": "Level 1 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 0},
    {"name": "Level 2 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 1},
    {"name": "Level 3 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 2},
    {"name": "Level 0 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 3},
    {"name": "Level 4 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 8},
    {"name": "Level 5 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 9},
    {"name": "Level 6 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 10},
    {"name": "Level 7 active", "group": "Levels", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 11},
    {"name": "Gross weight shown", "group": "Weight", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 5, "description": "0 = net, 1 = gross"},
    {"name": "Fixed zero", "group": "Weight", "area": "holding", "address": 81, "type": "bool", "access": "R", "bit": 4},
    {"name": "Weight", "group": "Weight", "area": "holding", "address": 82, "type": "uint32", "access": "R", "description": "Count in the unit and decimals of register 80"},
    {"name": "Tare", "group": "Weight", "area": "holding", "address": 84, "type": "uint32", "access": "R", "description": "Count in the unit and decimals of register 80"},
    {"name": "Level bank shown", "group": "Levels", "area": "holding", "address": 40, "type": "bool", "access": "R", "bit": 7, "description": "0 = levels 0 to 3, 1 = levels 4 to 7"},
    {"name": "Level 1 or 4 value", "group": "Levels", "area": "holding", "address": 41, "type": "uint32", "access": "R", "description": "Level 1 when the bank bit is 0, level 4 when 1"},
    {"name": "Level 2 or 5 value", "group": "Levels", "area": "holding", "address": 43, "type": "uint32", "access": "R"},
    {"name": "Level 3 or 6 value", "group": "Levels", "area": "holding", "address": 45, "type": "uint32", "access": "R"},
    {"name": "Level 0 or 7 value", "group": "Levels", "area": "holding", "address": 47, "type": "uint32", "access": "R"},
    {"name": "Hysteresis", "group": "Levels", "area": "holding", "address": 60, "type": "uint16", "access": "R"},
    {"name": "Output logic", "group": "Levels", "area": "holding", "address": 61, "type": "bool", "access": "R", "bit": 0, "description": "0 = normally open, 1 = normally closed"},
    {"name": "Level 1 latches", "group": "Levels", "area": "holding", "address": 63, "type": "bool", "access": "R", "bit": 0, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 4 latches", "group": "Levels", "area": "holding", "address": 63, "type": "bool", "access": "R", "bit": 1, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 2 latches", "group": "Levels", "area": "holding", "address": 64, "type": "bool", "access": "R", "bit": 0, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 5 latches", "group": "Levels", "area": "holding", "address": 64, "type": "bool", "access": "R", "bit": 1, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 3 latches", "group": "Levels", "area": "holding", "address": 65, "type": "bool", "access": "R", "bit": 0, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 6 latches", "group": "Levels", "area": "holding", "address": 65, "type": "bool", "access": "R", "bit": 1, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level 7 latches", "group": "Levels", "area": "holding", "address": 65, "type": "bool", "access": "R", "bit": 2, "description": "0 = does not latch, 1 = latches"},
    {"name": "Level write control", "group": "Levels", "area": "holding", "address": 30, "type": "uint16", "access": "W", "description": "Write before the level values: bit 6 = store, bit 9 set = levels 4 to 7, bit 10 set = levels 0 to 3"},
    {"name": "Level 1 or 4 new value", "group": "Levels", "area": "holding", "address": 31, "type": "uint32", "access": "W"},
    {"name": "Level 2 or 5 new value", "group": "Levels", "area": "holding", "address": 33, "type": "uint32", "access": "W"},
    {"name": "Level 3 or 6 new value", "group": "Levels", "area": "holding", "address": 35, "type": "uint32", "access": "W"},
    {"name": "Level 0 or 7 new value", "group": "Levels", "area": "holding", "address": 37, "type": "uint32", "access": "W"},
    {"name": "Zero command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 0, "description": "Write 1 to run (bit 0 of the remote command register)"},
    {"name": "Tare command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 1, "description": "Write 1 to run (bit 1 of the remote command register)"},
    {"name": "Clear accumulated total command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 2, "description": "Write 1 to run (bit 2 of the remote command register)"},
    {"name": "Untare command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 3, "description": "Write 1 to run (bit 3 of the remote command register)"},
    {"name": "Unlock levels command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 4, "description": "Write 1 to run (bit 4 of the remote command register)"},
    {"name": "Print command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 5, "description": "Write 1 to run (bit 5 of the remote command register)"},
    {"name": "Accumulate command", "group": "Commands and settings", "area": "holding", "address": 90, "type": "bool", "access": "W", "bit": 6, "description": "Write 1 to run (bit 6 of the remote command register)"},
    {"name": "Zero configuration", "group": "Commands and settings", "area": "holding", "address": 230, "type": "uint16", "access": "W", "enum": "zero", "description": "Bits 0 and 1 select automatic and manual zero; bit 8 enables initial zero"},
    {"name": "Tare mode", "group": "Commands and settings", "area": "holding", "address": 250, "type": "uint16", "access": "W", "enum": "tare"},
    {"name": "Filter", "group": "Commands and settings", "area": "holding", "address": 270, "type": "uint16", "access": "W", "enum": "filter"},
    {"name": "Editable tare value", "group": "Commands and settings", "area": "holding", "address": 851, "type": "uint32", "access": "W", "description": "Value used when the tare mode is editable"},
    {"name": "Clock day", "group": "Clock", "area": "holding", "address": 170, "type": "uint16", "access": "R"},
    {"name": "Clock month", "group": "Clock", "area": "holding", "address": 171, "type": "uint16", "access": "R"},
    {"name": "Clock year", "group": "Clock", "area": "holding", "address": 172, "type": "uint16", "access": "R"},
    {"name": "Clock hour", "group": "Clock", "area": "holding", "address": 173, "type": "uint16", "access": "R"},
    {"name": "Clock minute", "group": "Clock", "area": "holding", "address": 174, "type": "uint16", "access": "R"},
    {"name": "Clock second", "group": "Clock", "area": "holding", "address": 175, "type": "uint16", "access": "R"},
    {"name": "Clock weekday", "group": "Clock", "area": "holding", "address": 176, "type": "uint16", "access": "R", "enum": "weekday"},
    {"name": "Set clock day", "group": "Clock", "area": "holding", "address": 160, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10)"},
    {"name": "Set clock month", "group": "Clock", "area": "holding", "address": 161, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10)"},
    {"name": "Set clock year", "group": "Clock", "area": "holding", "address": 162, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10) Year has the last two digits."},
    {"name": "Set clock hour", "group": "Clock", "area": "holding", "address": 163, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10)"},
    {"name": "Set clock minute", "group": "Clock", "area": "holding", "address": 164, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10)"},
    {"name": "Set clock second", "group": "Clock", "area": "holding", "address": 165, "type": "uint16", "access": "W", "description": "Write the six registers 160 to 165 together (function 0x10)"}
  ]
}
