Example 3 Continued - Automation Direct DL405 User Manual

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

12–20
F4–04DA 4-Channel Analog Output
Example 3
Continued
INV
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
SHFL
K12
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
ADDBS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Acc.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
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
OUTF
Y20
K16
INCB
V1500
V1500
K3
LD
=
K0
OUT
V1500
This inverts the accumlator bits. Remember, this module activates the
channels when they are off, so the channel selection bit needs to be a
zero. That's why we use the invert instruction.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
This instruction moves the channel
selection bit into the proper location.
We'll use it later when we send the 16-bit
data word to the module.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 1 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 stack
location. The ADDBS instruction adds the value currently in the lower 16
bits of the accumulator to the value in the first data stack location.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 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 1 0 1 1 0 0 1 0 0 1 0 1 0 0 1
Sends the first 16 bits stored in the accumulator to the analog module.
The most significant four bits of the analog word contain the channel
selection bits. The remaining 12 bits contain the analog data.
Increments the channel selection value. This allows the logic to cycle
through all four channels.
When channel 4 has been updated, then reset the channel selection
memory location to 0 (remember, 0 is for channel 1).
Data for Analog Module

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