Error Handling
SICAM RTUs, User Manual SICAM CMIC
325
DC8-001-2.09, Edition 08.2016
B.4
Operating Hours Counter
A clock pulse generator (
TCLK_PULSE
) is running with a frequency of 30s logical
1
and 30s
logical
0
. The edge change from
0
to
1
is switched to the
CU
Input of the upward-counter
(
CTU_COUNTER.CU
) and the counter will be incremented with 1 per minute.
The sum of the operating hours results of two values:
•
Current counter score (
CTU_COUNTER.CV
)
•
Counter score before the last power down (
MR_DINT_MINUTES
)
The score will be saved in a retaining flag (
M_DINT_MINUTESOLD
). This means, after a
power down (startup) the counter will continue with incrementing based on the last value.
The hours result by minutes devided by 60. The hours always will be recalculated based on
the minutes, the same after a power down.
PLC_RESET:
LD 10
ST PLC_CYCLETIME
(*cycle time in ms*)
PLC_INIT:
LD MR_DINT_MINUTES
(*load power-fail safe value*)
ST M_DINT_MINUTESOLD
(*freeze in a flag as old value*)
PLC_START:
(*Operating hours counter*)
LD PLC_SYSTIME.SEC
(*fetch second value of the system time*)
ST M_DINT_SEC
(*and store in variable*)
LD M_DINT_SEC
(*current second*)
EQ 0
(*compare with second 0*)
ST CTU_COUNTER.CU
(*HIGH always at the second 0, required*)
(*edge detection is implemented within*)
(*the counter*)
CAL CTU_COUNTER
(*increments the counter*)
LD CTU_COUNTER.CV
(*load current counter score*)
ST ADD.IN0
(*store at input 0 for ADD function*)
LD M_DINT_MINUTESOLD
(*load old value*)
ST ADD.IN1
(*store at input 1 for ADD function*)
CAL ADD
(*call ADD function*)
ST MR_DINT_MINUTES
(*store sum of operating minutes in a*)
(*retaining flag, after startup the*)
(*old value will be added to the*)
(*current counter score*)
ST DIV.IN0
(*store at input 0 for DIV function*)
LD 60
(*load constant for 60 minutes*)
ST DIV.IN1
(*store at input 1 for DIV function*)
CAL DIV
(*call DIV function*)
ST M_DINT_HOURS
(*sum of operating hours = minutes*)
(*divided by 60*)
To reset the counter score it is necessary to reset the counter (
CTU_COUNTER.R
) as well as
the flag with the retained value (
M_DINT_MINUTESOLD
).
Содержание SICAM CMIC
Страница 8: ...Preface 8 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 10: ...Open Source Software Used in SICAM CMIC 10 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 20: ...Table of Contents 20 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 Glossary 405 ...
Страница 46: ...Installation 46 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 62: ...Interfaces and Circuitry 62 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 102: ...Preparing the Engineering 102 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 130: ...Engineering via SICAM TOOLBOX II 130 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 334: ...Error Handling 334 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 386: ...Set Up Dial Up Connection via PPP 386 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 394: ...Install Security Certificate 394 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 404: ...Use Cases 404 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 414: ...Glossary 414 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 X Z ...