background image

 

 

 

 

MVI69E-LDM-MQTT 

MQ Telemetry Transport 

CompactLogix

®

 Platform 

 

February 10, 2021    

QUICK START GUIDE 

 

Содержание MVI69E-LDM-MQTT

Страница 1: ...MVI69E LDM MQTT MQ Telemetry Transport CompactLogix Platform February 10 2021 QUICK START GUIDE...

Страница 2: ...tions and dimensions may contain technical inaccuracies or typographical errors ProSoft Technology makes no warranty or representation as to its accuracy and assumes no liability for and reserves the...

Страница 3: ...s in Canada and in accordance with the authority having jurisdiction The following warnings must be heeded WARNING EXPLOSION HAZARD SUBSTITUTION OF COMPONENTS MAY IMPAIR SUITABILITY FOR CLASS I DIV 2...

Страница 4: ...ress 13 4 MQTT Generic Type Sample Application 14 4 1 Configuring the Sample Applications 14 4 1 1 MQTT Generic config json File 14 4 1 2 SparkplugB config json File 15 4 2 Unencrypted Data Exchange 1...

Страница 5: ...tatus Print Interval 44 9 1 5 Tags 44 9 2 Configuring Generic MQTT Brokers 45 9 2 1 Generic MQTT Broker 45 9 2 2 Online MQTT Brokers 45 9 2 3 Install MQTT Locally 45 9 3 Running the Sample Application...

Страница 6: ...them to the PLC This is accomplished by running the sample application on the MVI69E LDM while connected to the MQTT broker The MVI69E LDM acts as a Message Queuing Telemetry Transport MQTT client Th...

Страница 7: ...ion com resources video mqtt sparkplug specification Video 4 MQTT Ignition https inductiveautomation com resources video mqtt ignition Video 5 MQTT Distributor Module https inductiveautomation com res...

Страница 8: ...LDM Library root folder build Location where target binaries are created during build docker Toolchain to build source code and Docker configuration files to start container with build environment mq...

Страница 9: ...om and download MQTT Explorer to a Windows 10 PC You do not need to perform this step if implementing SparkplugB Note The MQTT Explorer Windows installer version had issues with storing connection set...

Страница 10: ...LDM in the CompactLogix rack connect the top Ethernet port to your local network and connect to the Windows 10 PC 2 Use the middle Ethernet port to connect to the network where the MQTT broker is runn...

Страница 11: ...D program and change the appropriate CompactLogix chassis type to match your hardware and firmware 2 Download LDM_MQTT ACD file to the CompactLogix processor by choosing COMMUNICATIONS WHO ACTIVE DOWN...

Страница 12: ...that was built in the Creating a Build section in this document 2 Download the firmware file to the module via the module s webpage Refer to the MVI69E LDM Developer Manual for details 3 At the end o...

Страница 13: ...gy Refer to the MVI69E LDM Developer Manual for detailed information about the interfaces file Use an FTP client such as WinSCPTM to edit the eth0 and eth1 sections of the interface file Interfaces fi...

Страница 14: ...nencrypted messaging column indicated in the following table Parameters Values for unencrypted messaging Vales for encrypted messaging MqttServer Type Generic Generic Host 137 135 83 217 137 135 83 21...

Страница 15: ...o 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 is accessed remotely and used as the broker...

Страница 16: ...module s communication on the eclipse site the communication with the remote broker can be verified by reviewing the log messages on the module To do that open a browser and enter the following URL ht...

Страница 17: ...so that the data from the PLC is displayed in the MQTT Explorer 1 Launch MQTT Explorer The MQTT Connection dialog displays with two default connections 2 Select mqtt eclipse org from the list of conn...

Страница 18: ...ues one by one clicking the ADD button after each o 69EPSFT SteamSensor Temperature o 69EPSFT SteamSensor Pressure o 69EPSFT SteamSensor TotalFlow o 69EPSFT SteamSensor TemperatureLimit o 69EPSFT Stea...

Страница 19: ...button 7 Click SAVE and then the CONNECT button MQTT Explorer displays the topics entered in step 5 8 Expand the Publish section in the center panel and add Set to end of the topic name so it will be...

Страница 20: ...number 1 in the field indicated in screen capture below Click on the PUBLISH button In the PLC tag Local 1 I Data 9 0 bit was set to TRUE by the remote client that has enabled the PLC to receive tags...

Страница 21: ...the PSFT SteamSensor String Set field indicated in the following figure 11 Click on the PUBLISH button 12 Go back to the PLC program and observe that the multiple 1 s are displayed in the PLC in the S...

Страница 22: ...UseTls 0 to enable encrypted data exchange 2 Reboot the MVI69E LDM module 3 Edit the MQTT Explorer by activating the Encryption and set Port to 8883 4 Click Save then Connect 5 Observe that all parame...

Страница 23: ...n CompactLogix Platform Quick Start Guide ProSoft Technology Inc Page 23 of 54 6 The Wireshark capture indicates that the data is encrypted This concludes the Generic MQTT setup instructions with unen...

Страница 24: ...t 192 168 4 200 192 168 4 200 Port 1883 8883 Timeout 5000 5000 DoNotUseTls 1 0 DisableCertificateValidation 1 0 RootCaFileName root ca cer root ca cer ClientCertPublicFileName client_cert_public_key c...

Страница 25: ...onfiguring the CompactLogix PLC 1 Open the MVI69E_LDM_MQTT_SparkplugB_Sample_Ladder ACD program and change the appropriate chassis type to match your hardware and firmware 2 Download MVI69E_LDM_MQTT_S...

Страница 26: ...to download and install selecting the default options Ignition v8 1 1 Stable current as of this publication https inductiveautomation com downloads ignition 8 1 1 Follow the Ignition installation prom...

Страница 27: ...w and sign in as required When the Configuration menu options display 1 Select the SYSTEM MODULES option 2 Scroll to the bottom of the page and select the INSTALL OR UPGRADE A MODULE link 3 Select CHO...

Страница 28: ...explains how to configure Ignition to communicate with the PLC 5 4 1 Logging in to Ignition 1 Using the credentials chosen during the Ignition installation process log into the Ignition web GUI http...

Страница 29: ...hin Ignition This section covers the basic configuration for the MQTT Distributor file that behaves as the MQTT broker within the Ignition application 1 Click on the CONFIG MQTT DISTRIBUTOR SETTINGS s...

Страница 30: ...the CREATE NEW MQTT USERS option 3 Enter the parameter values as indicated in the following screen capture 4 Click on the CREATE NEW MQTT USERS button to save the credential values 5 Click on the GENE...

Страница 31: ...This section covers the basic configuration for the MQTT Engine file that behaves as the MQTT subscribing client within the Ignition application 1 Click on the Config MQTT Engine Settings button 2 Ent...

Страница 32: ...ission Within Ignition This section covers the basic configuration for the MQTT Transmission file that behaves as the MQTT Publishing Client within the Ignition application 1 Click on the Config MQTT...

Страница 33: ...ion application navigate to the following location Status Systems Tags MQTT Engine Edge Nodes ProSoft MQTT LDM Gateways MVI69E 1 SteamSensor 2 Verify that LDM MQTT is successfully reading data subscri...

Страница 34: ...application 3 Follow the instructions to complete the installation 5 5 1 Using Ignition Designer to Send Data to the PLC This section covers the configuration of the Ignition Designer tool and sendin...

Страница 35: ...Guide ProSoft Technology Inc Page 35 of 54 3 Click on the LAUNCH button to activate the Ignition Designer 4 Use the same credentials as when the ignition was initially installed 5 The Open Create Proj...

Страница 36: ...T MQ Telemetry Transport MQTT SparkplugB Example CompactLogix Platform Quick Start Guide ProSoft Technology Inc Page 36 of 54 6 Set up a new project as in the following example Figure 35 Setting up th...

Страница 37: ...gy Inc Page 37 of 54 7 Click the CREATE NEW PROJECT button 8 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 i...

Страница 38: ...rt Guide ProSoft Technology Inc Page 38 of 54 9 Select the Publish_Subscribe tag as indicated in the following image 10 Click on the Write Once button This will cause the MVI69E LDM MQTT to prepare th...

Страница 39: ...write multiple 9s as an example as indicated in the following image 12 Click on the Write Once blue button This will cause the MVI69E LDM MQTT to send the string of 9s to the PLC This concludes the MV...

Страница 40: ...Linux Debian 6 Virtual Machine For MQTT this guide steps you through using a Docker container on a Windows 10 PC Docker Desktop for Windows is required to run the toolchain from a container running 3...

Страница 41: ...er of source code files C Workspace needs to be shared in order to access it from the build container In order to access this shared folder from Docker container psft Windows user credentials are requ...

Страница 42: ...command Replace the IP address shown above 192 168 1 73 with the PC s IP address Replace the user ID shown above bfluser with your user ID see Config json Configuration Requirements on page 24 Replac...

Страница 43: ...ayload 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 suppo...

Страница 44: ...he PLC with the settings to map them to MQTT messages Parameter Description Tag Name of the tag in PLC Defined for MVI69E LDM only DataType Data Type of the tag in the PLC Possible values are BOOL SIN...

Страница 45: ...ifying only the HostName field Different installations of MQTT brokers are considered in the next section 9 2 2 Online MQTT Brokers There are couple of MQTT brokers available online mqtt eclipse org t...

Страница 46: ...ft Technology Inc Page 46 of 54 9 3 Running the Sample Application With the configuration complete restart the application To restart the application either reboot the module or connect to the module...

Страница 47: ...s 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 10 1...

Страница 48: ...rns 0 int mqtt_ldm_disconnect void This function disconnects from the MQTT broker int mqtt_ldm_is_connected void Returns a non zero value if a connection to the MQTT broker is established int mqtt_ldm...

Страница 49: ...ritten to the PLC The input argument value is the value to be written to the PLC tag New values are received from MQTT broker by subscribing to specified subscription topics in the configuration file...

Страница 50: ...http 192 168 0 250 log messages txt 0 10 4 Data Flow for Reading Tag Values Refer to Component Diagram on page 47 The orange lines in the diagram illustrate data flow In order to read data from the PL...

Страница 51: ...structure is described in detail in section Configuration File Details starting on page 43 3 C Workspace mqtt ldm sample app mvi69e root_ca cer psft sample mqtt Root CA certificate of the server s SSL...

Страница 52: ...make sure you have first completed the steps in Prerequisites for Customizing the Sample Application and Development Setup 12 1 Visual Studio Build The Visual Studio 2017 solution file is located at...

Страница 53: ...security policies might prevent it from running To run this script open a command prompt as Administrator and enter the following commands Powershell Set ExecutionPolicy ExecutionPolicy RemoteSIgn Sc...

Страница 54: ...sues North America Corporate Location Europe Middle East Africa Regional Office Phone 1 661 716 5100 info prosoft technology com Languages spoken English Spanish REGIONAL TECH SUPPORT support prosoft...

Отзывы: