Set Recipe Body#
When activated, the Set Recipe Body task will send an S7F3 (Set Recipe Body) SECS/GEM message to the equipment.
Inputs#
| Name | Data Type | Description |
|---|---|---|
| recipeName | String | Name of the recipe we want to retrieve |
| recipeBody | any | New body for the recipe |
| Activate | Any | Activate the task |
Outputs#
| Name | Data Type | Description |
|---|---|---|
| Success | Boolean | Triggered when the task is executed with success |
| Error | Error | Triggered when the task failed for some reason |
Settings#
On the General tab, you have the usual settings and the following settings:
| Name | Data Type | Values | Default | Description |
|---|---|---|---|---|
| Stream Function Name | String | S7F3 | SECS-GEM Stream Function Name used on message. | |
| Request Message | Object | { "type": "A", "name": "PPID", "value": "" } | Custom request message, instead of the default. | |
| Use S7F1 (Request to upload) | Boolean | true | Parameter to specify whether or not to require an inquiry for the S7F1 process program when sending the S7F3 process program from the host | |
| S7F1 Success Codes: | String | 0x00 | Multiple values allowed using comma as separator ('0x01, 0x04, 0x05, 0x00'). If empty, any reply is a success. | |
| Request Message | Object | { "type": "L", "value": [ { "type": "A", "name": "PPID", "value": "" }, { "type": "BI", "name": "PPBODY", "value": "" } ] } | Custom request message instead of the default | |
| Recipe Name item path location | String | /[1] | Item path location, on primary message, where Recipe Name input should be inserted. If empty no substitution is performed and primary message is sent as is. | |
| Recipe Body Path | String | /[2] | Path location, on reply message, where RecipeBody should be retrieved | |
| Recipe Body Type | enum | BufferRecipeBodyString\RecipeBody | BufferRecipeBody | Recipe Body on message content can be interpreted. |
| Reply Path | String | / | Location where the result code is located in the reply message | |
| Success Codes | S | 0x00 | Multiple values allowed using comma as separator ('0x01, 0x04, 0x05, 0x00'). If empty, any reply is a success. |
The reply path is a useful way to navigate through the SECS/GEM message, below you can find an example:
Example:
{
"type": "L",
"value": [
{ "type": "A", "value": "test" },
{ "type": "BO", "value": true },
{ "type": "BI", "value": "0x01" },
{ "type": "I1", "value": 1 },
{ "type": "I2", "value": 2 },
{ "type": "I4", "value": 4 },
{ "type": "I8", "value": 8 },
{ "type": "U1", "value": 11 },
{ "type": "U2", "value": 22 },
{ "type": "U4", "value": 44 },
{ "type": "U8", "value": 88 },
{ "type": "F4", "value": 3.14 },
{ "type": "F8", "value": 3.1415 },
{ "type": "L", "value": [
{ "type": "BO", "value": [true, false, false, true] },
{ "type": "BI", "value": [1, 2, 255] },
{ "type": "I1", "value": [1, 2, 3] },
{ "type": "I2", "value": [2, 3, 4] },
{ "type": "I4", "value": [4, 5, 6] },
{ "type": "I8", "value": [8, 9, 10] },
{ "type": "U1", "value": [11, 12, 13] },
{ "type": "U2", "value": [22, 23, 24] },
{ "type": "U4", "value": [44, 45, 46] },
{ "type": "U8", "value": [88, 89, 90] },
{ "type": "F4", "value": [3.14, 3.15, 3.16] },
{ "type": "F8", "value": [3.1415, 3.141516, 3.14151617] }
]}
]
}
SECS/GEM item values can be extracted from a message using a path-like string. The separator is the "/" character. Indexes start in 1 (1..n). If using a type prefix, will match the order index.
The following examples should help to explain how to use them:
- "/" -> would return the root node
- "/[1]" -> would return string "test"
- "/[4]" -> Would return integer 1
- "/U1" -> Would return 11
- "/U1[1]" -> Would also return 11
- "/L/[3]" -> Would return [1, 2, 3]
- "/[14]/[3]" -> Would also return [1, 2, 3]
The request message and reply messages can be custom created SECS-GEM messages. The JSON format can be used to create the body of the message, as shown above in the reply message example.
A SECS/GEM message can be build using JSON format, where each SECS/GEM item is represented as an object with the following format:
{
"name": "OptionalName",
"comment": "Optional Comment/Description",
"type": "A",
"value": "test"
}
The supported types are:
- A - ASCII (Strings)
- BI - Binary ValueBO - Boolean
- I1, I2, I4, I8 - Signed Integers
- U1, U2, U4, U8 - Unsigned Integers
- F4, F8 - Float/Double
- L - Lists
Behavior#
In this task you choose a driver when dropping it into the workflow (if you have more than one driver associated with the controller).
Upon activation, will send an S7F1 (Request to upload) message to the driver of the equipment. If the equipment replies with a success, it will then send an S7F3 (Set Recipe Body) message to the driver of the equipment.
If the reply matches what was expected in the correct path and with the correct success code, the task will emit a value true on the Success output. In case of the task , for some reason, is not able send the message or if it receives an unexpected reply, an Error is emitted.
Remarks#
There is no particular remark to be made.

