EasyManuals Logo

Siemens CP-8021 User Manual

Siemens CP-8021
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 #546 background imageLoading...
Page #546 background image
Examples for Instruction Lists (IL)
546 Unrestricted SICAM A8000 / CP-8000 • CP-8021 • CP-8022 Manual
DC8-037-2.02, Edition 10.2017
B.3 Linear Adaptation with Value Selection
Two analog values are compared and the higher one is selected (MAX). With this one an ad-
aptation kx+d is performed. The processed value receives a new address
(O_036_032_001_001.VALUE). The constants for k (M_REAL_CONSTANTforK) and d
(M_REAL_CONSTANTforD) are defined with initial values in the programm sequence
PLC_INIT.
PLC_RESET:
LD 10
ST PLC_CYCLETIME (*cycle time in ms*)
PLC_INIT:
LD 10
ST M_REAL_CONSTANTforK (*constant for k*)
LD -5
ST M_REAL_CONSTANTforD (*constant for d*)
PLC_START:
LD I_036_032_000_000.VALUE (*input 1*)
ST MAX.IN0
LD I_036_033_000_000.VALUE (*input 2*)
ST MAX.IN1
CAL MAX (*the greater value of both is used*)
ST M_REAL_MAXVALUE (*serves for reading which value will*)
ST MUL.IN0 (*be used*)
LD M_REAL_CONSTANTforK
ST MUL.IN1
CAL MUL (*the selected value is multiplicated*)
ST ADD.IN0 (*with the constant and results as "kx"*)
LD M_REAL_CONSTANTforD
ST ADD.IN1
CAL ADD (*after the multiplication add "d"*)
ST O_036_032_001_001.VALUE (*selected adapted value*)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Siemens CP-8021 Specifications

General IconGeneral
BrandSiemens
ModelCP-8021
CategoryController
LanguageEnglish

Related product manuals