ProSoft Technology MVI69E-LDM-MQTT Quick Start Manual

ProSoft Technology MVI69E-LDM-MQTT Quick Start Manual

Mq telemetry transport compactlogix platform
Table of Contents

Advertisement

Quick Links

MVI69E-LDM-MQTT
MQ Telemetry Transport
®
CompactLogix
Platform
February 10, 2021
QUICK START GUIDE

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for ProSoft Technology MVI69E-LDM-MQTT

  • Page 1 MVI69E-LDM-MQTT MQ Telemetry Transport ® CompactLogix Platform February 10, 2021 QUICK START GUIDE...
  • Page 2: Your Feedback Please

    Neither ProSoft Technology nor any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information contained herein. Information in this document including illustrations, specifications and dimensions may contain technical inaccuracies or typographical errors.
  • Page 3: Important Installation Instructions

    WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT EQUIPMENT UNLESS POWER HAS BEEN SWITCHED OFF OR THE AREA IS KNOWN TO BE NON-HAZARDOUS. Class 2 Power Agency Approvals and Certifications Please visit our website: www.prosoft-technology.com ProSoft Technology, Inc. Page 3 of 54...
  • Page 4: Table Of Contents

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Start Here CompactLogix® Platform Quick Start Guide Contents Your Feedback Please ........................ 2 How to Contact Us ........................2 Content Disclaimer ........................2 Important Installation Instructions ....................3 Agency Approvals and Certifications ................... 3 Start Here MQTT-LDM Generic and SparkplugB ...............
  • Page 5 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Start Here CompactLogix® Platform Quick Start Guide Prerequisites for Customizing the Sample Application MVI69E-LDM-MQTT Zip File ................40 Turn on Hyper-V ....................40 ® Docker ......................40 Development Setup Create User ...................... 41 Sharing the C:/Workspace Folder..............41...
  • Page 6: Start Here

    Customize and build your own MQTT application programs. MQTT-LDM Generic and SparkplugB 1.1.1 Using the MQTT LDM Generic Implementation mqtt-ldm is a software library available for free from the ProSoft Technology website. This document provides step-by-step information on how to enable communication ’s CompactLogix ®...
  • Page 7 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Start Here CompactLogix® Platform Quick Start Guide The MVI69E-LDM acts as a Message Queuing Telemetry Transport (MQTT) client. This document references the Ignition Gateway (by Inductive Automation), a Windows Service. It will require an up-to-date installation of three files from Cirrus link Solutions. It...
  • Page 8: Obtaining Sample Applications

    Quick Start Guide Obtaining Sample Applications MVI69E-LDM-MQTT Zip File The MVI69E-LDM-MQTT zip file is available at www.prosoft-technology.com. This file contains both the Generic and SparkplugB implementations. Navigate to the MVI69E-LDM product webpage. Create a folder on your PC named C:\Workspace and download the MVI69E-LDM- MQTT-xxx.zip (where xxx is version number) to this folder.
  • Page 9: Obtain Mqtt Explorer

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Obtaining Sample Applications CompactLogix® Platform Quick Start Guide Obtain MQTT Explorer If you are implementing MQTT-LDM Generic, navigate to http://mqtt-explorer.com download MQTT Explorer to a Windows 10 PC. You do not need to perform this step if implementing SparkplugB.
  • Page 10: Connecting To The Mvi69E-Ldm

    Use the bottom port to connect the Windows 10 PC via USB to a 1756-EN2T module. This is for debugging purposes using TeraTerm (Open Source Telnet terminal). Figure 1: MVI69E-LDM-MQTT Generic Type Communication Topology ProSoft Technology, Inc. Page 10 of 54...
  • Page 11: Configuring The Compactlogix Plc

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Connecting to the MVI69E-LDM CompactLogix® Platform Quick Start Guide Figure 2: MVI69E-LDM-MQTT SparkplugB Communication Topology Configuring the CompactLogix PLC Open the LDM_MQTT.ACD program and change the appropriate CompactLogix chassis type to match your hardware and firmware.
  • Page 12: Firmware Update

    CompactLogix® Platform Quick Start Guide 3.2.1 Firmware Update Obtain the .firmware file from the MVI69E-LDM-MQTT zip file, or that was built in the “Creating a Build” section in this document. Download the .firmware file to the module via the module’s webpage. Refer to the MVI69E-LDM Developer Manual for details.
  • Page 13: Configuring The Mvi69E-Ldm's Ethernet/Ip Address

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Connecting to the MVI69E-LDM CompactLogix® Platform Quick Start Guide Configuring the MVI69E-LDM’s EtherNet/IP Address Configure the MVI69E-LDM’s Ethernet port IP addresses by modifying the /etc/network/interfaces file on the module. Refer to Figure 1 for a sample communication topology.
  • Page 14: Mqtt Generic Type Sample Application

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide MQTT Generic Type Sample Application This chapter pertains to installing, configuring, and running MQTT generic type implementations. Configuring the Sample Applications Configure the MVI69E-LDM MQTT sample application by modifying the root/psft/sample/mqtt/config.json file on the module.
  • Page 15: Sparkplugb Config.json File

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide Two public MQTT brokers/servers and clients can be found here:  test.mosquitto.org: current IP = 5.196.95.208. (Subject to change)  mqtt.eclipse.org: current IP = 137.135.83.217. (Subject to change) For this sample configuration, ‘mqtt.eclipse.org’...
  • Page 16: Unencrypted Data Exchange

    To do that, open a browser and enter the following URL: http://192.168.4.189/log/messages.txt (Replace 192.168.4.189 with the MVI69E-LDM module’s IP address.) Figure 5: MVI69E-LDM-MQTT successful communications with the remote MQTT broker This log file is located in the MVI69-LDM module at this path: “root/www/html/log/messages.txt”...
  • Page 17: Mqtt Explorer Client Configuration

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide MQTT Explorer Client Configuration The MQTT Explorer client must be configured so that the data from the PLC is displayed in the MQTT Explorer. Launch MQTT Explorer. The MQTT Connection dialog displays with two default connections.
  • Page 18 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide Figure 7: Settings for the mqtt.eclipse.org connection Click on the A button. DVANCED In the Topic field, enter the following values one by one, clicking the A...
  • Page 19 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide Click on the B button. Click S and then the C button. ONNECT MQTT Explorer displays the topics entered in step 5. Figure 9: MQTT Explorer Main Display Expand the Publish section in the center panel, and add “/Set”...
  • Page 20 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide Type the ward “true” or the number “1” in the field indicated in screen capture below. Click on the P button. UBLISH Figure 10: Preparing the string for publishing to the broker In the PLC, tag Local:1:I.Data[9].0 bit was set to TRUE by the remote client that has...
  • Page 21 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide 10 In the MQTT Explorer, enter multiple 1’s in the PSFT/SteamSensor/String/Set field indicated in the following figure: Figure 12: Typing in the desired string values 11 Click on the P button.
  • Page 22: Encrypted Data Exchange

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide Encrypted Data Exchange In config.json file edit this parameter as follows, "Port": 8883, and "DoNotUseTls": 0, to enable encrypted data exchange. Reboot the MVI69E-LDM module.
  • Page 23 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application CompactLogix® Platform Quick Start Guide The Wireshark capture indicates that the data is encrypted. Figure 16: Encrypted data in Wireshark This concludes the Generic MQTT setup instructions with unencrypted and encrypted communications.
  • Page 24: Mqtt Sparkplugb Example

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide MQTT SparkplugB Example Use this chapter to install, configure, and run the MVI69E-LDM module with MQTT Sparkplug-B communications. Set the configuration file parameters, configure the CompactLogix PLC, and begin data exchange.
  • Page 25: Configuring The Compactlogix Plc

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Figure 17: Sparkplug-B Configuration Configuring the CompactLogix PLC Open the MVI69E_LDM_MQTT_SparkplugB_Sample_Ladder.ACD program and change the appropriate chassis type to match your hardware and firmware. Download MVI69E_LDM_MQTT_SparkplugB_Sample_Ladder.ACD file to the CompactLogix processor by choosing C >...
  • Page 26: Ignition

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Ignition Ignition requires that MQTT-related modules be installed for the LDM-MQTT module’s Sparkplug communications requirements. This is a trial version of Ignition that lasts two hours. It can be restarted any number of times.
  • Page 27: Installing .Modl Files

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide 5.3.1 Installing .modl Files Once Ignition is running, select the C gear icon (left side of the window) and sign in ONFIG as required. When the Configuration menu options display: Select the S option.
  • Page 28: Configuring The Unencrypted Sparkplug Data Exchange

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Configuring the Unencrypted Sparkplug Data Exchange This section explains how to configure Ignition to communicate with the PLC. 5.4.1 Logging in to Ignition Using the credentials chosen during the Ignition installation process, log into the Ignition web GUI http://localhost:8088/web/.
  • Page 29: Configuring The Mqtt Broker Distributor Within Ignition

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide 5.4.2 Configuring the MQTT Broker Distributor within Ignition This section covers the basic configuration for the MQTT Distributor file that behaves as the MQTT broker within the Ignition application.
  • Page 30 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Click on the Users tab and then click on the C MQTT U option. REATE NEW SERS Figure 25: Create new MQTT Users option Enter the parameter values as indicated in the following screen capture:...
  • Page 31: Configuring The Mqtt Subscribing Client And Mqtt Engine Within Ignition

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide 5.4.3 Configuring the MQTT Subscribing Client and MQTT Engine Within Ignition This section covers the basic configuration for the MQTT Engine file that behaves as the MQTT subscribing client within the Ignition application.
  • Page 32: Configuring The Mqtt Publishing Client And Mqtt Transmission Within Ignition

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide 5.4.4 Configuring the MQTT Publishing Client and MQTT Transmission Within Ignition This section covers the basic configuration for the MQTT Transmission file that behaves as the MQTT Publishing Client within the Ignition application.
  • Page 33: Verify Ignition To Plc Communication

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide 5.4.5 Verify Ignition to PLC Communication In the Ignition application, navigate to the following location: Status > Systems > Tags > MQTT Engine > Edge Nodes > ProSoft MQTT LDM Gateways>...
  • Page 34: Installing The Ignition Designer Software

    5.5.1 Using Ignition Designer to Send Data to the PLC This section covers the configuration of the Ignition Designer tool and sending data to the PLC. It will show the data exchange with the PLC using the MVI69E-LDM-MQTT in unsecured mode.
  • Page 35 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Click on the L button to activate the Ignition Designer. AUNCH Figure 33: Designer Login Use the same credentials as when the ignition was initially installed. The Open/Create Project dialog pops up. Click on the N button.
  • Page 36 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Set up a new project as in the following example. Figure 35: Setting up the new Project ProSoft Technology, Inc. Page 36 of 54...
  • Page 37 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example CompactLogix® Platform Quick Start Guide Click the C button. REATE ROJECT Figure 36: Creating a new project The new project is created. Drill down to Edge Nodes > ProSoft MQTT LDM Gateways > MVI69E-1 > SteamSensor. Observe that data for most of the tags is changing every few seconds.
  • Page 38 Select the Publish_Subscribe tag as indicated in the following image. Figure 38: Selecting the Publish_Subscribe tag 10 Click on the [Write Once] button. This will cause the MVI69E-LDM-MQTT to prepare the PLC to receive data from the Ignition Designer. ProSoft Technology, Inc.
  • Page 39 11 Select the String tag and write multiple 9s(as an example) as indicated in the following image. Figure 39: Selecting the String tag 12 Click on the [Write Once] blue button. This will cause the MVI69E-LDM-MQTT to send the string of 9s to the PLC. Figure 40: Sending the string to the PLC This concludes the MVI69E-LDM-MQTT client publishing and subscribing functionality within the Ignition environment.
  • Page 40: Prerequisites For Customizing The Sample Application

    Quick Start Guide Prerequisites for Customizing the Sample Application MVI69E-LDM-MQTT Zip File Note: The MVI69E-LDM-MQTT zip file contains the generic version as well as SparkplugB. Go to https://www.prosoft-technology.com and navigate to the MVI69E-LDM product page. Download the mqtt-ldm-MVI69-xxx.zip (where xxx is the version number).
  • Page 41: Development Setup

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Development Setup CompactLogix® Platform Quick Start Guide Development Setup Create User Some Docker files will be stored in the Windows 10 \User folder. You can either use your existing Windows login ID or create a new one.
  • Page 42: Creating A Build

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Creating a Build CompactLogix® Platform Quick Start Guide Creating a Build Obtain the IP address of your Windows 10 PC. Open PowerShell console. Navigate to C:\Workspace\mqtt-ldm\scripts. Run script build.ps1 as follows: ./build.ps1 -SHARED_FOLDER //192.168.1.73/Workspace - SHARED_FOLDER_USER bfluser –SHARED_FOLDER_PASSWORD passwd...
  • Page 43: Configuration File Details

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details CompactLogix® Platform Quick Start Guide 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).
  • Page 44: Plc Path

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details CompactLogix® Platform Quick Start Guide 9.1.2 PLC Path This defines the connection string to connect to the PLC. 9.1.3 Sync Time with PLC A flag indicating if the system time should be synchronized with the PLC.
  • Page 45: Configuring Generic Mqtt Brokers

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details CompactLogix® Platform Quick Start Guide Configuring Generic MQTT Brokers An example configuration file is located in the mqtt-ldm-sample-app-mvi69e\test- generic folder. 9.2.1 Generic MQTT Broker This is located in the mqtt-ldm-sample-app-mvi69e\test-generic folder. The file config.json contains a default configuration file, which is received during a firmware update.
  • Page 46: Running The Sample Application

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details CompactLogix® Platform Quick Start Guide Running the Sample Application With the configuration complete, restart the application. To restart the application, either reboot the module, or connect to the module over Telnet terminal and run the following command: /etc/init.d/S88-mqtt stop...
  • Page 47: Mqtt-Ldm Library

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library CompactLogix® Platform Quick Start Guide 10 MQTT-LDM Library This chapter pertains to developers building custom applications using the library. It describes high-level design of the library and main API functions required to use it from customer applications.
  • Page 48: Main Api Functions And Data Flow

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library CompactLogix® Platform Quick Start Guide 10.2 Main API Functions and Data Flow 10.2.1 Functions Implemented by the Library The functions defined in the header file C:\Workspace\mqtt-ldm\mqtt-ldm- lib\inc\mqtt-ldm-lib.h are shown in the following examples. They are expected to be called from the user application: int mqtt_ldm_initialize(const char* path_to_config_file);...
  • Page 49: Callback Function Declarations

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library CompactLogix® Platform Quick Start Guide 10.2.2 Callback Function Declarations Functions - Callbacks, called by MQTT-LDM Library during runtime, should be implemented by the user application. The sample application provides a default implementation of the callback functions.
  • Page 50: Logging

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library CompactLogix® Platform Quick Start Guide 10.3 Logging The logging feature uses the standard Linux daemon syslog. The script S10-syslog, which configures and starts the feature, is located in the folder of the sample application (mqtt-ldm-sample-app-mvi69e).
  • Page 51: Firmware

    11.1 Firmware Contents The sample application installed to the MVI69E-LDM contains files that are included in the MVI69E-LDM-MQTT zip file. The contents of the zip file were copied to the Windows 10 PC’s C:\Workspace folder in Chapter 2. Although they are installed on the module with the module webpage’s Firmware Download process, the files can be FTP’d independently as well.
  • Page 52: Visual Studio 2017 Project

    MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Visual Studio 2017 Project CompactLogix® Platform Quick Start Guide 12 Visual Studio 2017 Project You can use Visual Studio 2017 to build the sample application. Before doing so, make “Prerequisites for Customizing the Sample sure you have first completed the steps in Application”...
  • Page 53 MVI69E-LDM-MQTT ♦ MQ Telemetry Transport Visual Studio 2017 Project CompactLogix® Platform Quick Start Guide Choose Build Events from the left panel. Notice the Command Line on the right. Copy this Command Line to Notepad, and modify it as follows: Set the correct IP address. This is your Windows 10 PC’s IP address.
  • Page 54: Support, Service & Warranty

    Quick Start Guide 13 Support, Service & Warranty 13.1 Contacting Technical Support ProSoft Technology, Inc. is committed to providing the most efficient and effective support possible. Before calling, please gather the following information to assist in expediting this process: ...

Table of Contents