cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Kepware and Raspberry pi4

vcavic
13-Aquamarine

Kepware and Raspberry pi4

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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

geva
14-Alexandrite
(To:vcavic)

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.

slangley
23-Emerald II
(To:vcavic)

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

Top Tags