Examples for Application Programs
324
SICAM RTUs, User Manual SICAM CMIC
DC8-001-2.09, Edition 08.2016
B.3
Linear Adaptation with Value Selection
Two analog values are compared and the higher one is selected (
MAX
). With this one an adap-
tation
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*)
Содержание SICAM CMIC
Страница 8: ...Preface 8 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 10: ...Open Source Software Used in SICAM CMIC 10 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 20: ...Table of Contents 20 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 Glossary 405 ...
Страница 46: ...Installation 46 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 62: ...Interfaces and Circuitry 62 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 102: ...Preparing the Engineering 102 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 130: ...Engineering via SICAM TOOLBOX II 130 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 334: ...Error Handling 334 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 386: ...Set Up Dial Up Connection via PPP 386 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 394: ...Install Security Certificate 394 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 404: ...Use Cases 404 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 ...
Страница 414: ...Glossary 414 SICAM RTUs User Manual SICAM CMIC DC8 001 2 09 Edition 08 2016 X Z ...