DL205 Analog Manual, 7th Edition Rev. D
11-13
Chapter 11: F2-08DA-2, 8-Channel Analog Voltage Output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
b
C
D
The Conversion Program
This example program shows how to write the program to perform the engineering unit
conversion to output data formats 0–4095. This example assumes that a BCD value has been
stored in V2300 and V2301 for channels 1 and 2 respectively.
NOTE: The DL205 has many instructions available so that math operations can simply be performed using BCD format.
Do the math in BCD, then convert to binary before writing to the module output.
TheLD instruction loads theengineering units used with channel 1into
theaccumulator.Thisexample assumesthe numbers areBCD.Since
SP1 is used, this rung automatically exec utes on everyscan. Youcoul
also useanX,C,etc.permissivecontact.
LD
V2300
SP1
MUL
K4095
DIV
K1000
Multiply theaccumulatorby4095 (tostart theconversion).
Divide theaccumulator by 1000(because we usedamultiplierof 10,
we have to use 1000instead of 100).
OUT
V2000
Storethe BCDresultinV2000 (the actual steps required to send the
data areshown later).
TheLD instruction loads theengineering units used with channel 2into
theaccumulator.Thisexample assumesthe numbers areBCD.Since
SP1 is used, this rung automatically exec utes on everyscan. Youcoul
also useanX,C,etc.permissivecontact.
LD
V2301
SP1
MUL
K4095
DIV
K1000
Multiply theaccumulator by 4095(to startthe conversion).
Divide theaccumulatorby 1000(becauseweusedamultiplier of 10,
we have to use 1000instead of 100).
OUT
V2001
Storethe BCDresultinV2001 (the actual steps required to send the
data areshown later).