Parameter list

Parameters that influence the MQTT Message Queue (FB_IotMqttMessageQueue, FB_IotMqtt5MessageQueue) as well as the dynamic memory used for the MQTT messages (TwinCAT Router memory):

Name

Type

Default value

Description

cMaxSizeOfMqttMessage

UDINT

102400

Maximum size in bytes of an MQTT message that can be collected in the message queue.

If the FB_IotMqttClient receives an MQTT message that is too large, it will be completely discarded when trying to store it in the FB_IotMqttMessageQueue.

If the FB_IotMqtt5Client receives such an MQTT message, it will first be reduced by all User Properties when it attempts to store it in the FB_IotMqtt5MessageQueue. If this is not sufficient, the MQTT message is discarded completely.

cMaxSizeOfMqttMessageQueue

UDINT

1024000

Maximum size in bytes of an entire message queue including all collected MQTT messages.

If the FB_IotMqttClient receives a new MQTT message that would exceed the maximum size of the message queue, this message is completely discarded when it is attempted to be stored in the FB_IotMqttMessageQueue.

If the FB_IotMqtt5Client receives such an MQTT message, it waits until there is space in the queue to receive this new message.

cMaxEntriesInMqttMessageQueue

UDINT

1000

Maximum number of messages in a message queue.

Parameters that influence the inputs of an MQTT client (FB_IotMqttClient, FB_IotMqtt5Client):

Name

Type

Default value

Description

cSizeOfMqttClientClientId

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the ClientId.

cSizeOfMqttClientHostName

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the host name.

cSizeOfMqttClientTopicPrefix

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the topic prefix.

cSizeOfMqttClientUserName

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the user name.

cSizeOfMqttClientUserPwd

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the user password.

cSizeOfMqttWillTopic

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the Will-Topic.

Parameters that influence the MQTT 5 properties:

Name

Type

Default value

Description

cSizeOfMqtt5ContentType

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the content type.

cSizeOfMqtt5AuthMethod

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the authentication method.

cSizeOfMqtt5AuthData

UDINT

4096

Maximum size in bytes of the authentication data.

cSizeOfMqtt5ServerReference

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the server reference.

cSizeOfMqtt5ReasonString

UDINT

256

Definition of the STRING size in bytes, which specifies the maximum length of the reason string.

cMaxMqtt5UserProps

UINT

20

Maximum number of UserProperties that can be received with an MQTT 5 message or sent with the help of FB_IotMqtt5UserProperties.

The processing of UserProperties in the PLC real-time task cycle requires a certain amount of time depending on the quantity, which is why it is better to keep it low.