Updating
all
By using the Immediate instructions found in the DL440 and DL450 CPUs, you can
Channels in a
easily update all four channels in a single scan. Before choosing this method,
Single Scan,
remember the Immediate instructions slow the CPU scan time. To minimize this
impact, change the SP1 (Always On) contact to an X, C, etc. permissive contact that
DL440/450
5
4
4
only updates the channels as required. This example assumes you are using binary
format and already have the data loaded in V3001, V3002, V3003, and V3004 for
430
440
450
channels 1 – 4 respectively. This example will not work with DL430 CPUs.
NOTE: This program will not work in a remote/slave arrangement. Use one of the
programs shown that reads one channel per scan.
Channel 1 Example
SP1
The remaining channels are updated with a similar program segment. The only
changes are the location of the data for each channel (V3002, V3003, and V3004)
and the second LD instruction. The constant loaded with the second LD instruction
is different for each channel. The following example shows where these differences
occur.
Changes for channels 2 – 4
SP1
V location changes
Constant changes
F4–04DAS–1 4-Channel Isolated 4–20mA Output
LD
V3001
OUTIF
K16
LD
K8000
OUTIF
K16
LD
V3002
OUTIF
K16
LD
K8001
OUTIF
K16
The LD instruction loads the data into the
accumulator. Specifiying V3001 selects channel 1.
The OUTIF instruction sends 16 bits to the data
Y20
word. Our example starts with Y20, but the actual
value depends on the location of the module in your
application.
Loads the constant 8000 into the accumulator.
The OUTIF instruction sends 16 bits to the data
Y40
word. Our example starts with Y40, but the actual
value depends on the location of the module in your
application.
The LD instruction loads the data into the
accumulator. Specifying V3002 selects channel 2.
Here are the locations for each of the four channels.
Location Channel
V3001
1
V3002
2
V3003
3
V3004
4
Y20
The OUTIF instruction sends 16 bits to the data
word. Our example starts with Y20, but the actual
value depends on the location of the module in your
application.
Loads the constant 8001 into the accumulator.
The OUTIF instruction sends 16 bits to the data word.
Y40
Our example starts with Y40, but the actual value
depends on the location of the module in your
application. The following constants are used.
Constant Channel
K 8000
1
K 8001
2
K 8002
3
K 8003
4
17–15
Need help?
Do you have a question about the DL405 and is the answer not in the manual?
Questions and answers