Number to be displayed at WebStation

Forum Home Forums Understanding the Software Number to be displayed at WebStation

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #11520
    victorlam
    Participant

    Hello,

    I have a value read from register 30002. The initial value is 65535 in which this is an insignificant value. Due to the alarm trigger, it will be changed to a significant value eg 100 or 500 or others, not 65535.

    At WebStation, how can I make the value of 65535 not shown (or disappeared) unless the value has been changed to other values, then this value will be displayed?

    Please advise if this can be implemented.

    #11544
    Mikhail
    Moderator

    Hello,
    Set the undefined channel status if value is 65535 with a formula.

    #11573
    victorlam
    Participant

    Hello,

    Thanks for your guidance support.
    I try to set the undefined status with color as white as the table summary background is white.

    Then the formula is
    public int Checkstatus()
    {
    if (Cnl=65535) return 0;
    else return 1;
    }

    Under input channel 1, then the syntax is Cnl;checkStatus()

    However, there is no change or there is error after upload the project file.

    Please help to advise the solution on this.

    #11576
    Mikhail
    Moderator

    Hello,
    In case of an error, please provide the error message.

    #11584
    victorlam
    Participant

    Here you are:-

    2022-11-18 22:56:46 <LAPTOP-JH81V3B5><SYSTEM><ERR> Error compiling the source code of the formulas:
    Line 516, column 5: error CS0200: Property or indexer ‘Scada.Server.Engine.CalcEngine.Cnl’ cannot be assigned to — it is read only
    Line 516, column 5: error CS0029: Cannot implicitly convert type ‘double’ to ‘bool’
    See the file C:\SCADA\ScadaServer\Log\CalcEngine.cs with the source code
    2022-11-18 22:56:46 <LAPTOP-JH81V3B5><SYSTEM><ERR> Normal program execution is impossible

    #11585
    victorlam
    Participant

    Hello,

    Let me explain my situation here.

    Value of a register eg 30001, the value at initial state is 65535 (FFFF in heximal value). This is an unrelevant value or non-meaning value. So I do not want to display this FFFF or 65535 value. When there is a trigger from the sensor, it will be changed as eg 10 or 200 355 or 311 or any value not 65535.

    How can this be done? I have already used the formula but not successful. May be my formula is not correct.

    #11586
    victorlam
    Participant

    And this value (not 65535) needs to be displayed or shown.

    #11590
    victorlam
    Participant

    Or my situation was not clear. And let me brief the status as follows:-

    30001 = 0/1/2/3
    0=NORMAL, 1=LEAK, 2=BREAK, 3=LEAK&BREAK
    This register value can be used at the unit function and represented with different status of the register 30001.

    30002
    default value = FFFF (65535). This value is not significant and should not be displayed and need to display any number other than 65535.
    Suggest to use the formula. Then the formula is as follows:-
    public int Leak() { if (Cnl>=65535) return 0;
    else return 1}

    After the apply of the formula function, I cannot implement with the requested effect. Please help to advise if anything is missing here. Or I have the wrong interpretation.

    #11628
    Mikhail
    Moderator

    if (Cnl=65535) return 0; has wrong syntax. C# uses == as equality operator.

    #11649
    victorlam
    Participant

    Hello,

    Thanks for your support so far. Eventually I have successfully executed my request as follows:-

    Formula is below:-
    public int LeakLocation()
    { if (Cnl>=65535) return 0;
    else return 1; }

    Under Input channel number 102 box; I use “Cnl/10;LeakLocation()” for the formula.

    But my concept is still not clear and would like to get your explanation on this.

    If the value is 65535, then it will be —. If the value is not 65535 eg 47 or 35, then it will display eg 4.7 or 3.5 etc.
    My question is how did Rapid SCADA handle the formula box with both channel value and channel status at the same time. This is a bit confusing.

    #11672
    Mikhail
    Moderator

    Hello,
    Please read this. Item 7

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