REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Bitwise operation in HMI designer

    REXYGEN HMI Designer
    2
    5
    449
    Loading More Posts
    • 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.
    • A
      Apollo
      last edited by

      I have to deal with some 16-bit statuswords. Every single bit of these words I would like to visualize within HMI designer. What is the most efficient way to do this?
      Should I do the bitwise operation already in the REXlogic or can I do the bitwise operation directly in the table with the connection strings? The latter would be ideal but for the moment I can only accomplish this by using first an ALIAS before doing the actual bitwise operation. Can it not be done directly?

      Test example :

      39a00482-58a2-43db-8b27-f12a3403a2e0-image.png

      1 Reply Last reply Reply Quote 0
      • cechuratC
        cechurat
        last edited by

        Hi Kris,

        the solution you described using means of REXYGEN HMI Designer is the best I can think of now. Please, be aware that the ALIAS name used in expression need to be in alphabetical order before the expression name (e.g. ALIAS "temp" and expression "test" works fine - vice versa ALIAS "test" and expression "temp" won't work).

        I would suggest to use the bitwise operations within REXYGEN algorithm. You can easily see what's going on there in Watch mode. Also using function blocks can be sometimes more "readable" (this is not general truth).

        Cheers,
        Tomas

        A 1 Reply Last reply Reply Quote 0
        • A
          Apollo @cechurat
          last edited by

          @cechurat
          Thanks for your reply, we are doing it now as you suggested within the logic itself. Now we end up with many of these : 🙂

          b8312aa5-f285-4824-b666-dc07c683969e-image.png

          Every word consists of 2 status-bytes of which I only need three the most. Every byte is representing the status of an alarm and these bits are for: active alarm, not-acknowledged alarm, sensor failure)

          Maybe the creation of a custom svg object to represent these statuses would be the best. It would save me a lot of copy/pasting and looking up different bits... which leave a lot of room to make mistakes

          cechuratC 1 Reply Last reply Reply Quote 0
          • cechuratC
            cechurat @Apollo
            last edited by

            @apollo Hi Kris,

            what about using library subsystems (see doc: https://www.rexygen.com/doc/ENGLISH/MANUALS/RexygenStudio/RexygenStudio_ENG.html#x1-360005) in REXYGEN?
            Any change in the library source subsystem will make changes in all references used in algorithm instantly. Such a subsystem can look like:

            0e2ab398-d938-4011-b1fe-775878aff1a8-image.png

            Cheers,
            Tomas

            A 1 Reply Last reply Reply Quote 0
            • A
              Apollo @cechurat
              last edited by

              @cechurat

              It would be (time-wise) more convenient for me to create one SVG-object which can display all different statuses from a single alarm. Now the connecting of all these different alarm-bits in HMIdesigner is really time-consuming... but I'll manage... 🙂

              That's why I think that it would be a better solution to make a custom SVG that accepts a byte with all the necessary info...then only one connecting string is needed for one alarm. But for now, I'll stick to what I'm already doing because following the path of creating new custom objects will cost me even more time I'm afraid.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

              There is also an outdated REXYGEN community forum.

              Powered by NodeBB.