Automation Direct DL405 User Manual page 284

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

Example 4
Continued
V1500
=
Mask off the upper four bits of the word, just in case the data value is out
ANDD
of range (greater than 4095).
KFFF
Earlier in the program the channel selection portion of the data word
OR
was created and stored in V1501. Now we can OR this location with
V1501
the data word currently in the accumulator to get the final data word
that is ready to be sent to the analog module.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
V1501
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Set the Output Enable bit, by combining the value of 4000 hex with the
ORD
accumulator value. This sets bit 14 to "1", enabling all channels.
K4000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Send the data stored in the lower half of the accumulator to the analog
OUT
module (the OUT instruction ignores the upper 16 bits of the
V40501
accumulator). The most significant four bits of the analog word contain
the channel selection bits. The remaining 12 bits contain the analog
data.
Increment the channel selection value. This allows the logic to cycle
INCB
through all four channels.
V1500
K4
When channel four has been updated, this instruction resets the
LD
channel selection memory location to 0 (remember, 0 represents
K0
channel 1).
OUT
V1500
F4–04DA–2 Analog Voltage Output
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1
+
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1
Data for Analog Module
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 1 1 0 0 1 0 0 1 0 1 0 0 1
14–23

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL405 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents