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

Binary to multistate meta point


  • I would like to use a binary and a numeric as context points in a multistate meta point.
    My problem is with the binary context point. The statement if(n.value==1.0) works for the numeric point but if(b.value==true) does not work for the binary.
    I have tried different combinations of true, false, 1, 0, 1.0. 0.0 with no change.
    Writing “return k” and clicking the Validate Script button yields the message Success. result=true but using if(k.value==true) does not work.

    
    // multistate meta point
    // k = fanRelay (binary)
    // p = fanProof (numeric)
    var s = 0
    
    if(k.value==true) {
        if(p.value==1.0) {
            s = 1;
        }
        else {
            s = 2;
        }
    }
    
    

  • Works for me. In fact, both of these do:

    if (b.value == true)
    

    ... and:

    if (b.value)
    

  • I have been experimenting with Virtual data points as banging the fan on and off was slow.
    If I switch the context variables in this meta point it will work.
    Changing the state of the binary variable has no effect.

    Attachment: download link


  • I installed ScadaBR alongside Mango M2M on my server and the bug does not exist in ScadaBR.

    ScadaBR works correctly.

    I still cannot use binary context points in Mango.

    return binaryPoint.value; fails on my fresh Mango install.

  • As i said, it works for me. What version are you using?