Calculated Real working unreliable

Forum Home Forums Understanding the Software Using Formulas Calculated Real working unreliable

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #1109
    Mikhail
    Moderator

    Hi,

    To create a new function open SCADA-Administrator -> Formulas table. It already contains a few examples.

    If you need a formula to calculate input channel value, it should be as the following:

    double MuFunc()
    {
      return 1; // for example
    }
    

    Then enter the formula in the Input channels table: MyFunc(); 1
    Where 1 is status of the input channel.

    Anyway the channel value is double. If you need string representation, use Unit table (find the example in the default configuration database).

    Also read about using formulas at Part 3. Software Configuration in http://rapidscada.org/product/documentation/

    #1110
    Mikhail
    Moderator

    See also:
    C# Operators

    The easiest way tor debug your formulas is creating console application using Microsoft Visual Studio Community Edition.

    #1122
    radix
    Participant

    Thanks for details Mikhail.

    Is there function to set value for channel n. (like Val(n) is to get channel value).

    In our case, Instrument sends alarm value at Channel 1. Then we want formula to calculate & set value for input channel 2,4,..n
    And these alarm value (2,4,..n) further will be shown from web scada to user.

    #1126
    Mikhail
    Moderator

    Is an alarm value for Channel 1 is generated by a device? In this case you can calculate values of other channels using formulas which depends on Channel 1 as you wrote Val(n). May be I didn’t catch your question.

    #1127
    radix
    Participant

    Yes Mikhail, alarm value is generated by device for channel 1.
    This channel 1 value required to be calculated at SCADA site & update the result at input channel 2 & 3. So how to update channel 2,3 from formula ? formula need to set on channel 1 ?

    Channel 2 & 3 (alarm result) result will be then shown on web page

    #1128
    Mikhail
    Moderator

    You have to use Caclculated channel type for channels 2&3 and define formulas for them.

    #1139
    radix
    Participant

    Thanks for details. Its done as per required.

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.