Qt gui C++ to read other controllers memory location through ethernet tcp/ip address
Pl anyone can guide me to read other controller(Siemens 1214 PLC) data in QT GUI.
This controller has ethernet port with IP address 192.168.0.55.
I want read this controllers some memory locations. Memory locations are boolean, real, int, dint etc. How can i read & write controller memory by using qt GUI. How can i show it on GUI.
Is there any tutorial video available? pl share..
If you can share code with comments then it will be also better to me.
I am working in automation field so i am not master in c++. My base is electronics but i started to work in qt & i can design small applications. pl help me.
Hi and welcome to devnet,
Your description is a bit too vague. What protocol is used to talk with your controller ? A quick check shows it might be modbus, in that case the QtSerialBus module might get you started with communicating with the device.
I using standerd Ethernet TCP/IP protocol for communication. Not modbus
Controller has TCP/IP with address 192.168.0.55 & subnet mask 255.255.255.0
What you want to do is to write a client (your Qt program) that communicates with a server (the PLC). Therefore your need a protocol, something that both sides use to communicate. As @SGaist already pointed out, ModBus is a common protocol for communication with a PLC. TCP/IP is no protocol, it's a common term for a collection of protocols.
You can us any protocol your PLC already provides. Or you can invent your own protocol, then you will have to write server and client side on your own.
In any case, from the client side you will need one class that does the communication and one class that displays the data. There are helpers for both in Qt, but to point you in the correct direction we will need some more information.
How do you want to display the data? Is a table enough? Or do you want to create a formular?
Its profinet communication(if still any doubt about PLC then please check details on internet for siemens s7-1214(1200) profinet/ethernet port). How can i define PLC's ip address in qt c++. To read any one PLC memory location, what should i write in qt C++. Also to write PLC location. I trying to read only 5 or 6 real(32bit) locations from PLC.