• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    NodeRed with analog OUTput

    Node-RED
    2
    2
    704
    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.
    • B
      BeerGeek last edited by

      I have found trouble with nodered "UniPi output" block in connection with Analog Output mode.

      I use Analog Output 1.01 with Current configuration, where sending 4-20mA to the valve. But in "UniPi output" block we see the limits:

      Details for the Analog output input msg:
      Number - in the interval <0;10> returns the input number, <0 returns 0, >10 returns 10.

      So, when I send a 20mA to fully open a valve, this valve received only 10mA, because your module has limits.

      How can I fix that?

      Z 1 Reply Last reply Reply Quote 0
      • Z
        zdenek_jotio @BeerGeek last edited by tomas_hora

        Hello @beergeek

        You are right with problem when using analog output in configuration 0-20mA. When we designed nodes, we only implemented voltage output.

        To fast repair you can add function node to output, that recalculate output value from 0-10 to 0-20. So your input value will be 0 to 10, but output value will be 0-20. We will try to repair output node with support for current output it in next week.

        Function code to fast implementation:
        0_1562793741763_b5537379-d362-4d19-b00b-00d50f3b5464-image.png

        Try to import funtion and connect it as in picture.

        [{"id":"98b4db11.a43aa8","type":"function","z":"dd6bd412.3bde08","name":"0-20mA","func":"if(msg.payload.value) \n{\n    msg.payload.value = msg.payload.value*2.00;\n}\nreturn msg;","outputs":1,"noerr":0,"x":1260,"y":220,"wires":[["a7851ed2.a7d6"]]}]
        

        Thank you for your notice.

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