{
  "schema": "spec-platform/v1",
  "kind": "timingchart",
  "v": 5,
  "steps": 16,
  "stepW": 44,
  "rowH": 48,
  "edgeMode": "v",
  "meta": {
    "title": "検査要求・検査完了のハンドシェイク（PLC と検査装置）",
    "note": "判定 OK / NG は、検査完了が ON の間は変えない（出すときは判定が先、落とすときは完了が先）。PLC は検査完了の立ち上がりで判定を読み、検査要求を OFF にする。上限：検査要求 ON から検査完了 ON まで 3 秒、検査要求 OFF から検査完了 OFF まで 1 秒。超えたら異常",
    "stepMs": 100,
    "master": "PLC",
    "slave": "検査装置"
  },
  "library": [],
  "rows": [
    {
      "id": "r_work",
      "name": "bWorkSet",
      "type": "BOOL",
      "comment": "検査位置に停止",
      "role": "I",
      "values": [
        false,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        false,
        false
      ]
    },
    {
      "id": "r_req",
      "name": "bInspReq",
      "type": "BOOL",
      "comment": "検査要求",
      "role": "M",
      "values": [
        false,
        false,
        true,
        true,
        true,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_done",
      "name": "bInspDone",
      "type": "BOOL",
      "comment": "検査完了（3 s 来なければ異常）",
      "role": "S",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_ok",
      "name": "bResultOK",
      "type": "BOOL",
      "comment": "判定 OK（撮像と判定に 0.5 s）",
      "role": "S",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_ng",
      "name": "bResultNG",
      "type": "BOOL",
      "comment": "判定 NG",
      "role": "S",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_out",
      "name": "bCarryOut",
      "type": "BOOL",
      "comment": "搬出開始",
      "role": "I",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true
      ]
    }
  ],
  "variables": [
    {
      "id": "r_work",
      "name": "bWorkSet",
      "type": "BOOL",
      "role": "I",
      "comment": "検査位置に停止",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_req",
      "name": "bInspReq",
      "type": "BOOL",
      "role": "M",
      "comment": "検査要求",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_done",
      "name": "bInspDone",
      "type": "BOOL",
      "role": "S",
      "comment": "検査完了（3 s 来なければ異常）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_ok",
      "name": "bResultOK",
      "type": "BOOL",
      "role": "S",
      "comment": "判定 OK（撮像と判定に 0.5 s）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_ng",
      "name": "bResultNG",
      "type": "BOOL",
      "role": "S",
      "comment": "判定 NG",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_out",
      "name": "bCarryOut",
      "type": "BOOL",
      "role": "I",
      "comment": "搬出開始",
      "address": "",
      "bit": null,
      "initialValue": "0"
    }
  ],
  "triggers": [
    {
      "from": {
        "varId": "r_work",
        "step": 1
      },
      "to": {
        "varId": "r_req",
        "step": 2
      }
    },
    {
      "from": {
        "varId": "r_req",
        "step": 2
      },
      "to": {
        "varId": "r_ok",
        "step": 7
      }
    },
    {
      "from": {
        "varId": "r_ok",
        "step": 7
      },
      "to": {
        "varId": "r_done",
        "step": 8
      }
    },
    {
      "from": {
        "varId": "r_done",
        "step": 8
      },
      "to": {
        "varId": "r_req",
        "step": 9
      }
    },
    {
      "from": {
        "varId": "r_req",
        "step": 9
      },
      "to": {
        "varId": "r_done",
        "step": 10
      }
    },
    {
      "from": {
        "varId": "r_done",
        "step": 10
      },
      "to": {
        "varId": "r_ok",
        "step": 11
      }
    },
    {
      "from": {
        "varId": "r_done",
        "step": 10
      },
      "to": {
        "varId": "r_out",
        "step": 12
      }
    },
    {
      "from": {
        "varId": "r_out",
        "step": 12
      },
      "to": {
        "varId": "r_work",
        "step": 14
      }
    }
  ]
}
