Formulas to control more than one channel

Forum Home Forums Understanding the Software Using Formulas Formulas to control more than one channel

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13528
    DHague
    Participant

    Hi,

    I have a button in a scheme that needs to reset multiple counter channels to 0, is there a way to accomplish this with a formula as I am unable to set the button to activate multiple channels.

    #13534
    Mikhail
    Moderator

    Hi,

    Are the counter channels connected to hardware counters?
    How do you reset a single counter?

    #13536
    DHague
    Participant

    The counters will be done in software, right now I reset a counter by using a SetVal(CnlNum, 0) formula.

    #13538
    Mikhail
    Moderator

    Create a new function and set multiple SetVal inside it. For example,

    public double MySetVal()
    {
      SetVal(101, 0);
      SetVal(102, 0);
      return Cmd;
    }
    

    Then specify MySetVal() in the output formula of the channel.

    • This reply was modified 1 year, 10 months ago by Mikhail.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.