{
  "schema": "spec-platform/v1",
  "kind": "flowchart",
  "v": 1,
  "title": "移載單元的原點復歸",
  "settings": {
    "yesNo": "YES/NO",
    "yesDir": "down",
    "stepNo": false,
    "stepStart": 10,
    "stepInc": 10
  },
  "nodes": [
    {
      "id": "s",
      "type": "start",
      "text": "原點復歸按鈕",
      "x": 120,
      "y": 37
    },
    {
      "id": "d_pwr",
      "type": "decision",
      "text": "動力與氣壓\n已接通？",
      "x": 85,
      "y": 120
    },
    {
      "id": "perr",
      "type": "process",
      "text": "顯示「動力或氣壓\n未接通」",
      "x": 365,
      "y": 200
    },
    {
      "id": "ng1",
      "type": "end",
      "text": "中止",
      "x": 390,
      "y": 280
    },
    {
      "id": "d_pull",
      "type": "decision",
      "text": "不拉扯工件就能\n讓 Z 上升？",
      "x": 85,
      "y": 310
    },
    {
      "id": "pmsg",
      "type": "process",
      "text": "顯示\n「請手動打開\n夾爪或治具」",
      "x": 365,
      "y": 390
    },
    {
      "id": "ng2",
      "type": "end",
      "text": "中止",
      "x": 390,
      "y": 478
    },
    {
      "id": "zup",
      "type": "process",
      "text": "Z 上升\n（上限 3 秒）",
      "x": 95,
      "y": 420
    },
    {
      "id": "d_zup",
      "type": "decision",
      "text": "Z 的上升端 ON？",
      "x": 85,
      "y": 500
    },
    {
      "id": "zerr",
      "type": "process",
      "text": "顯示\n「Z 無法上升」",
      "x": 365,
      "y": 580
    },
    {
      "id": "ng3",
      "type": "end",
      "text": "中止",
      "x": 390,
      "y": 660
    },
    {
      "id": "xh",
      "type": "process",
      "text": "X 回原點\n（上限 30 秒）",
      "x": 95,
      "y": 610
    },
    {
      "id": "d_xh",
      "type": "decision",
      "text": "X 已到達\n原點？",
      "x": 85,
      "y": 690
    },
    {
      "id": "xerr",
      "type": "process",
      "text": "顯示\n「X 無法回到原點」",
      "x": 365,
      "y": 770
    },
    {
      "id": "ng4",
      "type": "end",
      "text": "中止",
      "x": 390,
      "y": 850
    },
    {
      "id": "d_wk",
      "type": "decision",
      "text": "夾爪是空的？",
      "x": 85,
      "y": 880
    },
    {
      "id": "wmsg",
      "type": "process",
      "text": "顯示「請取下\n工件」",
      "x": 365,
      "y": 960
    },
    {
      "id": "ng5",
      "type": "end",
      "text": "中止",
      "x": 390,
      "y": 1040
    },
    {
      "id": "done",
      "type": "process",
      "text": "原點復歸完成\n（bHomeDone）ON",
      "x": 95,
      "y": 1000
    },
    {
      "id": "e_ok",
      "type": "end",
      "text": "原位\n（進入等待啟動）",
      "x": 120,
      "y": 1090
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "s",
      "port": "out",
      "to": "d_pwr"
    },
    {
      "id": "e2",
      "from": "d_pwr",
      "port": "yes",
      "to": "d_pull"
    },
    {
      "id": "e3",
      "from": "d_pwr",
      "port": "no",
      "to": "perr"
    },
    {
      "id": "e4",
      "from": "perr",
      "port": "out",
      "to": "ng1"
    },
    {
      "id": "e5",
      "from": "d_pull",
      "port": "yes",
      "to": "zup"
    },
    {
      "id": "e6",
      "from": "d_pull",
      "port": "no",
      "to": "pmsg"
    },
    {
      "id": "e7",
      "from": "pmsg",
      "port": "out",
      "to": "ng2"
    },
    {
      "id": "e8",
      "from": "zup",
      "port": "out",
      "to": "d_zup"
    },
    {
      "id": "e9",
      "from": "d_zup",
      "port": "yes",
      "to": "xh"
    },
    {
      "id": "e10",
      "from": "d_zup",
      "port": "no",
      "to": "zerr"
    },
    {
      "id": "e11",
      "from": "zerr",
      "port": "out",
      "to": "ng3"
    },
    {
      "id": "e12",
      "from": "xh",
      "port": "out",
      "to": "d_xh"
    },
    {
      "id": "e13",
      "from": "d_xh",
      "port": "yes",
      "to": "d_wk"
    },
    {
      "id": "e14",
      "from": "d_xh",
      "port": "no",
      "to": "xerr"
    },
    {
      "id": "e15",
      "from": "xerr",
      "port": "out",
      "to": "ng4"
    },
    {
      "id": "e16",
      "from": "d_wk",
      "port": "yes",
      "to": "done"
    },
    {
      "id": "e17",
      "from": "d_wk",
      "port": "no",
      "to": "wmsg"
    },
    {
      "id": "e18",
      "from": "wmsg",
      "port": "out",
      "to": "ng5"
    },
    {
      "id": "e19",
      "from": "done",
      "port": "out",
      "to": "e_ok"
    }
  ],
  "lanes": [],
  "links": []
}
