Please let me start by saying I am new to the MQTT / NodeRed world. I like it a lot but, I am still building my knowledge and experience with it.
Is it still advisable to set up a MQTT broker (mosquitto) in a container on the PFC200?
I watched the full Webinar from 2020 about setting up NodeRed on a PFC200 (Webinar: Using Node-RED for IIoT Applications with WAGO Controllers and Docker).
In their example, they were able to download a Docker Container image with the Mosquitto broker and install it on the PFC200.
Looking for that same container to download now, all I can find is information about building it locally. - pfc-howtos/HowTo_AddMosquittoBroker at master · WAGO/pfc-howtos · GitHub
Should I not be trying to have my PFC200 act like a MQTT broker?
A little more information about what I am trying to do:
I have a Windows PC I need to get DDE data from. I have set up NodeRed on my PFC200 (750-8212) and am able start a DDE conversation and get the data / send the commands that I need.
Now that my data is in NodeRed, how can I get it to my CODESYS application? MQTT seemed like the right tool for this, but truthfully I do not know.
So my question about setting up a MQTT broker still stands, but additionally I am wondering if what I am doing makes sense? Is there a more logical or simple way to pass this data into my CODESYS application?
the easiest one are Network Variables ( node-red-contrib-nvl (node) - Node-RED) or modbus in NodeRED. MQTT is okey, but needs some effort in Codesys side.
Network Variables are easy to setup in codesys (just add list of variables) and in NodeRED.
Modbus - you have to setup modbus server/client and parse data.
MQTT - you need to setup broker and communication, parsers in both sides.
I prefer to run everything in Docker cointainers, because its easier to maintain. New version? no problem, just pull and restart. Lately I’ve been using portainer on the server and portainer-clients on the controllers in my projects. This allows me to manage and monitor containers from one place. Alse you can use easy-to-setup templates and built-in docker-composer.
1 Like