• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Multistate image with multiple points input

    User help
    2
    2
    871
    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.
    • S
      sbaik
      last edited by

      I need a light that outputs 4 different colors. I have 4 binary inputs that will be in different combinations. How would I go about doing so? I tried searching with no luck.
      Basically, A. valve opening, B. closing, C. not fully open, D. not fully closed.

      I need output when following combination is true.
      C.
      D.
      ACD.
      BC.
      BCD.
      AD.

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        A multi-state meta data point would probably be your easiest option.

        Add the 4 binary data points as context points. The script would look something like this -

        var a = contextA.value << 0;
        var b = contextB.value << 1;
        var c = contextC.value << 2;
        var d = contextD.value << 3;
        
        return a | b | c | d;
        

        Developer at Radix IoT

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