AutomationDirect
Search
Login | Register
Accounts & Orders
Cart
0
$0.00

Recent Orders

View and Manage | Request Cancellation

Your Account

Account Home

Checkout   $0.00


  • My Orders
  • Product Returns (RMAs)
  • Pay Proforma Invoices
  • Pay Freights
  • Invoices / Invoice Reprint
  • Quotes / Favs / BOMs
  • Packing List Reprint
  • My Product Docs
  • Credit Application
  • Tax Exemption
| Direct Sales in US and Canada | 1-800-633-0405 | About Us | Contact Us | Line Card
Products | Support
| Compare
  
Ordering Tools  
warning Cookies are not enabled on your browser.
Cookies are required for our site. Please enable cookies in your browser preferences to continue.
+
Navigation
+
Shopping Categories
  • Barcode / RFID / Vision
  • Bulk Wire & Cable
  • Cables (Terminated)
  • Circuit Protection / Fuses / Disconnects
  • Communications
  • Drives & Soft Starters
  • Enclosure Thermal Management & Lights
  • Enclosures & Racks
  • Field I/O
  • HMI (Human Machine Interface)
  • Hydraulic Components
  • Motion Control
  • Motor Controls
  • Motors
  • Pneumatic Components
  • Power Products (Electrical)
  • Power Transmission (Mechanical)
  • Process Control & Measurement
  • Programmable Controllers
  • Pushbuttons / Switches / Indicators
  • Relays / Timers
  • Safety
  • Sensors / Encoders
  • Stacklights
  • Structural Frames / Rails
  • Tools & Test Equipment
  • Valves
  • Water (Potable) Components
  • Wiring Solutions
  • Retired Products
+
Learn More
  • Brand Line Card
  • What's New
  • E-newsletter
  • Online PDF Catalog
  • Video Tutorials
  • Company Reviews
  • Learning Library
  • Affordable Training
  • Free Online PLC training
  • Cybersecurity
+
In Depth Product Sites
  • Programmable Logic Controllers
  • Productivity1000 PLCs
  • Productivity2000 PLCs
  • Productivity3000 PLCs
  • ProductivityCODESYS
  • LS Electric XGB Series PLCs
  • ProductivityOpen
  • CLICK PLCs
  • Do-more H2 PLCs or
    Do-more T1H Series
  • Do-more BRX PLCs
  • C-more Touch Panels
  • AC & DC Drives
  • Motion Control Components
  • Servos
  • StrideLinx
  • Pneumatics
+
Product Selectors &
Configuration Utilities
  • PLC Family Selector
  • P1000 PLC Systems
  • P2000 PLC Systems
  • P3000 PLC Systems
  • ProductivityCODESYS
  • CLICK PLC Systems
  • Do-more® BRX PLC Systems
  • LS-Electric® XGB PLC Systems
  • Productivity®Open Systems
  • AC Motors
  • Datalogic® Safety Light Curtains
  • LS-Electric® Servo Systems
  • Nitra® Pneumatic Grippers
  • Object Detection (Sensors)
  • PAL Controller Configurator
  • Precision Gearbox Selector
  • Protos X® Field I/O
  • Quadritalia® Modular Enclosures
  • Stellar® Soft Starters
  • Stepper System Selector
  • SureFrame T-slot Extrusion
  • SureMotion® XYZ Gantry
  • SureServo2® System Selector
  • SureStep® Linear Actuators
  • Timing Belts & Pulleys
  • Werma® Stacklights
  • ZIPLinks

Productivity Series PLCs MQTT Setup (IIoT) from AutomationDirect


Related Products

P2-08SIM
P2-08SIM Thumbnail
P3-530
P3-530 Thumbnail
P3-RX
P3-RX Thumbnail
P3-EX
P3-EX Thumbnail
P3-03B
P3-03B Thumbnail
P3-05B
P3-05B Thumbnail
P3-08B
P3-08B Thumbnail
P3-11B
P3-11B Thumbnail
P3-01AC
P3-01AC Thumbnail
P3-01DC
P3-01DC Thumbnail
P3-08ND3S
P3-08ND3S Thumbnail
P3-16ND3
P3-16ND3 Thumbnail
P3-32ND3
P3-32ND3 Thumbnail
P3-64ND3
P3-64ND3 Thumbnail
P3-08TD1S
P3-08TD1S Thumbnail
P3-08TD2S
P3-08TD2S Thumbnail
P3-16TD1
P3-16TD1 Thumbnail
P3-16TD2
P3-16TD2 Thumbnail
P3-32TD1
P3-32TD1 Thumbnail
P3-32TD2
P3-32TD2 Thumbnail
P3-64TD1
P3-64TD1 Thumbnail
P3-64TD2
P3-64TD2 Thumbnail
P3-08NAS
P3-08NAS Thumbnail
P3-16NA
P3-16NA Thumbnail
P3-08TAS
P3-08TAS Thumbnail
P3-16TA
P3-16TA Thumbnail
P3-08TRS
P3-08TRS Thumbnail
P3-08TRS-1
P3-08TRS-1 Thumbnail
P3-16TR
P3-16TR Thumbnail
P3-04ADS
P3-04ADS Thumbnail
P3-08AD
P3-08AD Thumbnail
P3-16AD-1
P3-16AD-1 Thumbnail
P3-16AD-2
P3-16AD-2 Thumbnail
P3-08RTD
P3-08RTD Thumbnail
P3-08THM
P3-08THM Thumbnail
P3-04DA
P3-04DA Thumbnail
P3-08DA-1
P3-08DA-1 Thumbnail
P3-08DA-2
P3-08DA-2 Thumbnail
P3-16DA-1
P3-16DA-1 Thumbnail
P3-16DA-2
P3-16DA-2 Thumbnail
P3-8AD4DA-1
P3-8AD4DA-1 Thumbnail
P3-8AD4DA-2
P3-8AD4DA-2 Thumbnail
P3-SCM
P3-SCM Thumbnail
P3-HSI
P3-HSI Thumbnail
P3-HSO
P3-HSO Thumbnail
P3-16SIM
P3-16SIM Thumbnail
PS-PGMSW
PS-PGMSW Thumbnail
P1-540
P1-540 Thumbnail
P1-550
P1-550 Thumbnail
P2-550
P2-550 Thumbnail
P3-550E
P3-550E Thumbnail
P1-START
P1-START Thumbnail
MICSD-16G
MICSD-16G Thumbnail
P1-01AC
P1-01AC Thumbnail
P1-08ND3
P1-08ND3 Thumbnail
P1-08TD1
P1-08TD1 Thumbnail
P1-08TD2
P1-08TD2 Thumbnail
P1-15CDD1
P1-15CDD1 Thumbnail
P1-15CDD2
P1-15CDD2 Thumbnail
P1-16CDR
P1-16CDR Thumbnail
P1-08TRS
P1-08TRS Thumbnail
P1-16TR
P1-16TR Thumbnail
P1-04ADL-1
P1-04ADL-1 Thumbnail
P1-04ADL-2
P1-04ADL-2 Thumbnail
P1-04DAL-1
P1-04DAL-1 Thumbnail
P1-04DAL-2
P1-04DAL-2 Thumbnail
P1-04THM
P1-04THM Thumbnail
P1-04NTC
P1-04NTC Thumbnail
P1-08SIM
P1-08SIM Thumbnail
P2-RS
P2-RS Thumbnail
P2-04B
P2-04B Thumbnail
P2-07B
P2-07B Thumbnail
P2-11B
P2-11B Thumbnail
P2-15B
P2-15B Thumbnail
P2-01AC
P2-01AC Thumbnail
P2-01DCAC
P2-01DCAC Thumbnail
P2-08ND3-1
P2-08ND3-1 Thumbnail
P2-08NE3
P2-08NE3 Thumbnail
P2-16ND3-1
P2-16ND3-1 Thumbnail
P2-16NE3
P2-16NE3 Thumbnail
P2-32ND3-1
P2-32ND3-1 Thumbnail
P2-32NE3
P2-32NE3 Thumbnail
P2-08TD1S
P2-08TD1S Thumbnail
P2-08TD2S
P2-08TD2S Thumbnail
P2-08TD1P
P2-08TD1P Thumbnail
P2-08TD2P
P2-08TD2P Thumbnail
P2-15TD1
P2-15TD1 Thumbnail
P2-15TD2
P2-15TD2 Thumbnail
P2-16TD1P
P2-16TD1P Thumbnail
P2-16TD2P
P2-16TD2P Thumbnail
P2-32TD1P
P2-32TD1P Thumbnail
P2-32TD2P
P2-32TD2P Thumbnail
P2-08NAS
P2-08NAS Thumbnail
P2-16NA
P2-16NA Thumbnail
P2-08TAS
P2-08TAS Thumbnail
P2-16TA
P2-16TA Thumbnail
P2-08TRS
P2-08TRS Thumbnail
P2-16TR
P2-16TR Thumbnail
P2-04AD
P2-04AD Thumbnail
P2-08AD-1
P2-08AD-1 Thumbnail
P2-08AD-2
P2-08AD-2 Thumbnail
P2-08ADL-1
P2-08ADL-1 Thumbnail
P2-08ADL-2
P2-08ADL-2 Thumbnail
P2-16AD-1
P2-16AD-1 Thumbnail
P2-16AD-2
P2-16AD-2 Thumbnail
P2-16ADL-1
P2-16ADL-1 Thumbnail
P2-16ADL-2
P2-16ADL-2 Thumbnail
P2-04DA
P2-04DA Thumbnail
P2-04DAL-1
P2-04DAL-1 Thumbnail
P2-04DAL-2
P2-04DAL-2 Thumbnail
P2-08DA-1
P2-08DA-1 Thumbnail
P2-08DA-2
P2-08DA-2 Thumbnail
P2-16DA-1
P2-16DA-1 Thumbnail
P2-16DA-2
P2-16DA-2 Thumbnail
P2-08DAL-1
P2-08DAL-1 Thumbnail
P2-08DAL-2
P2-08DAL-2 Thumbnail
P2-16DAL-1
P2-16DAL-1 Thumbnail
P2-16DAL-2
P2-16DAL-2 Thumbnail
P2-8AD4DA-1
P2-8AD4DA-1 Thumbnail
P2-8AD4DA-2
P2-8AD4DA-2 Thumbnail
P2-08THM
P2-08THM Thumbnail
P2-06RTD
P2-06RTD Thumbnail
P2-08NTC
P2-08NTC Thumbnail
P2-SCM
P2-SCM Thumbnail
P2-HSI
P2-HSI Thumbnail
P2-HSO
P2-HSO Thumbnail


To learn more: https://www.AutomationDirect.com/productivity?utm_source=N8u7nvZo4U8&utm_medium=VideoTeamDescription

(VID-P1-0009)

The Productivity PLC has now added MQTT to the Productivity Family of PLCs. This feature really helps integrate the Productivity PLC into the the industrial internet of things (IIoT). This video details setting up a Productivity PLC as a MQTT client.

Online Support Page: https://community.automationdirect.com/s/?utm_source=N8u7nvZo4U8&utm_medium=VideoTeamDescription

**Please check our website for our most up-to-date product pricing and availability.


Hide Transcript
View Transcript

MQTT is an extremely simple and lightweight messaging protocol and is a great way to pass data between multiple platforms without a lot of protocol confusion and very little development time. Messaging in MQTT is based upon Topics. These topics can either be Subscribed or Published to from a central repository. This central repository of topics is called a Broker. The devices Subscribing or Publishing to this broker are called Clients. Each client can publish or subscribe to one or more of the topics on the Broker. To setup MQTT on your Productivity PLC, you must have version 3.11 software or above. The Productivity can only work as a client. You must have already setup a Broker to handle the messaging. There are too many brokers and their setups is way too varied to cover in this video. Please see MQTT.org for more information on this topic. I am using a Raspberry PI 4 with Mosquito loaded. There is a really good tutorial on this setup, and you can find a link to that in the description below. Productivity has made using MQTT very simple. It does not require any instructions in the ladder code. To setup MQTT on Productivity, this is done under the Hardware Configuration. Then Select the MQTT tab. Drag the this Client into the active window. Here you can create a structure that will include tags to handle these entries. These tags will give you status info on the connection between your broker and the client and this bit will need to go high to enable the MQTT communication. Give the device a -name. Here you can use a static IP address of your Broker or use a Server name. If you are using a server name you will have had to setup the DNS server on the CPU Hardware configuration. Now, for my setup, I am on an isolated network so I am going to use a static IP address. The standard Server port for MQTT is 1883, consult your broker information, to ensure that this number is correct for you. Once you have established a connection to a broker, the CPU will send periodic PINGs, at this rate specified by the Keep Alive Time, to ensure the broker is still available. If your broker requires Authentication enter that here. This option will allow the broker to purge information from any previous session. Select this option to enable the broker to send a message to other MQTT clients if the CPU loses connection with the broker function. Enabling this option requires the following fields to be completed. This allows you to select the Last Will Quality of Service. Selecting 0 is the fastest method but also the most unreliable because the CPU does not wait for the message to be acknowledged by the broker. Selecting 1 causes the CPU to send a message and then wait for an acknowledgment. This guarantees that the message will be delivered at least once. Select this option if the broker should retain the Last Will and Testament. This is where the Last will topic will be sent, and this is the message to send. For this example, I will forgo the last will setup. Here is where you can add your subscribes and publish. Each broker target can support up to 3 Publishers and 1 Subscriber and each Publish and Subscribe can support up to 10 different Broker Topics. I will setup 1 subscribe and 1 Publish for an example. This bit will enable you to subscribe, and this tag is part of the structure we created above, and these tags will give us communication status of the subscribe. Here you enter in the Broker topic to read from. When I set up my broker it created a Test Topic that I will enter here. Payload will be the string tag that will store the message read from this topic. Received must be an integer tag. Indicating how many messages have been received for the corresponding topic. On to publish. Like before these tags will be part of the structure that we create from above. This enables the publish. This is the rate at which it will publish the message, and these are your status flags for the publish. I will use the same test topic that was in my subscribe. This will be string tag that contains the info that is sent to the topic when this is enabled. If you select this option, it will cause the broker to retain the payload in the topic when it is sent. That completes the client setup, so when I select ok, All the tags entered in this window will now be created. By default, the strings we be 15 characters. I will change this 128 just in case I need to send something larger. To test this setup, I will go back into the MQTT hardware configuration and select this monitor button. This will add a data view tab, that was all the relevant tags for this setup. Now send this to the PLC. Now, I will go into Data View. First, I will enable the Client by turning on this bit and here we see that we are connected. Now, I will write in a message to publish to this topic. Then I will enable the publish, which writes this message directly into the test topic. Now I will enable the subscribe and here we see that we read this message back. I will go ahead and edit this message a couple more time so, you see how this works. Quick and easy little setup for MQTT. Now you can pass information between multiple platforms very easy. If you have any question on this video, please feel free to comment below or call into our tech support department. Please follow this link to see more videos on the Productivity PLC and select here to subscribe to our YouTube channel for upcoming products and solutions.



No data returned!
An error has occurred! Please contact support
Videos Home > Productivity Series PLCs MQTT Setup (IIoT) from AutomationDirect
Contact, Connect & More
Sign Up
to receive:
FREE e-Newsletter
sign up today!
Connect With Us
Social Media Channels:
linkedin    facebook    x    instagram    youtube
Company Information
About Us
Brand Line Card
System Integrator Program
International Sales
Panel Builder Program
Site Help
Company Reviews
Download Price List
Contact Us
Contact Options
1-800-633-0405
Monday - Friday
9 a.m. - 6 p.m. ET
excluding holidays
Career Opportunities
Voted #1 mid-sized employer in Atlanta
We're a great place to work!
Check out our job openings

Need Training?
Affordable Training by Interconnecting Automation
Free Online PLC Training
FREE Video Tutorials
Information & News
What's New / In The News
FREE e-Newsletter
Automation Notebook
Product Literature
White Papers
News, Product and Training Bulletins
E-Books
Shop with confidence
Checked   Safe & Secure
payment methods


We accept VISA, MasterCard, Discover, American Express, PayPal or company purchase orders.
AutomationDirect

BBB Accredited

Voted #1 mid-sized employer in Atlanta
Check out our job openings

Copyright © 1999-2025 AutomationDirect.  ALL RIGHTS RESERVED.
Site Map     Send Us your Feedback     Unsubscribe     Email Preferences     Legal & Business Policies     YouTube Terms of Service
Clear login credentials



Back to Top


spinner Updating...
Info
„