{
  "schema": "spec-platform/v1",
  "kind": "timingchart",
  "v": 5,
  "steps": 18,
  "stepW": 44,
  "rowH": 48,
  "edgeMode": "v",
  "meta": {
    "title": "Cilindro pneumatico avanti e indietro (doppio solenoide)",
    "note": "Gli estremi si rilevano con i sensori di fine corsa, non con il tempo, guardando sia l'«ON del lato di arrivo» sia l'«OFF del lato lasciato». Il fine corsa è confermato quando il lato di arrivo resta ON per 0,2 s di seguito. Non mettere mai ON insieme il SOL avanti e il SOL indietro. Trattandosi di un doppio solenoide a 2 posizioni, anche se il SOL viene tolto a fine corsa la valvola resta commutata. Limiti: da SOL ON all'OFF del lato lasciato (anomalia «non parte»), circa 3 volte il tempo misurato alla messa in servizio; da SOL ON all'ON del lato di arrivo, 2 s (4 volte la corsa di 0,5 s; se la corsa viene rallentata, correggi questo valore). Se entrambi gli estremi sono ON insieme, è un'anomalia.",
    "stepMs": 100,
    "master": "PLC",
    "slave": "Valvola / cilindro"
  },
  "library": [],
  "rows": [
    {
      "id": "r_fsol",
      "name": "bFwdSol",
      "type": "BOOL",
      "comment": "SOL avanti (bistabile 2 pos.; OFF a fine corsa)",
      "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 indietro (mai ON insieme al SOL avanti)",
      "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": "Fine corsa avanti (corsa 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": "Fine corsa indietro",
      "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": "Fine corsa avanti confermato (ON per 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": "Fine corsa indietro confermato (condizione per SOL avanti)",
      "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 avanti (bistabile 2 pos.; OFF a fine corsa)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bsol",
      "name": "bBwdSol",
      "type": "BOOL",
      "role": "M",
      "comment": "SOL indietro (mai ON insieme al SOL avanti)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_fend",
      "name": "bFwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "Fine corsa avanti (corsa 0,5 s)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bend",
      "name": "bBwdEnd",
      "type": "BOOL",
      "role": "S",
      "comment": "Fine corsa indietro",
      "address": "",
      "bit": null,
      "initialValue": "1"
    },
    {
      "id": "r_fok",
      "name": "bFwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "Fine corsa avanti confermato (ON per 0,2 s)",
      "address": "",
      "bit": null,
      "initialValue": "0"
    },
    {
      "id": "r_bok",
      "name": "bBwdOK",
      "type": "BOOL",
      "role": "I",
      "comment": "Fine corsa indietro confermato (condizione per SOL avanti)",
      "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
      }
    }
  ]
}
