Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt for plc

Qt for plc

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt creatorsiemenswpf
13 Posts 5 Posters 12.3k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 26 Apr 2017, 22:10 last edited by
    #2

    Hi and welcome to devnet,

    How are you communicating currently with your PLC ?

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

    M 1 Reply Last reply 27 Apr 2017, 15:59
    1
    • S SGaist
      26 Apr 2017, 22:10

      Hi and welcome to devnet,

      How are you communicating currently with your PLC ?

      M Offline
      M Offline
      markolino
      wrote on 27 Apr 2017, 15:59 last edited by
      #3

      @SGaist
      Hi thanks for the answer. Usually I communicate with my plc with a Windows form app using s7.net librery. All by profinet connection

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VRonin
        wrote on 27 Apr 2017, 16:28 last edited by
        #4

        S7 offers a C API (https://cache.industry.siemens.com/dl/files/203/13649203/att_38732/v1/mn_s7api_e.pdf) you can use that to communicate with the PLC

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        4
        • K Offline
          K Offline
          kahlenberg
          wrote on 28 Apr 2017, 08:48 last edited by
          #5

          Hi,
          I am exactly doing what you wanto to do. Qt doesn't have any possibility for the communication to PLC, by nature. However I communicate with PLC using SNAP7 library. This library is only for Siemens S7 PLCs, and it is really great and you can find pre-compilerd binaries as well, if you don't want to compile yourself. I downloaded and compiled source code and am using this library for reading and writing variables in PLC. You can easily integrate it in your Qt application.
          SNAP7 source: http://snap7.sourceforge.net/

          Z 2 Replies Last reply 12 Oct 2018, 02:26
          3
          • K kahlenberg
            28 Apr 2017, 08:48

            Hi,
            I am exactly doing what you wanto to do. Qt doesn't have any possibility for the communication to PLC, by nature. However I communicate with PLC using SNAP7 library. This library is only for Siemens S7 PLCs, and it is really great and you can find pre-compilerd binaries as well, if you don't want to compile yourself. I downloaded and compiled source code and am using this library for reading and writing variables in PLC. You can easily integrate it in your Qt application.
            SNAP7 source: http://snap7.sourceforge.net/

            Z Offline
            Z Offline
            Zelas91
            wrote on 12 Oct 2018, 02:26 last edited by
            #6
            This post is deleted!
            1 Reply Last reply
            0
            • K kahlenberg
              28 Apr 2017, 08:48

              Hi,
              I am exactly doing what you wanto to do. Qt doesn't have any possibility for the communication to PLC, by nature. However I communicate with PLC using SNAP7 library. This library is only for Siemens S7 PLCs, and it is really great and you can find pre-compilerd binaries as well, if you don't want to compile yourself. I downloaded and compiled source code and am using this library for reading and writing variables in PLC. You can easily integrate it in your Qt application.
              SNAP7 source: http://snap7.sourceforge.net/

              Z Offline
              Z Offline
              Zelas91
              wrote on 12 Oct 2018, 03:26 last edited by
              #7

              @kahlenberg said in Qt for plc:

              Hi,
              I am exactly doing what you wanto to do. Qt doesn't have any possibility for the communication to PLC, by nature. However I communicate with PLC using SNAP7 library. This library is only for Siemens S7 PLCs, and it is really great and you can find pre-compilerd binaries as well, if you don't want to compile yourself. I downloaded and compiled source code and am using this library for reading and writing variables in PLC. You can easily integrate it in your Qt application.
              SNAP7 source: http://snap7.sourceforge.net/

              How did you do it for qtcreator?

              1 Reply Last reply
              0
              • V Offline
                V Offline
                VRonin
                wrote on 12 Oct 2018, 07:09 last edited by
                #8

                http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                http://doc.qt.io/qt-5/third-party-libraries.html

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                Z 1 Reply Last reply 12 Oct 2018, 07:33
                3
                • V VRonin
                  12 Oct 2018, 07:09

                  http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                  http://doc.qt.io/qt-5/third-party-libraries.html

                  Z Offline
                  Z Offline
                  Zelas91
                  wrote on 12 Oct 2018, 07:33 last edited by
                  #9

                  @VRonin said in Qt for plc:

                  http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                  http://doc.qt.io/qt-5/third-party-libraries.html

                  this is understandable, but I asked about the compilation of the library, since my compiled library does not work

                  V 1 Reply Last reply 12 Oct 2018, 07:41
                  0
                  • Z Zelas91
                    12 Oct 2018, 07:33

                    @VRonin said in Qt for plc:

                    http://doc.qt.io/qtcreator/creator-project-qmake-libraries.html
                    http://doc.qt.io/qt-5/third-party-libraries.html

                    this is understandable, but I asked about the compilation of the library, since my compiled library does not work

                    V Offline
                    V Offline
                    VRonin
                    wrote on 12 Oct 2018, 07:41 last edited by
                    #10

                    @Zelas91 said in Qt for plc:

                    but I asked about the compilation of the library

                    Then this is the wrong place to ask. Try asking on the project page, they should have instructions on how to build

                    since my compiled library does not work

                    How does not work? it probably is due to incompatible compilers.

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    Z 1 Reply Last reply 12 Oct 2018, 08:38
                    1
                    • V VRonin
                      12 Oct 2018, 07:41

                      @Zelas91 said in Qt for plc:

                      but I asked about the compilation of the library

                      Then this is the wrong place to ask. Try asking on the project page, they should have instructions on how to build

                      since my compiled library does not work

                      How does not work? it probably is due to incompatible compilers.

                      Z Offline
                      Z Offline
                      Zelas91
                      wrote on 12 Oct 2018, 08:38 last edited by
                      #11

                      @VRonin
                      did everything according to the instructions for the library but when compiling it turns out 3 files * .def, * .lib, * .dll

                      1 Reply Last reply
                      0
                      • V Offline
                        V Offline
                        VRonin
                        wrote on 12 Oct 2018, 08:53 last edited by VRonin 10 Dec 2018, 09:15
                        #12

                        That's correct, the .dll is the compiled binary, the .lib is the library your linker will need (the LIBS += part of the links above)

                        The .def should not be necessary, it's a module definition file that only works with Microsoft compilers (as far as I'm aware) and is an alternative to the _declspec( dllimport )/__declspec( dllexport ) directives.

                        You'll also need the .h files (or those in the includes folder) from the sources (this is the INCLUDEPATH += part of the links above)

                        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                        ~Napoleon Bonaparte

                        On a crusade to banish setIndexWidget() from the holy land of Qt

                        Z 1 Reply Last reply 12 Oct 2018, 18:51
                        6
                        • V VRonin
                          12 Oct 2018, 08:53

                          That's correct, the .dll is the compiled binary, the .lib is the library your linker will need (the LIBS += part of the links above)

                          The .def should not be necessary, it's a module definition file that only works with Microsoft compilers (as far as I'm aware) and is an alternative to the _declspec( dllimport )/__declspec( dllexport ) directives.

                          You'll also need the .h files (or those in the includes folder) from the sources (this is the INCLUDEPATH += part of the links above)

                          Z Offline
                          Z Offline
                          Zelas91
                          wrote on 12 Oct 2018, 18:51 last edited by
                          #13

                          @VRonin
                          Thanks, I will try

                          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