{
  "schema": "spec-platform/v1",
  "kind": "timingchart",
  "v": 5,
  "steps": 18,
  "stepW": 44,
  "rowH": 48,
  "edgeMode": "v",
  "meta": {
    "title": "Air cylinder advance and retract (double solenoid)",
    "note": "Detect the ends with the auto switches, not by time, watching both \"arrived side ON\" and \"departed side OFF\". An end is confirmed once the arrived side has been ON continuously for 0.2 s. Never turn the advance SOL and the retract SOL ON at the same time. Because the valve is a 2-position double solenoid, it stays switched over even when the SOL is cut at the end. Limits: from SOL ON to the departed side turning OFF (does not start), about three times the time measured during commissioning; from SOL ON to the arrived side turning ON, 2 s (four times the 0.5 s stroke. If the stroke is made slower, change this value). Both ends ON at the same time is a fault.",
    "stepMs": 100,
    "master": "PLC",
    "slave": "Valve / cylinder"
  },
  "library": [],
  "rows": [
    {
      "id": "r_fsol",
      "name": "bFwdSol",
      "type": "BOOL",
      "comment": "Advance SOL (2-position double; cut at the end)",
      "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": "Retract SOL (never ON together with the advance SOL)",
      "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": "Advance end (0.5 s stroke)",
      "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": "Retract end",
      "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": "Advance end confirmed (ON for 0.2 s)",
      "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": "Retract end confirmed (condition for the advance 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": "Advance SOL (2-position double; cut at the end)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bsol",
      "name": "bBwdSol",
      "type": "BOOL",
      "role": "M",
      "comment": "Retract SOL (never ON together with the advance SOL)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_fend",
      "name": "bFwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "Advance end (0.5 s stroke)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bend",
      "name": "bBwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "Retract end",
      "address": "",
      "bit": null,
      "initialValue": "1"
    },
    {
      "id": "r_fok",
      "name": "bFwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "Advance end confirmed (ON for 0.2 s)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bok",
      "name": "bBwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "Retract end confirmed (condition for the advance SOL)",
      "address": "",
      "bit": null,
      "initialValue": "1"
    }
  ],
  "triggers": [
    {
      "from": {
        "varId": "r_fsol",
        "step": 1
      },
      "to": {
        "varId": "r_bend",
        "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_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
      }
    }
  ]
}
