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. Control multiple machines with one gui
Qt 6.11 is out! See what's new in the release blog

Control multiple machines with one gui

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 2.7k Views 3 Watching
  • 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #4

    But how do you connect or talk to machine?

    1 Reply Last reply
    0
    • javcursorJ Offline
      javcursorJ Offline
      javcursor
      wrote on last edited by
      #5

      We send the command to other "pc" that interact with machines using MODBUS-TCP. The commands of buttons have the same function but they have to act over different devices. For example I have eight move buttons, all of them have the same function (send the command move) but each one send the command to a different device.

      PD: sorry if my english is not good but it is not my maternal language

      mrjjM 1 Reply Last reply
      0
      • javcursorJ javcursor

        We send the command to other "pc" that interact with machines using MODBUS-TCP. The commands of buttons have the same function but they have to act over different devices. For example I have eight move buttons, all of them have the same function (send the command move) but each one send the command to a different device.

        PD: sorry if my english is not good but it is not my maternal language

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @javcursor
        Your english is fine. :) most of us are not native English either.

        Ok. via TCP.

        So why cannot you not have a a machine selector. Like Combobox
        where u select machine. ?

        And then the move buttons will send to that machine.
        If u choose no 2 machine, it sends to that one. etc.

        It would be strange design to have 8 Move buttons. Unless there is
        good reason , i completely missed :)

        the_T 1 Reply Last reply
        2
        • mrjjM mrjj

          @javcursor
          Your english is fine. :) most of us are not native English either.

          Ok. via TCP.

          So why cannot you not have a a machine selector. Like Combobox
          where u select machine. ?

          And then the move buttons will send to that machine.
          If u choose no 2 machine, it sends to that one. etc.

          It would be strange design to have 8 Move buttons. Unless there is
          good reason , i completely missed :)

          the_T Offline
          the_T Offline
          the_
          wrote on last edited by
          #7

          @mrjj

          One reason could be that you want send the same command to multiple machines at the same time.
          Maybe a ListView with multiselect would be a slightly better solution.

          -- No support in PM --

          mrjjM 1 Reply Last reply
          1
          • the_T the_

            @mrjj

            One reason could be that you want send the same command to multiple machines at the same time.
            Maybe a ListView with multiselect would be a slightly better solution.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #8

            @the_

            Indeed. In such case a list will be better. :)

            But having 8 move buttons
            would still not really be at same time as there would be delay
            moving mouse between them and clicking.

            But Im just guessing. Not sure what his requirements are. :)

            1 Reply Last reply
            0
            • javcursorJ Offline
              javcursorJ Offline
              javcursor
              wrote on last edited by
              #9

              Imagine this GUI (image hear). I can have an Id for each machine but in that case I need a switch/if...else to select the correct objective.

              I want know if it is posible only do the GUI for machine1, then do a complete gui with multiple elements of type GUI for machine1 and manage those elements with some class/function of high level of Qt.

              mrjjM 1 Reply Last reply
              0
              • javcursorJ javcursor

                Imagine this GUI (image hear). I can have an Id for each machine but in that case I need a switch/if...else to select the correct objective.

                I want know if it is posible only do the GUI for machine1, then do a complete gui with multiple elements of type GUI for machine1 and manage those elements with some class/function of high level of Qt.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #10

                @javcursor
                hi
                Are you asking if its possible to just have one GUI instead of many of the same
                and then just select machine or
                what is the real question?

                I dont understand the last part.

                "if it is posible only do the GUI for machine1, then do a complete gui with multiple elements of type GUI for machine1"

                But most likely the answer is yes :)

                So when you press button it will call
                DoMoveCommand( SelectedMachine, xxx)

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #11

                  Hi! In Qt Creator, in your project, select "Add new...", then "Qt Designer Form Class" and then choose "Widget" as a form template. You can now build a widget containing all the buttons and stuff to control a single machine. This widget is reusable, this means you can add as many instances of it to your main window as you like.

                  javcursorJ 1 Reply Last reply
                  3
                  • ? A Former User

                    Hi! In Qt Creator, in your project, select "Add new...", then "Qt Designer Form Class" and then choose "Widget" as a form template. You can now build a widget containing all the buttons and stuff to control a single machine. This widget is reusable, this means you can add as many instances of it to your main window as you like.

                    javcursorJ Offline
                    javcursorJ Offline
                    javcursor
                    wrote on last edited by
                    #12

                    @Wieland said:

                    ...You can now build a widget containing all the buttons and stuff to control a single machine. This widget is reusable, this means you can add as many instances of it to your main window as you like.

                    Ok, that is the idea. I'll try build a widget.

                    Thank you all.

                    1 Reply Last reply
                    0
                    • mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      so you want 8 times the same GUI?
                      Not 1 GUI and u select machine?

                      1 Reply Last reply
                      0
                      • javcursorJ Offline
                        javcursorJ Offline
                        javcursor
                        wrote on last edited by
                        #14

                        Yes, it is a requisite

                        mrjjM 1 Reply Last reply
                        0
                        • javcursorJ javcursor

                          Yes, it is a requisite

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #15

                          @javcursor
                          Ok, then a widget is best approach.
                          And then create 8 instances in the mainwindow.

                          1 Reply Last reply
                          1

                          • Login

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