B.3 Linear Adaptation With Value Selection - Siemens CP-8000 User Manual

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

Advertisement

Examples for Instruction Lists (IL)
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
PLC_INIT:
LD
10
ST
M_REAL_CONSTANTforK
LD
-5
ST
M_REAL_CONSTANTforD
PLC_START:
LD
I_036_032_000_000.VALUE
ST
MAX.IN0
LD
I_036_033_000_000.VALUE
ST
MAX.IN1
CAL
MAX
ST
M_REAL_MAXVALUE
ST
MUL.IN0
LD
M_REAL_CONSTANTforK
ST
MUL.IN1
CAL
MUL
ST
ADD.IN0
LD
M_REAL_CONSTANTforD
ST
ADD.IN1
CAL
ADD
ST
O_036_032_001_001.VALUE
546
Unrestricted
(*cycle time in ms*)
(*constant for k*)
(*constant for d*)
(*input 1*)
(*input 2*)
(*the greater value of both is used*)
(*serves for reading which value will*)
(*be used*)
(*the selected value is multiplicated*)
(*with the constant and results as "kx"*)
(*after the multiplication add "d"*)
(*selected adapted value*)
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