Message Settings Tab
You use the Message Settings tab to configure the template for the MQTT messages that are to be sent later to the MQTT server.
Payload Settings
In the upper part of the screen, you can define the following data for the MQTT messages:
|
Field |
Description |
|---|---|
|
Topic Name |
You enter the topic name for the MQTT message here. The following restrictions apply when you enter the topic name:
If you do not enter anything for the topic name here, the MQTT destination system automatically provides an input variable of the type String with the name inTopicName. In this way, the topic can be determined for the message during runtime. You can enter a constant value or a template here. For example, if you want to determine the topic name based on the value of the input variable MachineID, you can enter the following character string, for example: Measurement recording/{MachineID}/Temperature. The string {MachineID} is then displayed as an input variable MachineID in the table of input variables. At runtime, the machine ID is read and replaced dynamically. |
|
QoS |
Quality of service: To make sure that a sent message reaches the recipient, MQTT defines three different quality of service (QoS) levels with which a message can be sent:
|
|
Payload Type |
Specifies the format of the MQTT messages. The following formats are supported:
|
Generate Mapping from Template
You can choose the button Generate Mapping from Template to insert a specified character string in the dialog box that appears. The template generates an MQTT message that is to be sent from PCo to the MQTT server. (See: Generate Mapping from Template.)
Message Configuration Screen Area
In the lower part of the screen, you can add payload parameters if you have chosen JSON, XML, or URL-formatted as the payload type. Using the parameters you have entered, PCo generates a template for the MQTT messages. (See: Message Configuration Screen Area.)