Examples for Application Programs
328
SICAM RTUs, User Manual SICAM CMIC
DC8-001-2.09, Edition 08.2016
Example:
number of state changes >= 5
monitoring time of the stability of the input = 10 s
PLC_RESET:
LD 20
ST PLC_CYCLETIME
(*cycle time in ms*)
PLC_INIT:
LD 5
(*number of transients until*)
ST CTU_FLZ0.PV
(*information is set bouncing*)
(*once detected as bouncing, the input signal must last statical "1" for
a preset time until the blocked bit will be reset again*)
LD 10000
(*load constant for 10s*)
ST TON_EDTIMERISE0.PT
(*ON delay rising edge*)
ST TON_EDTIMEFALL0.PT
(*ON delay falling edge*)
PLC_START:
(*Modules 4,5,6,7 – if there are no more state changes of the input, the
counter will be reset when the preset monitoring time has expired*)
LD I_030_002_000_000.VALUE
(*input*)
ST M_BOOL_INPUT00
ST TON_EDTIMERISE0.IN
(*rising edge - module 4*)
STN TON_EDTIMEFALL0.IN
(*falling edge - module 5*)
CAL TON_EDTIMERISE0.IN
(*call module 4*)
ST OR.IN0
CAL TON_EDTIMEFALL0
(*call module 5*)
ST OR.IN1
CAL OR
(*call module 6*)
ST M_BOOL_COUNTER00
(*also in graphic*)
ST CTU_EDC0.R
(*reset input of counter - module 7*)
(*Modules 1,2,3,7 – rising and falling edge of the input are combined
with an OR and put to the CU input of the counter – each change will be
added*)
LD M_BOOL_INPUT00
ST R_TRIG_INEDRISE0.CLK
(*rising edge - module 1*)
ST F_TRIG_INEDFALL0.CLK
(*falling edge - module 2*)
CAL R_TRIG_INEDRISE0
(*call module 1*)
ST OR.IN0
CAL F_TRIG_INEDFALL0
(*call module 2*)
ST OR.IN1
CAL OR
(*call module 3*)
ST CTU_EDC0.CU
(*count up input of counter - module 7*)
ST M_BOOL_MODULE3
(*only for graphic*)
(*Modules 7,8 – with the first edge change the monitoring time will be
started. If the number of edges is greater then the number of transients
within this time, the output of the AND (module 8) is set = blocked*)
CAL CTU_EDC0
(*call module 7*)
ST M_BOOL_MODULE7
(*only for graphic*)
ST AND.IN0
LDN M_BOOL_COUNTER00
ST AND.IN1
CAL AND
(*call module 8*)
ST M_BOOL_BOUNCING00
(*is set if the input is bouncing*)
ST O_030_002_000_000.BL
(*set blocked bit of the input*)
(*Module 9 - the output is reset during the input is detected as bounc-
ing*)
LD M_BOOL_INPUT00
ST AND.IN0
LD M_BOOL_BOUNCING00
STN AND.IN1
CAL AND
(*call module 9 – if bouncing, then "0"*)
ST O_030_002_000_000.VALUE
(*output of input information*)
Summary of Contents for SICAM CMIC
Page 8: ...Preface 8 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 46: ...Installation 46 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 62: ...Interfaces and Circuitry 62 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 102: ...Preparing the Engineering 102 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 334: ...Error Handling 334 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 404: ...Use Cases 404 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Page 414: ...Glossary 414 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 X Z ...