Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hallo,
is it possible to connect Raspberry Pi 4 to Kepware Server and read data in Thingworx? I have already connected vie Microserver. I just ask it is possible that another way
Thnx
BR
Vladimir
Solved! Go to Solution.
Hi Vladimir,
Yes, this is possible. Many protocol interfaces are possible when building custom code on Raspberry Pi micro computers. If you're familiar with Python, a library called PyModbus can be used to create a Modbus Server interface, at which point you can read data via Kepware's Modbus Ethernet driver. Here is a tutorial I found on the web (can't comment on quality, but hopefully it is helpful to get you started):
Setup of Modbus TCP on Raspberry Pi (wixsite.com)
Otherwise, in your custom code on the RPI, you coudl:
- obtain an MQTT library and publish JSON to an MQTT broker, consuming the data with Kepware MQTT Client driver
- build a simple HTTP server or client interface and pass the data to Kepware's Universal Device Driver
- build a simple TCP interface and pass custom payloads over TCP to either Universal Device Driver or UCON
I've heard of others using Siemens Industrial Ethernet libraries on RPI and a few other "fieldbus" protocols, but I'd suggest starting with simple protocols like those I've mentioned above.
Please feel free to reach out to the Kepware Apps Engineering team for more help: presales.support@kepware.com
Thanks!
Sam
Hi Vladimir,
Yes, this is possible. Many protocol interfaces are possible when building custom code on Raspberry Pi micro computers. If you're familiar with Python, a library called PyModbus can be used to create a Modbus Server interface, at which point you can read data via Kepware's Modbus Ethernet driver. Here is a tutorial I found on the web (can't comment on quality, but hopefully it is helpful to get you started):
Setup of Modbus TCP on Raspberry Pi (wixsite.com)
Otherwise, in your custom code on the RPI, you coudl:
- obtain an MQTT library and publish JSON to an MQTT broker, consuming the data with Kepware MQTT Client driver
- build a simple HTTP server or client interface and pass the data to Kepware's Universal Device Driver
- build a simple TCP interface and pass custom payloads over TCP to either Universal Device Driver or UCON
I've heard of others using Siemens Industrial Ethernet libraries on RPI and a few other "fieldbus" protocols, but I'd suggest starting with simple protocols like those I've mentioned above.
Please feel free to reach out to the Kepware Apps Engineering team for more help: presales.support@kepware.com
Thanks!
Sam
Adding to Sam's ideas - you can also look for and run a soft PLC on the RPi 4 which itself would expose a certain number of TCP industrial protocols. I've worked with CoDeSys before, but if I recall correctly there are full open source ones that you could use for dev/test/demos.
Hi @vcavic
If you feel your question was answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon