EasyManuals Logo

Siemens CP-8022 User Manual

Siemens CP-8022
614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #550 background imageLoading...
Page #550 background image
Examples for Instruction Lists (IL)
550 Unrestricted SICAM A8000 / CP-8000 • CP-8021 • CP-8022 Manual
DC8-037-2.02, Edition 10.2017
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*)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CP-8022 and is the answer not in the manual?

Siemens CP-8022 Specifications

General IconGeneral
BrandSiemens
ModelCP-8022
CategoryController
LanguageEnglish

Related product manuals