{
  "schema": "spec-platform/v1",
  "kind": "timingchart",
  "v": 5,
  "steps": 18,
  "stepW": 44,
  "rowH": 48,
  "edgeMode": "v",
  "meta": {
    "title": "エアシリンダの前進・後退（ダブルソレノイド）",
    "note": "端は時間ではなくオートスイッチで、「着いた側の ON」と「離れた側の OFF」の両方で見る。着いた側が 0.2 秒続けて ON になったら確定。前進 SOL と後退 SOL は同時に ON にしない。2 位置ダブルなので端で切ってもバルブは切り換わったまま。上限：SOL ON から離れた側の OFF まで（動き出さない）は試運転で測った時間の 3 倍ほど、SOL ON から着いた側の ON まで 2 秒（ストローク 0.5 秒の 4 倍。ストロークを遅くしたら直す）。両端が同時に ON なら異常",
    "stepMs": 100,
    "master": "PLC",
    "slave": "バルブ・シリンダ"
  },
  "library": [],
  "rows": [
    {
      "id": "r_fsol",
      "name": "bFwdSol",
      "type": "BOOL",
      "comment": "前進 SOL（2 位置ダブル。端で切る）",
      "role": "M",
      "values": [
        false,
        true,
        true,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_bsol",
      "name": "bBwdSol",
      "type": "BOOL",
      "comment": "後退 SOL（前進 SOL と同時に ON にしない）",
      "role": "M",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        true,
        true,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_fend",
      "name": "bFwdEnd",
      "type": "BOOL",
      "comment": "前進端（ストローク 0.5 s）",
      "role": "S",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_bend",
      "name": "bBwdEnd",
      "type": "BOOL",
      "comment": "後退端",
      "role": "S",
      "values": [
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        true,
        true
      ]
    },
    {
      "id": "r_fok",
      "name": "bFwdOK",
      "type": "BOOL",
      "comment": "前進端 確定（0.2 s 続けて ON）",
      "role": "I",
      "values": [
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false
      ]
    },
    {
      "id": "r_bok",
      "name": "bBwdOK",
      "type": "BOOL",
      "comment": "後退端 確定（前進 SOL を出す条件）",
      "role": "I",
      "values": [
        true,
        true,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        false,
        true,
        true
      ]
    }
  ],
  "variables": [
    {
      "id": "r_fsol",
      "name": "bFwdSol",
      "type": "BOOL",
      "role": "M",
      "comment": "前進 SOL（2 位置ダブル。端で切る）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bsol",
      "name": "bBwdSol",
      "type": "BOOL",
      "role": "M",
      "comment": "後退 SOL（前進 SOL と同時に ON にしない）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_fend",
      "name": "bFwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "前進端（ストローク 0.5 s）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bend",
      "name": "bBwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "後退端",
      "address": "",
      "bit": null,
      "initialValue": "1"
    },
    {
      "id": "r_fok",
      "name": "bFwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "前進端 確定（0.2 s 続けて ON）",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bok",
      "name": "bBwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "後退端 確定（前進 SOL を出す条件）",
      "address": "",
      "bit": null,
      "initialValue": "1"
    }
  ],
  "triggers": [
    {
      "from": {
        "varId": "r_fsol",
        "step": 1
      },
      "to": {
        "varId": "r_bend",
        "step": 2
      }
    },
    {
      "from": {
        "varId": "r_bend",
        "step": 2
      },
      "to": {
        "varId": "r_bok",
        "step": 2
      }
    },
    {
      "from": {
        "varId": "r_fsol",
        "step": 1
      },
      "to": {
        "varId": "r_fend",
        "step": 6
      }
    },
    {
      "from": {
        "varId": "r_fend",
        "step": 6
      },
      "to": {
        "varId": "r_fsol",
        "step": 7
      }
    },
    {
      "from": {
        "varId": "r_fend",
        "step": 6
      },
      "to": {
        "varId": "r_fok",
        "step": 8
      }
    },
    {
      "from": {
        "varId": "r_fok",
        "step": 8
      },
      "to": {
        "varId": "r_bsol",
        "step": 9
      }
    },
    {
      "from": {
        "varId": "r_bsol",
        "step": 9
      },
      "to": {
        "varId": "r_fend",
        "step": 10
      }
    },
    {
      "from": {
        "varId": "r_fend",
        "step": 10
      },
      "to": {
        "varId": "r_fok",
        "step": 10
      }
    },
    {
      "from": {
        "varId": "r_bsol",
        "step": 9
      },
      "to": {
        "varId": "r_bend",
        "step": 14
      }
    },
    {
      "from": {
        "varId": "r_bend",
        "step": 14
      },
      "to": {
        "varId": "r_bsol",
        "step": 15
      }
    },
    {
      "from": {
        "varId": "r_bend",
        "step": 14
      },
      "to": {
        "varId": "r_bok",
        "step": 16
      }
    }
  ]
}
