Automation Direct DL405 User Manual page 309

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

Example 3
Continued
V1500
=
F4–08DA–1 8-Ch. Analog Current Output
Load the number of the channel to be updated back into the
LD
accumulator again (the channel data is moved to the first data
V1500
stack location).
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
This instruction moves the channel
SHFL
select bit(s) into the proper location. We'll
K12
use it later when we send the 16-bit data
word to the 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
Set the Output Enable bit, by combining the value of 8000 hex with the
ORD
accumulator value. This sets bit 15 to "1", enabling all channels.
K8000
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
Earlier in the program the data value was placed into the first data
ADDBS
stack location. The ADDBS instruction adds the value currently in the
accumulator with the value in the first data stack location.
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
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Stack
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
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 lower 16 bits stored in the accumulator to the analog module.
OUTF
Y20
The lowest 12 bits contain the analog data. Bits 12, 13, and 14 are the
K16
channel selection bits. Bit 15 is the Output Enable bit.
Increment Channel Index
Increment the channel index value. This allows the logic to cycle
INCB
through all eight channels.
V1500
Reset Channel Index
K8
When channel 8 has been updated, then reset the channel selection
LD
memory location to 0 (remember, 0 represents channel 1).
K0
OUT
V1500
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 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
1 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
1 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 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
1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 1
Data for Analog Module
15–19

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

Table of Contents