tag
Description
The tag block is used to label a single signal line with a tagX identifier so that other blocks can distinguish the meaning of individual inputs. The block itself does not change the type or content of the transmitted value. Its role is to accept a change on the input and forward it to the output as the selected tagged line.
The block has one input and one output. It does not require its input to be labeled by another tag block.
Typical usage is to connect tag1, tag2, tag3, and subsequent lines to blocks that assign different meanings to particular inputs, such as switch, comparator, sequence-detector, dimmer, or alarm.
Configuration parameters
| Parameter name | Value |
|---|---|
Name (name) |
The name displayed on the block in the editor. Enter a custom name to help identify the block; an empty field displays tag. Changing “Tag id” automatically fills this field with tag: X, where X is the selected number. The name does not determine the tag number. |
Tag id (tag_id) |
Required tag identifier. Select an integer from 1 to 20 to label the line as tag1, tag2, tag3, and so on. Choose the number according to the input description of the block to which you connect the line. |
Block duplicated value (filter_duplicated_values) |
Required boolean value true or false. When set to true, the block does not forward another value identical to the last emitted one. When set to false, every received change is forwarded to the output, even if the value is the same as the previous one. |
Input handling
The block allows multiple connections to its only input.
The block supports all logic value types used in the project. The received value is forwarded to the output without modification.
Each received input change is handled as follows:
- if “Block duplicated value” is enabled and the new value is identical to the last emitted one, the event is ignored
- in all other cases, the value is forwarded to the only output of the block
- the description shown below the block is updated to the form
tagX: valueif the value can be represented as text - if the received value cannot be represented as text, the description remains in the form
tagX
Ignored cases:
- consecutive values identical to the last emitted one when “Block duplicated value” is enabled
Block outputs
The block has one output. Every value accepted on the input that is not filtered out by the “Block duplicated value” setting appears on the output.
The block does not perform type conversion, scaling, or any additional logic. Its role is only to label the input line with a tag number and pass the value further.
The description shown below the block usually has one of the following forms:
tag1tag1: truetag2: 21.5tag3: open
Errors returned by the block
The block can show the following error messages:
| Error code | Error description |
|---|---|
Tag ID configuration error. |
The “Tag id” setting is missing in the configuration or its format is invalid. |
Invalid tag ID configuration. |
The “Tag id” setting is empty or cannot be read as a text identifier value. |
Missing filter_duplicated_values configuration. |
The “Block duplicated value” setting is missing in the configuration. |
Input disconnected. |
No other block is connected to the block input. |
Usage examples
- If “Tag id” is set to
1and the valuetrueis provided on the input, thentrueappears on the output and the block description changes totag1: true. - If “Tag id” is set to
2and the block is connected to an input expectingtag2, the receiving block treats this line astag2. - If “Block duplicated value” is enabled and the value
25arrives twice in a row on the input, only the first one is forwarded. - If “Block duplicated value” is disabled and the value
25arrives twice in a row on the input, both changes are forwarded. - To compare two temperatures in a
comparatorblock, connect the first sensor through atagwith “Tag id” set to1and the second through atagwith “Tag id” set to2. Incomparator, select comparison withTag: 2; the sensor values will be the left and right sides of the comparison respectively.