FX Series Programmable Controllers Assigning System Devices 9
9-9
Example Application Program #8
In Current Output mode, the user digital range of A ~ B is used to output a current of 4 - 20 mA.
The range of A ~ B stored in D70 must be converted to a range of 0 ~ 2000 per the example
program below.
D8114/(D70 - A) = (2000 - 0)/ (B - A)
D8114 = {[(2000 - 0) x D70] / (B - A)} - {[(2000 -0) x A] / (B - A)}
If A = 4000 and B = 20000, then [(2000 x D70 /(20000 - 4000)] - [2000 x 4000 / (20000 - 4000)]
D8114=(D70/8)-500
Example Application Program #9
In Current Output mode, a current in the range of A ~ B (4mA < A < B < 20 mA) is output by
using a digital range of C ~ D that is stored in D80. The current range A ~ B must be converted
to the 4 ~ 20mA equivalent value and the digital range C ~ D must be converted to the 0 ~
2000 range equivalent value.
Please see previous programming examples for sample range conversion calculations.
D8114 = (B’ -A’)xD80/(D-C)+{(A’ xD)-(B’ xC)}/(D-C)
A’ = 125 x A - 500, B’ = 125 x B - 500,
D8114 = [(125 x B - 500) - (125 x A - 500)] x D80 / (D - C) +
0
0
2000
B
Digital value
(D8114) for practical
analog output
Analog
output value
Digital value (D70) for output Digital value (D8114) for output
0
0
20mA
2000
4mA
A
M8000
FNC 23
DIV
D70 K8
D72 K500
M8114
D72
D74
D74 D8114
FNC 21
SUB
D
FNC 12
MOV
0
0
B'
D
Digital value
(D8114) for practical
analog output
Analog
output value
Digital value (D80) for output
0
0
20mA
2000
Digital value (D8114) for output
A
A'
A'
B
B'
C
4mA
2000