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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Start Here ControlLogix® Platform Quick Start Guide Important Installation Instructions Power, Input, and Output (I/O) wiring must be in accordance with Class I, Division 2 wiring methods, Article 501-4 (b) of the National Electrical Code, NFPA 70 for installation in the U.S., or as specified in Section 18- 1J2 of the Canadian Electrical Code for installations in Canada, and in accordance with the authority having jurisdiction.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Start Here ControlLogix® 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
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Start Here ControlLogix® Platform Quick Start Guide Prerequisites for Customizing the Sample Application MVI56E-LDM-MQTT Zip File ................41 Turn on Hyper-V ....................41 ® Docker ......................41 Development Setup Create User ...................... 42 Sharing the C:/Workspace Folder..............42...
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 ControlLogix ®...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Start Here ControlLogix® Platform Quick Start Guide 1.1.2 Using the SparkplugB Implementation This document provides step-by-step information on how to enable communication ’s Ignition, using MQTT ® between a ControlLogix PLC and Inductive Automation SparkplugB.
Page 8
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Start Here ControlLogix® Platform Quick Start Guide Video 9: Allow Outbound Tag Writes https://inductiveautomation.com/resources/video/allow-outbound-tag-writes Video 10: Primary Host ID Setting https://inductiveautomation.com/resources/video/primary-host-id-setting Video 11: How to Set Up Transport Layer Security https://inductiveautomation.com/resources/video/how-to-set-up-transport-layer-security Video 12: Set Up Store-and-Forward System https://inductiveautomation.com/resources/video/set-up-storeandforward-system...
Quick Start Guide Obtaining Sample Applications MVI56E-LDM-MQTT Zip File The MVI56E-LDM-MQTT zip file is available at www.prosoft-technology.com. This file contains both the Generic and SparkplugB implementations. Navigate to the MVI56E-LDM product webpage. Create a folder on your PC named C:\Workspace and download the MVI56E- LDM-MQTT-xxx.zip (where xxx is version number) to this folder.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Obtaining Sample Applications ControlLogix® 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.
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: MVI56E-LDM-MQTT Generic Type Communication Topology ProSoft Technology, Inc. Page 11 of 55...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Connecting to the MVI56E-LDM Module ControlLogix® Platform Quick Start Guide Figure 2: MVI56E-LDM-MQTT SparkplugB Communication Topology Configuring the ControlLogix PLC Open the LDM_MQTT.ACD program and change the appropriate ControlLogix chassis type to match your hardware and firmware.
Quick Start Guide 3.2.1 Firmware Update Obtain the .firmware file from the MVI56E-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 MVI56E-LDM Developer Manual for details.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Connecting to the MVI56E-LDM Module ControlLogix® Platform Quick Start Guide Configuring the MVI56E-LDM’s EtherNet/IP Address Configure the MVI56E-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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® 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 MVI56E-LDM MQTT sample application by modifying the root/psft/sample/mqtt/config.json file on the module.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide Two public MQTT Brokers/Servers and Clients can be found here: 1) test.mosquitto.org: current IP = 5.196.95.208. (Subject to change) 2) mqtt.eclipse.org: current IP = 137.135.83.217. (Subject to change) For this sample configuration, ‘mqtt.eclipse.org’...
To do that, open a browser and enter URL: http://192.168.0.188/log/messages.txt (Replace 192.168.0.188 with the MVI56E-LDM module’s IP address) Figure 7: MVI56E-LDM-MQTT successful communications with the remote MQTT Broker This log file is located in the MVI56-LDM module at this path: “root/www/html/log/messages.txt”...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® 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. Activating an installed unconfigured MQTT Explorer displays the following pop-up. By default, it has 2 pre-configured settings in the Connections panel.
Page 19
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide Click Save, then Connect. MQTT Explorer displays all other published MQTT Clients currently connected to the mqtt.eclipse.org broker. Note that published brokers have connections from many clients, and the client will receive several published messages.
Page 20
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide Observe that the indicated six tags/variables have their values continuously changing every few seconds. Select the S variable as indicated in the TRING following screen capture: Figure 12: Selecting String Type Expand the Publish section in the center panel, and add “/Set”...
Page 21
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide In the MQTT Explorer, enter multiple 1’s in the PSFT/SteamSensor/String/Set field indicated in the following figure: Figure 15: Typing in the desired string values 10 Click on the P button.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide Encrypted Data Exchange Edit the config.json file’s parameter values in the MVI56E-LDM module according to the Values for Encrypted messaging column indicated in the table on page 15 (MQTT Generic config.json File).
Page 23
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide Select the S variable as shown in the following figure: TRING Figure 19: String Type Selected Type Set at the end of the Topic field.
Page 24
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT Generic Type Sample Application ControlLogix® Platform Quick Start Guide 10 In the MQTT Explorer, type multiple 2’s in the field shown in the previous figure. Figure 21: New text written into String type to be published 11 Click the P button.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide MQTT SparkplugB Example Use this chapter to install, configure, and run the MVI56E-LDM module with MQTT Sparkplug-B communications. Set the configuration file parameters, configure the ControlLogix PLC, and begin data exchange.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Figure 24: Sparkplug-B Configuration Configuring the ControlLogix PLC Open the MVI56E_LDM_MQTT_SparkplugB_Sample_Ladder.ACD program and change the appropriate chassis type to match your hardware and firmware. Download MVI56E_LDM_MQTT_SparkplugB_Sample_Ladder.ACD file to the ControlLogix processor by choosing C >...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® 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 lasts two hours. It can be restarted any number of times.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Configuring the Un-Encrypted Sparkplug Data Exchange This section configures Ignition to communicate with the PLC. Sign into the Ignition web GUI http://localhost:8088/web/signin?14. Figure 25: Ignition Sign In The Home screen opens.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 5.4.1 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
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Click on the Users tab and then click on the C MQTT U option. REATE NEW SERS Enter the parameter values as indicated in the following screen capture:...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 5.4.2 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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 5.4.3 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
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Use the same values as entered in Step 2 to substitute the Group ID, Edge Node ID, and Device ID values in the following code: Figure 33: Enter these parameters Click on the S button.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 5.4.4 Verify Ignition to PLC Communication In the Ignition application, navigate to Status > Systems > Tags > MQTT Engine > Edge Nodes > ProSoft > MVI56E-1 > SteamSensor.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Installing the Ignition Designer Software Navigate to the Ignition website and click on the G button. ESIGNER Figure 35: Get Designer Button Once downloaded, run the Designer Launcher Setup application.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 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 MVI56E-LDM_MQTT in un-secured mode.
Page 37
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide Click on the L button to activate the Ignition Designer. AUNCH Figure 38: Designer Login Use the same credentials as when the ignition was initially installed. The Open/Create Project dialog pops up. Click on the I button.
Page 38
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide In the Open dialog, select the “Prosoft_LDM_MQTT_Ignition_Designer_SparkPlug_Demo.zip” file. This file can be downloaded from www.prosoft-technology.com Figure 40: Locate Demo Project Click the O button. Enter the necessary project details, and click on the I button.
Page 39
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide The project is loaded into Ignition Designer. Figure 42: Import the Project 10 Click on the O button. Figure 43: Open button 11 The Ignition Designer opens with the ProSoft Demo project labeled “PLC tags”.
Page 40
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT SparkplugB Example ControlLogix® Platform Quick Start Guide 12 Click on the PLC link. The following window opens: TAGS Figure 45: PLC tags link 13 In the menu bar, select the P option to activate the live...
Quick Start Guide Prerequisites for Customizing the Sample Application MVI56E-LDM-MQTT Zip File Note: The MVI56E-LDM-MQTT zip file contains the generic version as well as SparkplugB. Go to https://www.prosoft-technology.com and navigate to the MVI56E-LDM product page. Download the mqtt-ldm-MVI56-xxx.zip (where xxx is the version number).
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Development Setup ControlLogix® 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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Creating a Build ControlLogix® 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: ./build.ps1 -SHARED_FOLDER //192.168.1.73/Workspace - SHARED_FOLDER_USER bfluser –SHARED_FOLDER_PASSWORD passwd ...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details ControlLogix® 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).
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details ControlLogix® 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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Configuration File Details ControlLogix® Platform Quick Start Guide Configuring Generic MQTT Brokers An example configuration file is located in the mqtt-ldm-sample-app-mvi56e\test- generic folder. 9.2.1 Generic MQTT Broker This is located in the mqtt-ldm-sample-app-mvi56e\test-generic folder. The file config.json contains a default configuration file, which is received during a firmware update.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport ControlLogix® Platform Quick Start Guide 9.2.3 Install MQTT Locally If complete control over the MQTT Broker is needed, or if there is no access to the Internet from the network where the MVI56E-LDM is installed, it is possible to use a local version of MQTT Broker.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library ControlLogix® 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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library ControlLogix® 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);...
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library ControlLogix® 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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport MQTT-LDM Library ControlLogix® Platform Quick Start Guide 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).
11.1 Firmware Contents The sample application installed to the MVI56E-LDM contains files that are included in the MVI56E-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.
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Visual Studio 2017 Project ControlLogix® Platform Quick Start Guide 12 Visual Studio 2017 Project You can use Visual Studio 2017 to build the sample application. Ensure the Prerequisites and Development Environment Setup is completed first.
Page 54
MVI56E-LDM-MQTT ♦ MQ Telemetry Transport Visual Studio 2017 Project ControlLogix® 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: Set the correct IP address. This is your Windows 10 PC’s IP Address.
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: Product Version Number...
Need help?
Do you have a question about the MVI56E-LDM-MQTT and is the answer not in the manual?
Questions and answers