18–16
F4–04DAS–2 4-Channel Isolated 0–5V, 0–10V Output
Updating
all
Channels in a
Single Scan
5
4
4
430
440
450
By using the Immediate instructions found in the D4–440 and D4–450 CPUs, you
can easily update all four channels in a single scan. Before choosing this method,
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
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
channels 1 – 4 respectively. This example will not work with D4–430 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
The LD instruction loads the data into the
LD
accumulator. Specifiying V3001 selects channel 1.
V3001
The OUTIF instruction sends 16 bits to the data
OUTIF
Y20
word. Our example starts with Y20, but the actual
K16
value depends on the location of the module in your
application.
LD
Loads the constant 8000 into the accumulator.
K8000
The OUTIF instruction sends 16 bits to the channel
OUTIF
Y40
select word. Our example starts with Y40, but the
K16
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.
LD
Here are the locations for each of the four channels.
V3002
Location Channel
V3001
V3002
V3003
V3004
OUTIF
Y20
The OUTIF instruction sends 16 bits to the data
word. Our example starts with Y20, but the actual
K16
value depends on the location of the module in your
application.
LD
Loads the constant 8001 into the accumulator.
K8001
The OUTIF instruction sends 16 bits to the channel
OUTIF
Y40
select word. Our example starts with Y40, but the
K16
actual value depends on the location of the module in
your application. The following constants are used.
Constant Channel
K 8000
K 8001
K 8002
K 8003
1
2
3
4
1
2
3
4
Need help?
Do you have a question about the DL405 and is the answer not in the manual?