User manual
PID Loop Operation
(DL450 Only)
Maintenance
8--53
PID Loop Operation (DL450 only)
DL405 User Manual, 4th Edition, Rev. A
The DL450 does not support a built in filter, however, your analog inputs can be
filtered effectively using the following RLL program example. Be sure to change the
example memory locations to those that fit your application.
Filtering can induce a 1 part in 1000 error in your output because of “rounding”.
Because of the rounding error, you should not use zero or full scale as alarm points.
Additionally, the smaller the filter constant the greater the smoothing effect, but the
slower the response time. Be certain that a slower response is acceptable in
controlling your process.
LD
V2000
SUBR
V1400
BTOR
SP1
BIN
Loads the analog signal, which is a BCD value
and has been loaded from V-memory location
V2000, into the accumulator. Contact SP1 is
always on.
Converts the BCD value i n the accumulator
to binary. This instruction i s not needed if the
analog value is originally brought in as a
binary number.
Converts the binary value in the accumulator
to a real number.
Subtracts the real number stored in location
V1400 from the real number in the
accumulator, and stores the result i n the
accumulator. V1400 is the designated
workspace in this example.
Multiplies the real number in the
accumulator by 0.2 (the filter factor),
and stores the result in the
accumulator. This is the filtered value.
OUTD
V1400
ADDR
V1400
MULR
R0.2
OUT
V1402
BCD
RTOB
Adds the real number stored in
location V1400 to the real number
filtered value in the accumulator, and
stores the result in the accumulator.
Copies the value in the accumulator
to location V1400.
Converts the real number in the
accumulator to a binary value, and
stores the result in the accumulator.
Converts the binary value in the accumulator
to a BCD number. Note: the BCD instruction
is not needed for PID loop PV (loop PV is a
binary number).
Loads the BCD number filtered value from
the accumulator into location V1402 to use
in your application or PID loop.
Creating an Analog
Filter in Ladder
Logic