Forum Home › Forums › Understanding the Software › Show last input value on restart
- This topic has 12 replies, 3 voices, and was last updated 1 year, 5 months ago by
Mikhail.
-
AuthorPosts
-
August 30, 2021 at 7:01 am #9450
Jure
ParticipantHello,
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.
August 30, 2021 at 8:11 am #9451
manjey73ParticipantWhat is RP ?
August 30, 2021 at 10:29 am #9453Jure
ParticipantAugust 30, 2021 at 10:50 am #9456
manjey73ParticipantThe current data must be saved in the Windows environment. What OS are you using ?
August 30, 2021 at 12:53 pm #9460
MikhailModeratorHi,
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 4 years, 2 months ago by
Mikhail.
August 30, 2021 at 12:55 pm #9462
MikhailModeratorWhen Rapid SCADA is restarted, Communicator has no tag values and it sends empty data to the server.
August 30, 2021 at 1:20 pm #9465Jure
ParticipantIt works, thank you. Would maybe be possible to have checkbox for this in some future version instead of formula?
August 31, 2021 at 2:17 pm #9473
MikhailModeratorA checkbox that does what?
September 1, 2021 at 8:35 am #9482Jure
ParticipantCheckbox for input channel. If it is checked then it automatically uses keeps last good value, without this code.
September 1, 2021 at 11:35 am #9484
MikhailModeratorI 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()September 1, 2021 at 11:37 am #9485
MikhailModeratorCurrently, 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(); }June 12, 2023 at 9:40 am #12784
MikhailModeratorIn version 6 KeepGoodVal() and KeepGoodStat() can be rewritten as a single function that returns a CnlData structure.
June 12, 2024 at 12:28 pm #14670
MikhailModeratorpublic CnlData KeepGoodData() { return CnlStat > 0 ? NewData(Cnl, CnlStat) : Data(); } -
This reply was modified 4 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.