{
  "schema": "spec-platform/v1",
  "kind": "flowchart",
  "v": 1,
  "title": "緊急停止後的處理與復歸（PLC 側）",
  "settings": {
    "yesNo": "YES/NO",
    "yesDir": "down",
    "stepNo": false,
    "stepStart": 10,
    "stepInc": 10
  },
  "nodes": [
    {
      "id": "s",
      "type": "start",
      "text": "安全繼電器的監視 OFF",
      "x": 120,
      "y": 37
    },
    {
      "id": "cut",
      "type": "process",
      "text": "動作輸出 OFF\n清除自保持與定位指令",
      "x": 95,
      "y": 129
    },
    {
      "id": "alarm",
      "type": "process",
      "text": "顯示被按下的按鈕\n記錄停止時的工程",
      "x": 95,
      "y": 227
    },
    {
      "id": "d_rel",
      "type": "decision",
      "text": "緊急停止按鈕\n全部已復位？",
      "x": 85,
      "y": 313
    },
    {
      "id": "d_rst",
      "type": "decision",
      "text": "重置已按下\n並放開？",
      "x": 85,
      "y": 423
    },
    {
      "id": "wpwr",
      "type": "process",
      "text": "等待動力接通\n（上限 3 秒）",
      "x": 95,
      "y": 533
    },
    {
      "id": "d_pwr",
      "type": "decision",
      "text": "動力已接通？",
      "x": 85,
      "y": 615
    },
    {
      "id": "perr",
      "type": "process",
      "text": "顯示「動力無法接通」",
      "x": 365,
      "y": 700
    },
    {
      "id": "d_pos",
      "type": "decision",
      "text": "各軸、氣缸的位置\n已知？",
      "x": 85,
      "y": 780
    },
    {
      "id": "d_cont",
      "type": "decision",
      "text": "可從停止的工程\n繼續？",
      "x": 85,
      "y": 890
    },
    {
      "id": "d_hbtn",
      "type": "decision",
      "text": "原點復歸按鈕\n已按下？",
      "x": 355,
      "y": 970
    },
    {
      "id": "home",
      "type": "process",
      "text": "原點復歸\n（附時間上限）",
      "x": 365,
      "y": 1080
    },
    {
      "id": "d_home",
      "type": "decision",
      "text": "原點復歸\n已完成？",
      "x": 355,
      "y": 1170
    },
    {
      "id": "herr",
      "type": "process",
      "text": "顯示「原點復歸異常」",
      "x": 635,
      "y": 1260
    },
    {
      "id": "d_start",
      "type": "decision",
      "text": "啟動按鈕\n已按下？",
      "x": 85,
      "y": 1340
    },
    {
      "id": "e",
      "type": "end",
      "text": "進入自動運轉",
      "x": 120,
      "y": 1450
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "s",
      "port": "out",
      "to": "cut"
    },
    {
      "id": "e2",
      "from": "cut",
      "port": "out",
      "to": "alarm"
    },
    {
      "id": "e3",
      "from": "alarm",
      "port": "out",
      "to": "d_rel"
    },
    {
      "id": "e4",
      "from": "d_rel",
      "port": "yes",
      "to": "d_rst"
    },
    {
      "id": "e5",
      "from": "d_rel",
      "port": "no",
      "to": "d_rel"
    },
    {
      "id": "e6",
      "from": "d_rst",
      "port": "yes",
      "to": "wpwr"
    },
    {
      "id": "e7",
      "from": "d_rst",
      "port": "no",
      "to": "d_rst"
    },
    {
      "id": "e8",
      "from": "wpwr",
      "port": "out",
      "to": "d_pwr"
    },
    {
      "id": "e9",
      "from": "d_pwr",
      "port": "yes",
      "to": "d_pos"
    },
    {
      "id": "e10",
      "from": "d_pwr",
      "port": "no",
      "to": "perr"
    },
    {
      "id": "e11",
      "from": "perr",
      "port": "out",
      "to": "d_rst"
    },
    {
      "id": "e12",
      "from": "d_pos",
      "port": "yes",
      "to": "d_cont"
    },
    {
      "id": "e13",
      "from": "d_pos",
      "port": "no",
      "to": "d_hbtn"
    },
    {
      "id": "e14",
      "from": "d_cont",
      "port": "yes",
      "to": "d_start"
    },
    {
      "id": "e15",
      "from": "d_cont",
      "port": "no",
      "to": "d_hbtn"
    },
    {
      "id": "e16",
      "from": "d_hbtn",
      "port": "yes",
      "to": "home"
    },
    {
      "id": "e17",
      "from": "d_hbtn",
      "port": "no",
      "to": "d_hbtn"
    },
    {
      "id": "e18",
      "from": "home",
      "port": "out",
      "to": "d_home"
    },
    {
      "id": "e19",
      "from": "d_home",
      "port": "yes",
      "to": "d_start"
    },
    {
      "id": "e20",
      "from": "d_home",
      "port": "no",
      "to": "herr"
    },
    {
      "id": "e21",
      "from": "herr",
      "port": "out",
      "to": "d_hbtn"
    },
    {
      "id": "e22",
      "from": "d_start",
      "port": "yes",
      "to": "e"
    },
    {
      "id": "e23",
      "from": "d_start",
      "port": "no",
      "to": "d_start"
    }
  ],
  "lanes": [],
  "links": []
}
