Multiple trigger conditions Automatic Control

Forum Home Forums Understanding the Software Using Formulas Multiple trigger conditions Automatic Control

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12850
    p.tranavicius
    Participant

    Hello,

    Is it possible to set multiple trigger conditions in Automatic Control module,

    For example:
    Input channel value = 1 AND Input channel 2 > 20

    Much appreciated.

    Regards,
    Paulius

    #12855
    Mikhail
    Moderator

    Hello Paulius,

    You should create additional channel of the Calculated type to calculate a condition. Then use that channel in the trigger.

    #12856
    p.tranavicius
    Participant

    Something like the lines of code below in the formula?

    public double Mcon()
    {
      if (Val(1) > 1 && Val(2) = 20) // my 2 limits
       return 1; // my trigger status 1
      else
        return 2; // my trigger status 2
    }
    • This reply was modified 2 years, 2 months ago by p.tranavicius.
    #12858
    Mikhail
    Moderator

    In general, yes.
    According to C/C++/C# syntax, the equality operator is ==
    Also you can check channel status, for example, Stat(1) > 0

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