[
        {
                "id": "pp-tab",
                "type": "tab",
                "label": "ABB-GoFa-12 Pick & Place Sorting Cell",
                "disabled": false,
                "info": "Learning-resource flow: mirrors a real conveyor pick -> classify -> sorted-place industrial cell.\n\n1. Deploy, then use the \"0 - Teach Points\" group once: jog the robot (FlexPendant, or the Cartesian/Joint Jog group in gofa_demo_flow.json) to the pickup spot and press \"Save Pickup\"; repeat for Bin A and Bin B; press \"Set Home Here\" at a safe ready pose clear of both bins.\n2. Press \"Start Cycle\" in the \"1 - Sorting Cycle\" group to run one pick/classify/place cycle.\n3. The \"classify\" step reads the physical ASI button (Asi1Button2) as a stand-in for a real color/vision/weight sensor: press it before the read fires to route the part to Bin A, leave it unpressed to route to Bin B."
        },
        {
                "id": "pp-g-setup",
                "type": "group",
                "z": "pp-tab",
                "name": "0 - Teach Points (one-time setup)",
                "style": {
                        "stroke": "#009999",
                        "stroke-opacity": "1",
                        "fill": "#e8f5f5",
                        "fill-opacity": "0.5",
                        "label": true,
                        "label-position": "nw",
                        "color": "#009999"
                },
                "nodes": [
                        "pp-c-setup",
                        "pp-i-save-pickup",
                        "pp-n-save-pickup",
                        "pp-d-save-pickup",
                        "pp-i-save-bina",
                        "pp-n-save-bina",
                        "pp-d-save-bina",
                        "pp-i-save-binb",
                        "pp-n-save-binb",
                        "pp-d-save-binb",
                        "pp-i-sethome",
                        "pp-n-sethome",
                        "pp-d-sethome",
                        "42a91bd830bca8e9",
                        "bb09d07a407bc8a5",
                        "c445cd906aead295"
                ],
                "x": 44,
                "y": 39,
                "w": 872,
                "h": 362
        },
        {
                "id": "pp-g-cycle",
                "type": "group",
                "z": "pp-tab",
                "name": "1 - Sorting Cycle (pick -> classify -> sorted place)",
                "style": {
                        "stroke": "#00aa44",
                        "stroke-opacity": "1",
                        "fill": "#e8f5ec",
                        "fill-opacity": "0.5",
                        "label": true,
                        "label-position": "nw",
                        "color": "#00aa44"
                },
                "nodes": [
                        "pp-c-cycle",
                        "pp-i-start",
                        "pp-n-motoron",
                        "pp-n-home1",
                        "pp-n-goto-pickup",
                        "pp-n-grip-close",
                        "pp-n-delay1",
                        "pp-n-classify",
                        "pp-n-switch",
                        "pp-n-goto-bina",
                        "pp-n-release-a",
                        "pp-d-sorted-a",
                        "pp-n-goto-binb",
                        "pp-n-release-b",
                        "pp-d-sorted-b",
                        "pp-n-home2",
                        "pp-d-complete"
                ],
                "x": 54,
                "y": 419,
                "w": 2932,
                "h": 202
        },
        {
                "id": "pp-c-setup",
                "type": "comment",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Jog the robot to each spot first (FlexPendant, or gofa_demo_flow.json's Jog group), then press the matching Save button.",
                "info": "",
                "x": 480,
                "y": 80,
                "wires": []
        },
        {
                "id": "pp-i-save-pickup",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Save 'Pickup' (here)",
                "props": [
                        {
                                "p": "payload"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 190,
                "y": 140,
                "wires": [
                        [
                                "pp-n-save-pickup"
                        ]
                ]
        },
        {
                "id": "pp-n-save-pickup",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "outputPayload": true,
                "name": "Save 'Pickup'",
                "robot": "cfg1",
                "action": "save",
                "pointName": "Pickup",
                "path": "",
                "x": 440,
                "y": 140,
                "wires": [
                        [
                                "pp-d-save-pickup"
                        ]
                ]
        },
        {
                "id": "pp-d-save-pickup",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "{ ok, point:{name:'Pickup',...} }",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 710,
                "y": 140,
                "wires": []
        },
        {
                "id": "pp-i-save-bina",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Save 'Bin A' (here)",
                "props": [
                        {
                                "p": "payload"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 190,
                "y": 195,
                "wires": [
                        [
                                "pp-n-save-bina"
                        ]
                ]
        },
        {
                "id": "pp-n-save-bina",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "outputPayload": true,
                "name": "Save 'Bin A'",
                "robot": "cfg1",
                "action": "save",
                "pointName": "Bin A",
                "path": "",
                "x": 440,
                "y": 195,
                "wires": [
                        [
                                "pp-d-save-bina"
                        ]
                ]
        },
        {
                "id": "pp-d-save-bina",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "{ ok, point:{name:'Bin A',...} }",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 710,
                "y": 195,
                "wires": []
        },
        {
                "id": "pp-i-save-binb",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Save 'Bin B' (here)",
                "props": [
                        {
                                "p": "payload"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 190,
                "y": 250,
                "wires": [
                        [
                                "pp-n-save-binb"
                        ]
                ]
        },
        {
                "id": "pp-n-save-binb",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "outputPayload": true,
                "name": "Save 'Bin B'",
                "robot": "cfg1",
                "action": "save",
                "pointName": "Bin B",
                "path": "",
                "x": 440,
                "y": 250,
                "wires": [
                        [
                                "pp-d-save-binb"
                        ]
                ]
        },
        {
                "id": "pp-d-save-binb",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "{ ok, point:{name:'Bin B',...} }",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 710,
                "y": 250,
                "wires": []
        },
        {
                "id": "pp-i-sethome",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Set Home (here)",
                "props": [
                        {
                                "p": "payload"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 190,
                "y": 305,
                "wires": [
                        [
                                "pp-n-sethome"
                        ]
                ]
        },
        {
                "id": "pp-n-sethome",
                "type": "gofa-move",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "outputPayload": true,
                "name": "SETHOME",
                "robot": "cfg1",
                "command": "SETHOME",
                "x": 440,
                "y": 305,
                "wires": [
                        [
                                "pp-d-sethome"
                        ]
                ]
        },
        {
                "id": "pp-d-sethome",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "{ ok, ack:'OK:SETHOME' }",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 710,
                "y": 305,
                "wires": []
        },
        {
                "id": "pp-c-cycle",
                "type": "comment",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Real industrial pattern: part arrives -> pick -> classify (sensor) -> place in the matching bin -> return to ready. Classify = Asi1Button2 as a stand-in sensor.",
                "info": "",
                "x": 740,
                "y": 460,
                "wires": []
        },
        {
                "id": "pp-i-start",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Start Cycle (part arrived)",
                "props": [
                        {
                                "p": "payload"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 210,
                "y": 520,
                "wires": [
                        [
                                "pp-n-motoron"
                        ]
                ]
        },
        {
                "id": "pp-n-motoron",
                "type": "gofa-motor",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Ensure Motors ON",
                "robot": "cfg1",
                "action": "motoron",
                "x": 440,
                "y": 520,
                "wires": [
                        [
                                "pp-n-home1"
                        ]
                ]
        },
        {
                "id": "pp-n-home1",
                "type": "gofa-move",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Go to Ready/Home",
                "robot": "cfg1",
                "command": "HOME",
                "x": 650,
                "y": 520,
                "wires": [
                        [
                                "pp-n-goto-pickup"
                        ]
                ]
        },
        {
                "id": "pp-n-goto-pickup",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Go to 'Pickup'",
                "robot": "cfg1",
                "action": "go",
                "pointName": "Pickup",
                "moveType": "J",
                "path": "",
                "x": 850,
                "y": 520,
                "wires": [
                        [
                                "pp-n-grip-close"
                        ]
                ]
        },
        {
                "id": "pp-n-grip-close",
                "type": "gofa-grip",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Close Gripper (Pick)",
                "robot": "cfg1",
                "action": "on",
                "signal": "ABB_Scalable_IO_0_DO1",
                "x": 1050,
                "y": 520,
                "wires": [
                        [
                                "pp-n-delay1"
                        ]
                ]
        },
        {
                "id": "pp-n-delay1",
                "type": "delay",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Settle 0.5s",
                "pauseType": "delay",
                "timeout": "0.5",
                "timeoutUnits": "seconds",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "allowrate": false,
                "outputs": 1,
                "x": 1250,
                "y": 520,
                "wires": [
                        [
                                "pp-n-classify"
                        ]
                ]
        },
        {
                "id": "pp-n-classify",
                "type": "gofa-di-read",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Classify Part (stand-in sensor)",
                "robot": "cfg1",
                "signal": "Asi1Button2",
                "x": 1470,
                "y": 520,
                "wires": [
                        [
                                "pp-n-switch"
                        ]
                ]
        },
        {
                "id": "pp-n-switch",
                "type": "switch",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Route by Classify Sensor",
                "property": "payload.value",
                "propertyType": "msg",
                "rules": [
                        {
                                "t": "eq",
                                "v": "1",
                                "vt": "num"
                        },
                        {
                                "t": "else"
                        }
                ],
                "checkall": "false",
                "repair": false,
                "outputs": 2,
                "x": 1720,
                "y": 520,
                "wires": [
                        [
                                "pp-n-goto-bina"
                        ],
                        [
                                "pp-n-goto-binb"
                        ]
                ]
        },
        {
                "id": "pp-n-goto-bina",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Go to 'Bin A'",
                "robot": "cfg1",
                "action": "go",
                "pointName": "Bin A",
                "moveType": "J",
                "path": "",
                "x": 1960,
                "y": 460,
                "wires": [
                        [
                                "pp-n-release-a"
                        ]
                ]
        },
        {
                "id": "pp-n-release-a",
                "type": "gofa-grip",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Release (Place -> Bin A)",
                "robot": "cfg1",
                "action": "off",
                "signal": "ABB_Scalable_IO_0_DO1",
                "x": 2160,
                "y": 460,
                "wires": [
                        [
                                "pp-d-sorted-a",
                                "pp-n-home2"
                        ]
                ]
        },
        {
                "id": "pp-d-sorted-a",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Sorted -> Bin A",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 2530,
                "y": 460,
                "wires": []
        },
        {
                "id": "pp-n-goto-binb",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Go to 'Bin B'",
                "robot": "cfg1",
                "action": "go",
                "pointName": "Bin B",
                "moveType": "J",
                "path": "",
                "x": 1960,
                "y": 580,
                "wires": [
                        [
                                "pp-n-release-b"
                        ]
                ]
        },
        {
                "id": "pp-n-release-b",
                "type": "gofa-grip",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Release (Place -> Bin B)",
                "robot": "cfg1",
                "action": "off",
                "signal": "ABB_Scalable_IO_0_DO1",
                "x": 2160,
                "y": 580,
                "wires": [
                        [
                                "pp-d-sorted-b",
                                "pp-n-home2"
                        ]
                ]
        },
        {
                "id": "pp-d-sorted-b",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Sorted -> Bin B",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 2530,
                "y": 580,
                "wires": []
        },
        {
                "id": "pp-n-home2",
                "type": "gofa-move",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "outputPayload": true,
                "name": "Return to Ready",
                "robot": "cfg1",
                "command": "HOME",
                "x": 2520,
                "y": 520,
                "wires": [
                        [
                                "pp-d-complete"
                        ]
                ]
        },
        {
                "id": "pp-d-complete",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-cycle",
                "name": "Cycle Complete -- ready for next part",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 2790,
                "y": 520,
                "wires": []
        },
        {
                "id": "42a91bd830bca8e9",
                "type": "gofa-points",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "outputPayload": true,
                "name": "",
                "robot": "cfg1",
                "action": "delete",
                "pointName": "Bin B",
                "moveType": "J",
                "path": "",
                "x": 450,
                "y": 360,
                "wires": [
                        [
                                "c445cd906aead295"
                        ]
                ]
        },
        {
                "id": "bb09d07a407bc8a5",
                "type": "inject",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "Delete Point",
                "props": [
                        {
                                "p": "payload"
                        },
                        {
                                "p": "topic",
                                "vt": "str"
                        }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "",
                "payloadType": "date",
                "x": 190,
                "y": 360,
                "wires": [
                        [
                                "42a91bd830bca8e9"
                        ]
                ]
        },
        {
                "id": "c445cd906aead295",
                "type": "debug",
                "z": "pp-tab",
                "g": "pp-g-setup",
                "name": "",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "statusVal": "",
                "statusType": "auto",
                "x": 670,
                "y": 360,
                "wires": []
        },
        {
                "id": "cfg1",
                "type": "gofa-robot",
                "name": "ABB-GoFa-12",
                "ip": "192.168.125.1",
                "rwsPort": "443",
                "socketPort": "1025",
                "backgroundPort": "1026",
                "username": "Default User",
                "remotePointsPath": "$HOME/Programs/gofa_points.json",
                "jointLimits": "",
                "allowInsecureLiveControl": false
        },
        {
                "id": "6bebfbf582497203",
                "type": "global-config",
                "env": [],
                "modules": {
                        "node-red-contrib-abb-gofa": "2.5.1"
                }
        }
]
