Logging; Data Flow For Reading Tag Values; Data Flow For Writing Tag Values - ProSoft Technology MVI56E-LDM-MQTT Quick Start Manual

Mq telemetry transport controllogix platform
Table of Contents

Advertisement

MVI56E-LDM-MQTT ♦ MQ Telemetry Transport
ControlLogix® Platform

10.3 Logging

The logging feature uses the standard Linux daemon syslog. The script S10-syslog,
which configures and starts it, is located in the folder of the sample application (mqtt-
ldm-sample-app-mvi56e). It is included in the firmware and installed in the module's
folder /etc/init.d and starts syslog daemon at system boot.
It is configured to log messages into file /www/html/log/messages.txt, under the
web server's public files folder. Therefore, it can be accessed via the module's web
server: http://192.168.0.250/log/messages.txt
It is configured to limit the file size to 32 Kbytes, with a maximum number of files set to 1.
When the log file size exceeds 32Kb, it archives the active log file into file
messages.txt.0, and continues logging in a new file messages.txt. The archived copy
can be accessed via URL: http://192.168.0.250/log/messages.txt.0

10.4 Data Flow for Reading Tag Values

Refer to the Component Diagram on page 48. The orange lines in the diagram illustrate
data flow.
In order to read data from the PLC and publish it to MQTT Broker, the user application
must periodically call the function mqtt-ldm-poll. In this function, MQTT-LDM iterates
over all configured tags: if the time specified by the Scan Rate parameter has elapsed
since last read call, it performs a reading of the current value from the PLC by calling
mqtt_ldm_read_value. If this value is newer than the last read value, it is reported to the
MQTT Broker in a Publish message.
If the last Publishing of the tag value time is greater than MaxPublishInterval, then the
value is published, even if the value has not changed.

10.5 Data Flow for Writing Tag Values

During the connection, if there are writable tags, mqtt-ldm-lib subscribes to topics used
to receive publish messages. It then registers a callback function on AWS IoT SDK,
which is called when the corresponding publish message is received. If the received
value is different than the existing value, it is then written to the PLC.
ProSoft Technology, Inc.
MQTT-LDM Library
Quick Start Guide
Page 51 of 55

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MVI56E-LDM-MQTT and is the answer not in the manual?

Table of Contents