Basler Vision Connector Messaging: Creating a Recipe Instance#
To run a recipe, it must have been uploaded and the cameras you want to assign to the recipe must be open. You must then create an instance of the recipe. You can always choose to assign or change the camera assignments using the Connect Recipe command.
For recipe identification, you can use arbitrary strings, but only the following characters are allowed:
- Letters (A–Z or a–z)
- Digits (0–9)
- Hyphens (-)
- Underscores (_)
- Full stop (.)
If a camera is closed, all its pin assignments to recipe pins are automatically removed.
JSON Payload#
| Field | Optional | Type | Description |
|---|---|---|---|
| TransactionID | Yes | String | Transaction identification |
| Action | No | String | Method called. Fixed value: cstm_OpenRecipe |
| RecipeID | No | String | The user-defined ID to use during communication with the recipe as described above. |
| FileName | No | String | File name of the recipe file you want to instantiate. |
| PinConnections | Yes | List of key-value pairs of Strings | The recipe pin assignments as list of key-value pairs of strings. The key is the user-defined pin ID chosen in the recipe (see also Naming of Input Pins). The value is a device ID of an open device that shall be assigned to. This entry is optional. |
{
"TransactionID": "234423465465",
"Action": "cstm_OpenRecipe",
"RecipeID": "MyRecipeID",
"FileName": "MyRecipe.precipe",
"PinConnections": {
"MyFirstPinID": "MyDeviceID1",
"MySecondPinID": "MyDeviceID2"
}
}
Response Object#
| Field | Optional | Type | Description |
|---|---|---|---|
| TransactionID | Yes | String | Transaction identification |
| ReturnCode | No | Integer | Message code following Message Codes |
| Message | No | String | Response message |