Siemens CP-8000 User Manual page 550

Sicam a8000 series
Hide thumbs Also See for CP-8000:
Table of Contents

Advertisement

Examples for Instruction Lists (IL)
Example:
PLC_RESET:
LD
20
ST
PLC_CYCLETIME
PLC_INIT:
LD
5
ST
CTU_FLZ0.PV
(*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
ST
TON_EDTIMERISE0.PT
ST
TON_EDTIMEFALL0.PT
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
ST
M_BOOL_INPUT00
ST
TON_EDTIMERISE0.IN
STN TON_EDTIMEFALL0.IN
CAL TON_EDTIMERISE0.IN
ST
OR.IN0
CAL TON_EDTIMEFALL0
ST
OR.IN1
CAL OR
ST
M_BOOL_COUNTER00
ST
CTU_EDC0.R
(*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
ST
F_TRIG_INEDFALL0.CLK
CAL R_TRIG_INEDRISE0
ST
OR.IN0
CAL F_TRIG_INEDFALL0
ST
OR.IN1
CAL OR
ST
CTU_EDC0.CU
ST
M_BOOL_MODULE3
(*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
ST
M_BOOL_MODULE7
ST
AND.IN0
LDN M_BOOL_COUNTER00
ST
AND.IN1
CAL AND
ST
M_BOOL_BOUNCING00
ST
O_030_002_000_000.BL
(*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
ST
O_030_002_000_000.VALUE
550
Unrestricted
number of state changes >= 5
monitoring time of the stability of the input = 10 s
(*cycle time in ms*)
(*number of transients until*)
(*information is set bouncing*)
(*load constant for 10s*)
(*ON delay rising edge*)
(*ON delay falling edge*)
(*input*)
(*rising edge - module 4*)
(*falling edge - module 5*)
(*call module 4*)
(*call module 5*)
(*call module 6*)
(*also in graphic*)
(*reset input of counter - module 7*)
(*rising edge - module 1*)
(*falling edge - module 2*)
(*call module 1*)
(*call module 2*)
(*call module 3*)
(*count up input of counter - module 7*)
(*only for graphic*)
(*call module 7*)
(*only for graphic*)
(*call module 8*)
(*is set if the input is bouncing*)
(*set blocked bit of the input*)
(*call module 9 – if bouncing, then "0"*)
(*output of input information*)
SICAM A8000 / CP-8000 • CP-8021 • CP-8022 Manual
DC8-037-2.02, Edition 10.2017

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cp-8021Cp-8022

Table of Contents