JWARD Posted September 26 Report Share Posted September 26 I'm just learning PLC programming and need to implement MQTT so I figured I's start with the simple MQTT example provided by Unitronics. My setup is a Mosquitto Broker running on Ubuntu, a US5-B10-RA28 plc and I'm programing with the latest version of Unilogic. I have tested to ensure the Broker is working both from the Ubuntu machine and from a windows machine using MQTT Explorer. I then open the simple example, modify the Broker connection and IP address of my broker and download it to the PLC. I click the connect button, but nothing seems to happen, I change the Publish ID and click the publish button, but no data is received by the broker. I have tested using the URL or IP address of the broker but neither worked. I guess my question would be, what is the least amount of configuration required to publish to a broker, I know I need to configure the broker, configure at least 1 publication, and configure the IP connection of the PLC, where I'm stuck is on the ladder. would someone be able to provide a very simply explication of the minimum ladder needed to send data to the broker. Thanks in advance!! Joe Link to comment Share on other sites More sharing options...
pascal Posted September 26 Report Share Posted September 26 1st. to check if your broker is working, use postman -> a free tool to check rest api's and mqtt 2. check your broker connection in mqtt protocol settings in unilogic -> below an example of my broker connection - first setup your broker without user and password to test it 3. make a subscription like following example, use raw data as format, after you can implement json.... 4. make a ladder rung to subscribe to all topics like this Link to comment Share on other sites More sharing options...
JWARD Posted September 26 Author Report Share Posted September 26 viewing you example I was noticed my topic was using the wrong syntax, I was using \ instead of / Thanks for the quick response. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now