{
  "schema": "spec-platform/v1",
  "kind": "addressmap",
  "v": 2,
  "title": "搬送装置 I/O マップ（サンプル）",
  "plc": {
    "preset": "mitsubishi-q",
    "vendor": "三菱電機",
    "model": "MELSEC-Q シリーズ",
    "bitDev": "M",
    "wordDev": "D",
    "devices": [
      {
        "code": "X",
        "name": "入力",
        "style": "bit",
        "bits": 1,
        "radix": 16,
        "start": 0,
        "end": 8191,
        "pad": 0
      },
      {
        "code": "Y",
        "name": "出力",
        "style": "bit",
        "bits": 1,
        "radix": 16,
        "start": 0,
        "end": 8191,
        "pad": 0
      },
      {
        "code": "M",
        "name": "内部リレー",
        "style": "bit",
        "bits": 1,
        "radix": 10,
        "start": 0,
        "end": 8191
      },
      {
        "code": "L",
        "name": "ラッチリレー",
        "style": "bit",
        "bits": 1,
        "radix": 10,
        "start": 0,
        "end": 8191
      },
      {
        "code": "B",
        "name": "リンクリレー",
        "style": "bit",
        "bits": 1,
        "radix": 16,
        "start": 0,
        "end": 8191
      },
      {
        "code": "F",
        "name": "アナンシェータ",
        "style": "bit",
        "bits": 1,
        "radix": 10,
        "start": 0,
        "end": 2047
      },
      {
        "code": "SM",
        "name": "特殊リレー",
        "style": "bit",
        "bits": 1,
        "radix": 10,
        "start": 0,
        "end": 2047,
        "ro": true
      },
      {
        "code": "D",
        "name": "データレジスタ",
        "style": "word",
        "bits": 16,
        "radix": 10,
        "start": 0,
        "end": 12287,
        "bitRadix": 16
      },
      {
        "code": "W",
        "name": "リンクレジスタ",
        "style": "word",
        "bits": 16,
        "radix": 16,
        "start": 0,
        "end": 8191,
        "bitRadix": 16
      },
      {
        "code": "R",
        "name": "ファイルレジスタ",
        "style": "word",
        "bits": 16,
        "radix": 10,
        "start": 0,
        "end": 32767,
        "bitRadix": 16
      },
      {
        "code": "ZR",
        "name": "ファイルレジスタ（連番）",
        "style": "word",
        "bits": 16,
        "radix": 10,
        "start": 0,
        "end": 131071,
        "bitRadix": 16
      },
      {
        "code": "SD",
        "name": "特殊レジスタ",
        "style": "word",
        "bits": 16,
        "radix": 10,
        "start": 0,
        "end": 2047,
        "bitRadix": 16,
        "ro": true
      }
    ]
  },
  "settings": {
    "structName": "IoMap",
    "iecWordIndex": true
  },
  "devices": [
    {
      "id": "dev_02",
      "name": "搬送コンベア",
      "comment": "インバータ駆動のメインコンベア",
      "collapsed": false,
      "blocks": [
        {
          "id": "blk_002",
          "name": "指令",
          "comment": "PLC → コンベア",
          "area": null,
          "varIds": [
            "var_001",
            "var_002",
            "var_003",
            "var_004"
          ]
        },
        {
          "id": "blk_003",
          "name": "状態",
          "comment": "コンベア → PLC",
          "area": null,
          "varIds": [
            "var_005",
            "var_006",
            "var_007",
            "var_008",
            "var_009"
          ]
        }
      ]
    },
    {
      "id": "dev_03",
      "name": "取出しロボット",
      "comment": "6 軸ロボット（EtherNet/IP）",
      "collapsed": false,
      "blocks": [
        {
          "id": "blk_004",
          "name": "指令 / 状態",
          "comment": "位置決めのハンドシェイク",
          "area": null,
          "varIds": [
            "var_010",
            "var_011",
            "var_012",
            "var_013",
            "var_014",
            "var_015",
            "var_016"
          ]
        },
        {
          "id": "blk_005",
          "name": "パラメータ",
          "comment": "レシピ・調整値",
          "area": null,
          "varIds": [
            "var_017",
            "var_018",
            "var_019"
          ]
        }
      ]
    }
  ],
  "variables": [
    {
      "id": "var_001",
      "name": "bConvStart",
      "type": "BOOL",
      "role": "M",
      "comment": "運転指令",
      "address": "M0",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "指令",
      "deviceId": "dev_02",
      "blockId": "blk_002"
    },
    {
      "id": "var_002",
      "name": "bConvStop",
      "type": "BOOL",
      "role": "M",
      "comment": "停止指令",
      "address": "M1",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "指令",
      "deviceId": "dev_02",
      "blockId": "blk_002"
    },
    {
      "id": "var_003",
      "name": "bConvReset",
      "type": "BOOL",
      "role": "M",
      "comment": "異常リセット",
      "address": "M2",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "指令",
      "deviceId": "dev_02",
      "blockId": "blk_002"
    },
    {
      "id": "var_004",
      "name": "nConvSpeed",
      "type": "INT",
      "role": "M",
      "comment": "速度指令 [mm/s]",
      "address": "D100",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "指令",
      "deviceId": "dev_02",
      "blockId": "blk_002"
    },
    {
      "id": "var_005",
      "name": "bConvReady",
      "type": "BOOL",
      "role": "S",
      "comment": "準備完了",
      "address": "M3",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "状態",
      "deviceId": "dev_02",
      "blockId": "blk_003"
    },
    {
      "id": "var_006",
      "name": "bConvRun",
      "type": "BOOL",
      "role": "S",
      "comment": "運転中",
      "address": "M4",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "状態",
      "deviceId": "dev_02",
      "blockId": "blk_003"
    },
    {
      "id": "var_007",
      "name": "bConvAlarm",
      "type": "BOOL",
      "role": "S",
      "comment": "異常",
      "address": "M5",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "状態",
      "deviceId": "dev_02",
      "blockId": "blk_003"
    },
    {
      "id": "var_008",
      "name": "nConvActSpeed",
      "type": "INT",
      "role": "S",
      "comment": "実速度 [mm/s]",
      "address": "D101",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "状態",
      "deviceId": "dev_02",
      "blockId": "blk_003"
    },
    {
      "id": "var_009",
      "name": "wConvStatus",
      "type": "WORD",
      "role": "S",
      "comment": "ステータスワード",
      "address": "D102",
      "bit": null,
      "initialValue": "",
      "device": "搬送コンベア",
      "block": "状態",
      "deviceId": "dev_02",
      "blockId": "blk_003"
    },
    {
      "id": "var_010",
      "name": "bRobStartReq",
      "type": "BOOL",
      "role": "M",
      "comment": "起動要求",
      "address": "M6",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_011",
      "name": "bRobBusy",
      "type": "BOOL",
      "role": "S",
      "comment": "動作中",
      "address": "M7",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_012",
      "name": "bRobInPos",
      "type": "BOOL",
      "role": "S",
      "comment": "位置決め完了",
      "address": "M8",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_013",
      "name": "bRobAlarm",
      "type": "BOOL",
      "role": "S",
      "comment": "異常",
      "address": "M9",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_014",
      "name": "nRobTargetPos",
      "type": "DINT",
      "role": "M",
      "comment": "目標位置 [pulse]",
      "address": "D104",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_015",
      "name": "nRobActualPos",
      "type": "DINT",
      "role": "S",
      "comment": "現在位置 [pulse]",
      "address": "D106",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_016",
      "name": "rRobTorque",
      "type": "REAL",
      "role": "S",
      "comment": "トルク [%]",
      "address": "D108",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "指令 / 状態",
      "deviceId": "dev_03",
      "blockId": "blk_004"
    },
    {
      "id": "var_017",
      "name": "nRobAccel",
      "type": "INT",
      "role": "M",
      "comment": "加速時間 [ms]",
      "address": "D110",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "パラメータ",
      "deviceId": "dev_03",
      "blockId": "blk_005"
    },
    {
      "id": "var_018",
      "name": "nRobDecel",
      "type": "INT",
      "role": "M",
      "comment": "減速時間 [ms]",
      "address": "D111",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "パラメータ",
      "deviceId": "dev_03",
      "blockId": "blk_005"
    },
    {
      "id": "var_019",
      "name": "nRecipeNo",
      "type": "INT",
      "role": "M",
      "comment": "レシピ番号",
      "address": "D112",
      "bit": null,
      "initialValue": "",
      "device": "取出しロボット",
      "block": "パラメータ",
      "deviceId": "dev_03",
      "blockId": "blk_005"
    }
  ],
  "triggers": []
}
