F
3-
-0
4D
A
S
4
C
h.
Is
ol
at
ed
A
na
lo
g
O
ut
.
8--14
F3--04DAS 4-Channel Isolated Analog Output
Here’s how you would write the program to perform the Engineering Unit conversion.
This example assumes you have calculated or loaded the engineering unit value
and stored it in R400. Also, you have to perform this for all channels if you’re using
different data for each channel.
374
DSTR
R400
F50
DIV
K100
F74
This instruction loads Engineering unit value into
the accumulator on every scan.
This instruction moves the two-byte decimal
portion into the accumulator for further operations.
Scale the data
The Engineering unit value is divided by the
Engineering unit range, which in this case is 100.
(100 -- 0 = 100)
DSTR
R576
F50
MUL
K4096
F73
DSTR
R576
F50
DOUT
R450
F60
0
0
4
2
Accumulator
0
0
0
0
Aux. Accumulator
0
0
0
0
Accumulator
4
2
0
0
Aux. Accumulator
This example assumes you have already loaded the Engineering unit
value in R400.
4
2
0
0
Accumulator
4
2
0
0
Aux. Accumulator
The accumulator is then multiplied by the module
resolution, which is 4096. (4096 x 4200 =
17203200). Notice the most significant digits are
now stored in the auxilliary accumulator. (This is
different from the Divide instruction operation.)
3
2
0
0
Accumulator
1
7
2
0
Aux. Accumulator
R577
R576
R577
R576
R577
R576
R577
R576
This instruction moves the two-byte auxilliary
accumulator for further operations.
1
7
2
0
Accumulator
1
7
2
0
Aux. Accumulator
R577
R576
This instruction stores the accumulator to R450
and R451. R450 and R451 now contain the digital
value, which is 1720.
1
7
2
0
Accumulator
1
7
2
0
Store in R451 & R450
R451
R450