Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt gui C++ to read other controllers memory location through ethernet tcp/ip address

Qt gui C++ to read other controllers memory location through ethernet tcp/ip address

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
interfacetcpsocketdata transfer
7 Posts 5 Posters 3.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Prasad320
    wrote on 8 Oct 2017, 11:12 last edited by
    #1

    Hi everyone,
    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Oct 2017, 17:57 last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Prasad320
        wrote on 10 Oct 2017, 05:26 last edited by
        #3

        Hi,
        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

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 10 Oct 2017, 10:20 last edited by
          #4

          Hi @Prasad320,

          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?

          Qt has to stay free or it will die.

          B 1 Reply Last reply 6 Jul 2021, 22:39
          1
          • P Offline
            P Offline
            Prasad320
            wrote on 14 Oct 2017, 05:03 last edited by
            #5

            Hi @aha_1980
            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.

            1 Reply Last reply
            0
            • A aha_1980
              10 Oct 2017, 10:20

              Hi @Prasad320,

              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?

              B Offline
              B Offline
              Belkacem
              wrote on 6 Jul 2021, 22:39 last edited by
              #6

              @aha_1980
              Hi,
              Can you give more information on how to establish a communication between the PC and the PLC.
              PS: I want to have the inputs and the outputs state on GUI, also if possible control the Controller.(means turn on and off the connections).
              thanks.

              J 1 Reply Last reply 7 Jul 2021, 02:10
              0
              • B Belkacem
                6 Jul 2021, 22:39

                @aha_1980
                Hi,
                Can you give more information on how to establish a communication between the PC and the PLC.
                PS: I want to have the inputs and the outputs state on GUI, also if possible control the Controller.(means turn on and off the connections).
                thanks.

                J Offline
                J Offline
                JKSH
                Moderators
                wrote on 7 Jul 2021, 02:10 last edited by
                #7

                @Belkacem said in Qt gui C++ to read other controllers memory location through ethernet tcp/ip address:

                Can you give more information on how to establish a communication between the PC and the PLC.

                Hi, and welcome!

                First, you must tell us what communication protocols are supported by your PLC.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved