Show last input value on restart

Forum Home Forums Understanding the Software Show last input value on restart

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #9450
    Jure
    Participant

    Hello,
    is it possible for RP to remember last input value before restart? We are using protocol MQTT where variables are sent only on change. So if we restart RP we won’t get values from PLC until they change.
    There is option that we restart PLC so that he will resend all the data or restart MQTT client which sends data, but in the future we could have 20 PLC and clients on different locations and would take a lot of time to restart all of them.

    So what we would like is that if “Device” doesn’t have value for input channel after restart, that Scheme displays last known value.

    #9451
    manjey73
    Participant

    What is RP ?

    #9453
    Jure
    Participant

    Rapid Scada, don’t know why i used RP for abbreviation of Rapid Scada.

    • This reply was modified 2 years, 7 months ago by Jure.
    • This reply was modified 2 years, 7 months ago by Jure.
    #9456
    manjey73
    Participant

    The current data must be saved in the Windows environment. What OS are you using ?

    #9460
    Mikhail
    Moderator

    Hi,
    Try the formula for an input channel:
    CnlStat > 0 ? Cnl : Val(); CnlStat > 0 ? CnlStat : Stat()
    It should keep the last good value.

    • This reply was modified 2 years, 7 months ago by Mikhail.
    #9462
    Mikhail
    Moderator

    When Rapid SCADA is restarted, Communicator has no tag values and it sends empty data to the server.

    #9465
    Jure
    Participant

    It works, thank you. Would maybe be possible to have checkbox for this in some future version instead of formula?

    #9473
    Mikhail
    Moderator

    A checkbox that does what?

    #9482
    Jure
    Participant

    Checkbox for input channel. If it is checked then it automatically uses keeps last good value, without this code.

    #9484
    Mikhail
    Moderator

    I think, such textbox makes configuration overloaded with options. In the future, it will be possible to make a simple formula included in the software by default.
    For example: KeepGoodValue()

    #9485
    Mikhail
    Moderator

    Currently, it possible to do
    KeepGoodVal(); KeepGoodStat()

    and add in the Formulas table:

    public double KeepGoodVal()
    {
      return CnlStat > 0 ? Cnl : Val(); 
    }
    
    public int KeepGoodStat()
    {
      return CnlStat > 0 ? CnlStat : Stat();
    }
    #12784
    Mikhail
    Moderator

    In version 6 KeepGoodVal() and KeepGoodStat() can be rewritten as a single function that returns a CnlData structure.

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