Subscribe device command

This function block allows the configuration of up to 10 items per command and/or their parameters. The commands are clustered by the command type. The data type of the corresponding command or its parameter is defined in the parameter dialog. If the data type changes at one pin (by configuration), an already connected value is dropped if it is incompatible.

Defined command types are registered. If a command is received by the corresponding type, the content of the function block’s output is provided. For that matter, the parameter designation is compared to the designations, which have already been received. If they match, the values are converted and provided at the outputs.

Between two calls of one function block, various commands of the same type can be received. These commands are saved to a queue. Every time a function block is called, a check will be carried out, if a relevant event is present in the queue. If that is the case, this event will be evaluated. The queue will be monitored by the status function block. If the amount shown there is negative, an overrun of the queue occurred. From this time, all incoming messages are discarded, as long as the queue has no free space. At the output “New Command”, a value > 0 is issued for one cycle, if a message is present in the queue.

Parameters

The commands can be configured over the parameter dialog (upcoming dialog when implementing the function block or over the context menu).

When entering the command type, the following characters are allowed:

  • A-Z (no umlauts)
  • a-z (no umlauts)
  • 0-9
  • -_.

When entering the name of the item, spaces are allowed.

For both inputs, a maximum of 36 characters is allowed.

 

External: The configuration of the data type will be carried out at the pin “externally” instead of using the parameter dialog. The field “Command” can be left blank.

QoS: refer to Quality of Service (QoS)

 

Parameter subscribe command
Type not valid

Signals

Name I/O Type(s) Function
NewSubs O Word >0 – new message received in the queue
Data1 to Data 10 O Different data types Items
Status O Word Send status