How to exchange data between kepserverex and React?

358 Views Asked by At

I have a connection between kepserverex with tia portal v15 where I have PlC connected, the connection works correctly and I have the service running on my computer on port 102, the variables are registered in the kepserverex to the siemens PLC. I would just like to know how to use these variables to be able to read them in a React application where if there is a change of state in a variable in the PLC I can make a hook in the React application.

The same if there is a similar way with some other program or tutorial to make communication between PLC from a portal to a React application, they can say it. Thanks for your time.

2

There are 2 best solutions below

0
On

I would suggest not using kepserverex. I would use node-red to create an rest API for the data you need.

Read Write Data on Siemens PLC using Node-RED (S7)

https://www.youtube.com/watch?v=rTUs-_EiZ3A

If you could give more details on what your data looks like I can help more!

0
On

u should use an opc client. Basicly there are 2 client method;

  • Opc Da
  • Opc Ua

Support for opcda has ended. community recommends using opcua. As i know u cant to use opc ua protokol directly with react u should search. But if u use nodejs u can use https://github.com/node-opcua/node-opcua