-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect with mosquitto (CPU313C and CP343-1 Lean) #8
Comments
Hi, I unfortunately do not have much of an answer for you, sorry. I saw a while ago there has been later development on MQTT client libraries for Siemens. That said, just after I started this @CarstenMaul did a lot of refactoring and changes. |
Hi GerritMeu, Was curious if it had still worked out. We have several s7-300 and s7-400 and would like to connect them to MQTT as well. I just can't manage to get RoanBrand's example into step7 v5.6. Can you help me with this? Greetings and thanks in advance. |
Hi Jansen1443, It worked, but because I had a lack of trust that it complies with the MQTT v3.1.1 specification, I use Node-RED now. Also for the Sparkplug B implementation. I had help @ the Siemens forum to get it going: https://support.industry.siemens.com/forum/ww/en/posts/mqtt-protocol-with-cpu314c-2dp-and-cpu315-2dp/289286/?page=0&pageSize=10 I added my project wherein it worked, you can see the result also in the forum that I shared. In the project, I also added a VAT table wherein you can connect, disconnect etc. Good luck! |
Hi, I'm using the hardware that has been used in the test of the maker.
Unfortunately, it does not connect. What can I do possibly wrong?
The IP-Address of the internal adapter has to be configured within the hardware configuration tool (HW Config), click on the PN-IO object
IP address is 192.168.0.1 of the CP module with subnet 255.255.255.0
The connection must be configured in Simatic Manager "Connections"
Has been made, see attachment
you must set the MQTT Functionblock parameter connectionID to the connection ID configured in Simatic Manager "Connections"
What is the connection ID? I used now the backplane connection, see attachment
you must set the MQTT Functionblock parameter cpLADDR to the address of the CP module. Example for a MQTT FB call in OB1 configured for external Ethernet (CP)usage: MQTT.DB71(net_config := DB_NET_CONFIG, connectionID := 1, cpLADDR := W#16#100);
I compiled the example and changed connectionID to 3 (because it is the backplane connection MPI address, is that correct?). I kept cpLADDR the same, because start address is 256 and that 16#100
Did I do something wrong?
The text was updated successfully, but these errors were encountered: