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

    Configuring Analog inputs

    Monarco HAT
    2
    5
    550
    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.
    • M
      MikeyH
      last edited by

      Hi All,

      I have created a subsystem to scale analog inputs so you can use either 0-10V or 4-20mA. It even has a parameter to turn on a TRND block. Can this be done on the Monarco HAT given how the flags are already separate configurations? I'm building a generic logger and would like the analog input to be software configurable if possible. This way I can use either V or mA transducers and and not have to change the code, just use the HMI to configure it.

      Cheers

      Mike

      Random Ideas.mdl

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

        UPDATE!

        After posting earlier I wondered if something like this would be better?

        Not having the unused input flag showing an alarm might be tricky?

        Cheers

        Mike

        Random Idea2.mdl

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

          Hi Mike,

          thanks for your question. Good job - your latest proposed solution makes sense. Just one small remark:
          For now it is possible to have ranges just 0-10V or 4-20mA. It is not possible to switch to 0-5V.

          Let me know if I can be of assistance.

          Regards
          Tomas

          M 1 Reply Last reply Reply Quote 0
          • M
            MikeyH @cechurat
            last edited by

            Thanks Tomas,

            Will the unused flag produce an error or alarm in the system log?

            I’ve also removed the 0-5v option 😀

            Cheers

            Mike

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

              Hi Mike,

              I wasn't 100% right, sorry for that.

              It is prohibited to use both flags for AI at the same time by the compiler. The solution is not that straightforward however it is possible:

              • use just "MNR_AI1" flag
              • to set the current mode use SDC write flag, address 0x00A - bits 01 and 02 (see docs: https://github.com/monarco/monarco-hat-documentation/blob/master/Monarco_HAT_SPI_Protocol.md#service-channel-register-description)
              • when in current mode you need to manually convert the value by following formula 10V = 52.475 mA

              If you need any additional help, let me know.

              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.