MVI56E-LDM-MQTT ♦ MQ Telemetry Transport
Configuration File Details
ControlLogix® Platform
Quick Start Guide
ProSoft Technology, Inc.
Page 44 of 55
9
Configuration File Details
The configuration file is named
config.json
(in JSON format). Edit it manually on the PC
and move it to the module, or access it directly on the module over FTP (Example:
WinSCP). The file is in the folder
/psft/sample/mqtt
.
Note that settings differ depending on which MQTT Broker the MVI56E-LDM is
connecting. For example, some MQTT Brokers accept any client ID, while some require
it to follow specific rules. In addition, different brokers have different requirements on
TLS client certificates.
The folder
C:\Workspace\mqtt-ldm-sample-app-mvi56e\test-generic
,
houses an example configuration file and certificates for generic MQTT Brokers.
The file config.json and certificate files included in the firmware by default pertain to a
generic MQTT Broker, such as Eclipse Mosquitto™.
9.1
Configuration File Structure
This section describes the elements of the configuration file.
9.1.1 MQTT Server Settings
These settings are used to connect to the MQTT Broker:
Parameter
Description
UserName and Password
Set according to configuration settings for Ignition MQTT Distributor user.
Group ID
The
group_id
element of Sparkplug topic namespace.
UUID
(Optional) Universally Unique Identifier component of Sparkplug payload.
Client ID
The
edge_node
_id element of topic namespace.
Type
Type of the MQTT Broker to connect to:
Generic
:
Any MQTT Broker, such as open source broker Eclipse Mosquitto™.
SparkPlug
: MQTT Broker supporting Sparkplug-B protocol.
Host
IP address of the MQTT Broker.
WillTopic
WillTopic field of the MQTT connect request payload. It should follow the
following format: spBv1.0/
<GroupId>
/NDEATH/
<ClientId>.
Example
: spBv1.0/Prosoft MQTT LDM Gateways/NDEATH/MVI56E-1.
WillMessage
Will Message field of MQTT Connect request payload.
PublishRetryInterval
Message retransmit if no response is received within this time for Publish
messages sent to the MQTT broker.
MaxPublishRetries
Maximum number of re-transmission attempts to successfully send a Publish
message.
PublishTopicPrefix
Prefix added before tag-specific topic name, used to publish values for tags.
Example:
If the tag-specific topic name is
SteamSensor/Pressure
, and option
PublishTopicPrefix
is set to PSFT, then the final topic name on which tag value
is published would be
PSFT/SteamSensor/Pressure
.
SubscribeTopicPrefix
Similar to
PublishTopicPrefix
but used on topic names for Subscribe requests.
MaxPublishInterval
Maximum time interval between publishing of values for each tag. The tag
values are read from the PLC with a scan rate specific for each tag. If the value
is not changed, then it is not published. If time elapsed since the latest
publishing of a value for a tag is greater than
MaxPublishInterval
, then it is
published even if value is not changed.
PublishQOS
Value of the QoS field in MQTT Publish messages. Can be
0
or
1
.
PublishRetain
Value of the RETAIN field of the MQTT Publish message. Can be
0
or
1
.