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

    Help with function blocks

    REXYGEN Studio
    4
    6
    1.5k
    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

      Hi there,

      I was wondering if could get some help with choosing the correct block/s for the below process?

      1. Use a boolean input to capture/get/display a point in time. i.e. pressing a pushbutton, captures/displays the the time “17:30:02”.

      2. Use a different boolean to reset the above time to “00:00:00”.

      I was thinking about using the “DATETIME” block but there doesn’t appear to be a method of resetting it to zero/nothing?

      Many thanks,
      Phil

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

        Hi Phil,
        sure you can. Can you please describe in more detail what is the end goal? What problem are you trying to solve? Some kind of stop watch? Or maybe run-hours counter?

        The DATETIME block is very likely way too complicated for your needs.

        Best regards,
        Jaroslav

        1 Reply Last reply Reply Quote 0
        • B
          BailP
          last edited by

          Hi Jaroslav,

          I'm hoping to use this function to record/capture what time a pushbutton has been pressed - I'd also like the ability to reset the captured time?

          Thanks,

          P

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

            Hi Phil,

            for measuring time of pressed pushbutton I would go for integrator (INTE function block) with ti=1.

            What is reason for measuring pushbutton pressed time? I'm asking because my proposed solution doesn't have to be the best for your end goal. Let us know.

            Cheers, Tomas

            B 1 Reply Last reply Reply Quote 0
            • B
              BailP @cechurat
              last edited by

              Hi Tomas,

              Thanks for your help with this subject - very much appreciated.

              In terms of setting up the block, I have a few small questions:

              1. Input: What inputs do I provide to the block? A "CNI =1" to the "ti" input? Are any other inputs required?
              2. Output (a time that I can display on RexHMI): Output "Y" - is that correct?
              3. Reset: The block can be reset with a "Bool = 1" to the "R1" input?

              The reason for measuring the pushbutton pressed time is to provided a centralised display for an access control system 🙂

              Thanks,

              P

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

                Hi Phil,

                let me answer your questions:

                ad 1) Yes, in order to count time connect CNI=1 to "ti" input as you proposed.
                ad 2) Correct, "Y" should contain time.
                ad 3) Exactly.

                It also assumes that your boolean signal from pushbutton is connected to input "u".

                For more details about the INTE function block see docs: https://www.rexygen.com/doc/ENGLISH/MANUALS/BRef/INTE.html#x81-800005

                Cheers, Tomas

                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.