Above value result zero

Forum Home Forums Understanding the Software Using Formulas Above value result zero

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14944
    redass
    Participant

    Hello
    I need help, I’m trying to set a formula so that above a certain value it is displayed as zero. (Cnl%256)/100 and let’s assume it displays a value of 2.54, I would like the zero value to be displayed in scad above this value.

    #14948
    Mikhail
    Moderator

    Hello,
    Channel formula example,
    Cnl <= 10 ? Cnl : 0
    Condition ? expression1 : expression2

    #14951
    redass
    Participant

    however, when I try to connect to this converter, an error occurs
    (Cnl%256)/100

    #14953
    redass
    Participant

    The easiest way is because I’m a beginner. I have a formula (Cnl%256)/100 and it calculates correctly and the device throwing the value 2.55 is considered 0 or null(invalid) and I want to get such an entry when it enters such a value.

    #14971
    Mikhail
    Moderator

    Could you provide screenshots of the settings and error?

    #14974
    manjey73
    Participant

    Cnl != 255 ? (Cnl%256)/100 : doubleNaN

    2.55 isn’t that after dividing by 100?

    If the value from the device is 255, then you will receive --- well, or you still need to add status processing or perform it through status processing

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.