Sequencing Example 4, Dl430 - Automation Direct DL405 User Manual

Analog
Hide thumbs Also See for DL405:
Table of Contents

Advertisement

16–22
F4–16DA–1 16-Ch. Analog Current Output
Sequencing
Example 4,
DL430
4
4
4
430
440
450
The following program example shows how to send digital values to the module
when you have more than one channel. This example also works for DL440 and
DL450 CPUs. It assumes you are using the following data locations.
V-Memory Locations for Output Data in Example 4
Channel Number
1
V–Memory Storage
3000
Channel Number
9
V–Memory Storage
3010
The channel index is stored in V1500. It varies from 0 to 7, pointing to pairs of
channels as shown: 0 = ch. 1 and 9, 1 = ch. 2 and 10, ... and 7 = ch. 8 and16. This
example assumes V1500 is initialized to "0" earlier in the program.
The first portion of the program updates one channel from the first bank of eight
channels (1 to 8) during each scan. The program comments for this portion also
show the accumulator status at each step. The second part of the program updates
one channel from the second bank of eight channels (9 to 16) during each scan
(accumulator status not shown, for brevity). So, there are two channels which are
updated on each scan. The last portion of the program increments the channel
index number and resets it after eight scans.
Channels 1 to 8
SP1
LD
V1500
Always On
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
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
SHFL
K12
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
OUT
V1501
LD
V1500
2
3
4
3001
3002
3003
10
11
12
3011
3012
3013
This loads the number of the channel to be updated into the
accumulator. The channels are 1–8, but the values in V1500 range
from 0–7 and correspond to the channels. We'll use channel 2 as an
example.
0
0
0
0
0
0
0
0
Acc.
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
This instruction moves the channel
selection bit(s) 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
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Store the channel selection portion of the data word in V1501
temporarily. We'll have to use it again later.
Load the channel selection from V1500 once again.
0
0
0
0
0
0
0
0
Acc.
5
6
7
3004
3005
3006
3007
13
14
15
3014
3015
3016
3017
V1500
0
0
0
1
V1500 in accumulator.
V1500
0
0
0
1
8
16

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?

Subscribe to Our Youtube Channel

Table of Contents