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

    Counting minutes in REXYGEN

    REXYGEN Studio
    3
    9
    1.3k
    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.
    • C
      contactform
      last edited by

      Hello,
      is there any way that I can count how many minutes an input is high? On a Unipi with REXYGEN on it.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • jaroslav_sobotaJ
        jaroslav_sobota
        last edited by

        Have a look at example project 0305-01 which is included in REXYGEN Studio. I believe it solves your needs.

        Connect the input signal to the RUN input of the hour_meter subsystem and change the unit parameter to "2: minutes".

        Look inside the subsystem (Ctrl+U), you'll see it is built on top of the INTE function block.

        Best regards
        Jaroslav

        1 Reply Last reply Reply Quote 0
        • M
          martijnperdaan
          last edited by

          how can I read the hour meter?

          for example, if I put a time block in front of it and a cnr block so that the input is 1 min high, it does not count 1 min but 0.250

          1 Reply Last reply Reply Quote 0
          • jaroslav_sobotaJ
            jaroslav_sobota
            last edited by

            Hello Martijn,
            have a look at the following screenshot:
            0_1576066443362_rexygen-hour-meter.png

            The BIS block generates 60-second pulses. These are fed into the hour meter. After four pulses, the output value is 4.000. From the time plot (TRND block) you can see that the hour meter works as expected.

            Please post a screenshot or upload your source *.mdl files here if needed.

            Best regards
            Jaroslav

            1 Reply Last reply Reply Quote 0
            • M
              martijnperdaan
              last edited by

              but how can I read it through a rexlang block so that I can save it in a data base

              1 Reply Last reply Reply Quote 0
              • jaroslav_sobotaJ
                jaroslav_sobota
                last edited by

                Hello Martijn,
                please clarify your question. Saving data to database is not related to the REXLANG programmable block at all. Describe in more detail the functionality you are trying to achieve so that I or anybody else can help.

                Kind regards
                Jaroslav

                1 Reply Last reply Reply Quote 0
                • M
                  martijnperdaan
                  last edited by

                  I have to record how long a conveyor belt runs here every time in minutes and store that in a database

                  1 Reply Last reply Reply Quote 0
                  • M
                    martijnperdaan
                    last edited by

                    Anywhone ?

                    1 Reply Last reply Reply Quote 0
                    • jaroslav_sobotaJ
                      jaroslav_sobota
                      last edited by

                      Hello Martijn,
                      this will save the total number of run-minutes to database everytime the RUN input drops to OFF (FALSE):
                      0_1576604316928_rexygen-hour-meter-database.png

                      See example 0404-01 and Database connection driver manual for details.

                      Hope it helps.

                      Jaroslav

                      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.