Recipe Settings

From v2.0.0.

The optional recipes section lists named production cycles. A recipe names the camera, the pipeline and the robot to select, and the commands to run with them. The PLC (procedure RunRecipe, see Running a Recipe), an OPC UA client (RunRecipe, RunRecipeWithPose) or script mode (RUN_RECIPE) then runs a whole cycle with one call, instead of selecting the camera, pipeline and robot and starting each step on its own.

"recipes": [
    {
        "recipeId": "small-parts",
        "cameraId": "camera-1",
        "pipelineId": "small-parts",
        "robotId": "robot-1",
        "commands": [
            { "command": "CAPTURE_IMAGE" },
            { "command": "COMPUTE_2D" },
            { "command": "COMPUTE_3D" },
            { "command": "GET_BEST_RESULT" }
        ]
    }
]
Key Meaning

recipeId

The ID that RunRecipe is called with; unique among the recipes. With PROFINET it has at most 32 characters, because the PLC passes it in the 32-byte field IN_ParamArgString; LumiScan VGR refuses a longer ID at startup.

cameraId, pipelineId, robotId

The camera (cameras[]), the pipeline (pipelines[]) and the robot (robots[]) that the recipe selects.

commands

Optional. Script-mode commands, by the same names, run in order. Without commands, the default cycle CAPTURE_IMAGE, COMPUTE_2D, COMPUTE_3D, GET_BEST_RESULT runs; an empty list only selects the camera, pipeline and robot.
SET_CAMERA, SET_PIPELINE, SET_ROBOT and RUN_RECIPE are not allowed: the IDs of the recipe select those.
SET_POSE with an argument sets the robot pose for a camera that the robot carries, in the robot’s poseFormat (see Hand-Eye Calibration); it takes precedence over a pose that the caller supplies.

The first failing command ends the run. Only GET_POSE, GET_TEMPERATURE, GET_BEST_TRAJECTORY and GET_USED_HALCON_MODULES are exceptions: they only report, so their failure is logged and the recipe continues.

A recipe can be written directly in recipes[], or kept in a file of its own and $import-ed. Its schema is recipe.schema.json.