DL205 Analog Manual, 7th Edition Rev. D
13-12
Chapter 13: F2-02DAS-2, 0-5V, 0-10V, 2-Channel Isolated Analog Output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Engineering Units Conversion
This example program shows how to write the program to perform the engineering unit
conversion to output data formats 0–65535 when using a D2-250 CPU. This example
assumes that a BCD value has been stored in V2300 for channel 1.
The LD instruction loads the engineering units used with channel 1 into
the accumulator. This example assumes the numbers are BCD. Since
SP1 is used, this rung automatically executes on every scan. An X, C, etc.
could also be used as a permissive contact.
LD
V2300
SP1
BIN
BTOR
Convert BCD number to binary number.
Convert binary number to real number.
MULR
R65535
Multiply the accumumlator by 65535 to start the conversion.
Divide the accumulator by 1000 (1000 = 100.0%).
DIVR
R1000
RTOB
BCD
Convert the result to binary.
Convert the result to BCD.
OUTD
V2000
Store the BCD double word result in V2000 / V2001.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
b
C
D
Содержание DL205
Страница 1: ...DL205 Analog I O Manual Manual Number D2 ANLG M ...
Страница 2: ...Notes ...
Страница 6: ...Notes ...