Chapter 16

Chapter 16
F4–16DA–1
16-Channel Analog
Current Output
In This Chapter. . . .
Ċ Module Specifications
Ċ Connecting the Field Wiring
Ċ Module Operation
Ċ Writing the Control Program
16
F4–16DA–1
16-Ch. Analog Output
16–2
F4–16DA–1 16-Ch. Analog Current Output
Module Specifications
The F4–16DA–1 Analog Current Output
module provides several features and
benefits.
ANALOG
OUTPUT
F4–16DA–1
S
S
S
S
S
Analog Output
Configuration
Requirements
It provides sixteen channels of
4–20 mA single ended current
outputs.
Analog outputs are optically
isolated from PLC logic
components.
The module has a removable
terminal block, so the module
can be easily removed or
changed without disconnecting
the wiring.
From two to sixteen analog
outputs may be updated in one
CPU scan (DL440 and DL450
CPUs only).
No jumper settings are
required.
4mA–20mA
CH2
–I
CH4
–I
CH6
–I
CH8
–I
CH10
–I
CH12
–I
CH14
–I
CH16
–I
CH1
–I
CH3
–I
CH5
–I
CH7
–I
CH9
–I
CH11
–I
CH13
–I
CH15
–I
0V
0V
+
24 VDC 0.1 A
–
The F4–16DA–1 Analog Output module requires 32 discrete output points from the
CPU. The module can be installed in any slot of a DL405 system, including remote
bases. The limitations on the number of analog modules are:
S For local and expansion systems, the available power budget and
discrete output points.
S For remote I/O systems, the available power budget and remote I/O
points.
F4–16DA–1 16-Ch. Analog Current Output
16–3
Output
Specifications
General
Module
Specifications
Number of Channels
16, single ended (one common)
Output Range
4–20 mA current
Resolution
12 bit (1 in 4095)
Output Type
Outputs sink 4–20 mA from external supply
Peak Output Voltage
40 VDC (no transient voltage suppression)
External Load Resistance
0–480W @ 18V, 220–740W @ 24V,
1550–1760 W @ 48V
Maximum Loop Supply
48 VDC (with load resistance in proper range)
Crosstalk
–70 dB, $1 count maximum
Linearity Error (end-to-end)
and Relative Accuracy
$1 count maximum (20mA at 25_C)
Full Scale Calibration Error
(offset error included)
$8 counts maximum (20mA at 25_C)
Offset Calibration Error
$3 counts maximum (4mA at 25_C)
Maximum Inaccuracy
$0.2% @ 25_C (77°F)
$0.4% @ 0 to 60_C (32 to 140°F)
Conversion Time
400 ms maximum, for full scale change
4.5 to 9 mS for digital output to analog out
Digital Output Points Required
32 point (Y) outputs,
2 sets each of 12 bits binary data, 3 bits
channel select, 1 bit output enable
Power Budget Requirement
90 mA @ 5 VDC (supplied by base)
External Power Supply
21.6 – 26.4 VDC, 100 mA, class 2
(add 20 mA for each current loop used)
Accuracy vs. Temperature
$57 ppm / _C full scale calibration range
(including maximum offset change, 2 counts)
Operating Temperature
0 to 60_C (32 to 140°F)
Storage Temperature
–20 to 70_C (–4 to 158°F)
Relative Humidity
5 to 95% (non-condensing)
Environmental Air
No corrosive gases permitted
Vibration
MIL STD 810C 514.2
Shock
MIL STD 810C 516.2
Noise Immunity
NEMA ICS3-304
F4-16DA-1
16-Ch. Analog Output
The following tables provide the specifications for the F4–16DA–1 Analog Output
Module. Review these specifications to ensure the module meets your application
requirements.
F4–16DA–1
16-Ch. Analog Output
16–4
F4–16DA–1 16-Ch. Analog Current Output
Connecting the Field Wiring
Wiring Guidelines
Your company may have guidelines for wiring and cable installation. If so, you
should check those before you begin the installation. Here are some general things
to consider.
S Use the shortest wiring route whenever possible.
S Use shielded wiring and ground the shield at the module or the power
supply return (0V). Do not ground the shield at both the module and the
transducer.
S Do not run the signal wiring next to large motors, high current switches,
or transformers. This may cause noise problems.
S Route the wiring through an approved cable housing to minimize the
risk of accidental damage. Check local and national codes to choose
the correct method for your application.
User Power
Supply
Requirements
The F4–16DA–1 requires at least one field-side supply. You may use the same or
separate power sources for the module supply and loop supply. The module
requires 21.6 to 26.4 VDC, Class 2, at 100mA current. The sixteen current loops
require 18 to 48 VDC, at 20 mA each.
The DL430/440/450 CPUs, D4–RS Remote I/O Controller, and D4–EX Expansion
Units have built-in 24 VDC power supplies that provide up to 400mA of current. You
may use one of these instead of a separate supply if there is only one F4–16DA–1
module with 15 channels or fewer in use. The current required is 100 mA (module),
plus 320 mA (sixteen current loops) for a total of 420 mA.
In some situations it’s desirable to power the loops separately due to power budget
or due to their remote location from the PLC. This will work, as long as the loop
supply meets the voltage and current requirements, and its minus (–) side and the
module supply’s minus (–) side connect together.
Load
Requirements
Each channel in use must have a load impedance within a range determined by the
loop supply voltage: 0–480W @ 18V, 220–740W @ 24V,1550-1760W @ 48V.
Unused channels must be left disconnected.
WARNING: If you are using the 24 VDC base power supply, make sure you
calculate the power budget. Exceeding the power budget can cause unpredictable
system operation that can lead to a risk of personal injury or damage to equipment.
16–5
F4–16DA–1 16-Ch. Analog Current Output
Wiring Diagram
The F4–16DA–1 module has a removable connector to make wiring easier. Simply
loosen the retaining screws and gently pull the connector from the module. The
diagram shows separate module and loop supplies for channel 16. If you desire to
use only one field-side supply, just combine the supplies’ positive terminals into one
node, and remove the loop supply.
NOTE 1: Shields should be connected to the 0V of the User Power
Supply at the module terminal block.
NOTE 2: Unused current outputs should remain open (no connections).
ANALOG
Typical User Wiring
F4–16DA–1
See NOTE 1
CH1
0–1K ohms
CH2
0–1K ohms
Current
Output
CH1
CH2
Current
Output
Internal module circuitry
4–20mA current sinking
(same)
CH5
D/A
CH7
D/A
D/A
CH9
CH10
CH12
CH14
CH16
Current
Output
(same)
4–20mA curr. sink.
D/A
24V
+
–
User Supply
21.6 – 26.4 VDC
100mA
Add 20mA for each
4–20mA loop powered
from this supply
CH10
–I
D/A
CH12
–I
D/A
CH14
–I
CH16
–I
0V
+
–
18–48 VDC
Optional
Loop Supply
D/A
D/A
0V
0V
D/A
D/A
CH13
CH6
–I
CH8
–I
D/A
CH11
CH16
CH4
–I
D/A
CH8
CH15
CH2
–I
D/A
D/A
CH6
0–1K ohms
D/A
D/A
CH3
CH4
(same)
4mA–20mA
Internal
DC/DC
Converter
CH1
–I
CH3
–I
CH5
–I
CH7
–I
CH9
–I
CH11
–I
CH13
–I
CH15
–I
0V
0V
+
24 VDC 90mA
–
OUTPUT
F4-16DA-1
16-Ch. Analog Output
Removable
Connector
F4–16DA–1
16-Ch. Analog Output
16–6
F4–16DA–1 16-Ch. Analog Current Output
Module Operation
DL430 Special
Requirements
Even though the module can be placed in any slot, it is important to examine the
configuration if you’re using a DL430 CPU. As you’ll see in the section on writing the
program, you use V-memory locations to send the analog data. As shown in the
following diagram, if you place the module so the output points do not start on a
V-memory boundary, the instructions can’t access the data.
F4–16DA–1
Correct!
8pt
Output
Y0
–
Y7
8pt
Output
32pt
Output
V40501
LSB
YY
5 4
0 7
Y
4
0
MSB
LSB
Y
3
7
YY
3 2
0 7
Y
2
0
F4–16DA–1
Wrong!
8pt
Output
Y0
–
Y7
Y
5
7
16pt
Input
V40503
V40502
MSB
MSB
16pt
Input
Y10 Y20 Y60
–
–
–
Y17 Y57 Y77
V40500
Y
5
7
16pt
Output
32pt
Output
8pt
Output
16pt
Output
16pt
Input
16pt
Input
Y10 Y50 Y60
–
–
–
Y47 Y57 Y77
Data is split over three locations, so instructions cannot access data from a DL430
V40502
V40501
V40500
LSB MSB
LSB MSB
Y Y
5 4
0 7
Y Y
4 3
0 7
Y Y
3 2
0 7
Y Y
2 1
0 7
Y Y
1 7
0
LSB
Y
0
F4–16DA–1 16-Ch. Analog Current Output
16–7
Channel
Scanning
Sequence
The F4–16DA–1 module allows you to update the channels in any order. Your
control program determines which channels get updated on any given scan. The
channels are organized as two banks of outputs, eight channels each. A typical
ladder program will update one channel in each bank, or two channels per CPU
scan. So, all sixteen channels can be updated every eight scans. With a DL440 or
DL450 CPU, you can use Immediate instructions to update all sixteen channels in
the same scan (we’ll show you how to do this later).
Scan
Read inputs
Scan N
Channel 1
Channel 9
Execute Application Program
Calculate the data
Scan N+1
Channel 2
Channel 10
Scan N+2
Channel 3
Channel 11
Write data
Scan N+3
Channel 4
Channel 12
Channel 5
Scan N+4
Write to outputs
Scan N+5
Channel 13
Channel 6
Channel 14
Scan N+6
Channel 7
Channel 15
Scan N+7
Channel 8
Channel 16
Scan N+8
Channel 1
Channel 9
F4-16DA-1
16-Ch. Analog Output
Before you begin writing the control program, it is important to take a few minutes to
understand how the module processes and represents the analog signals.
F4–16DA–1
16-Ch. Analog Output
16–8
F4–16DA–1 16-Ch. Analog Current Output
Output Bit
Assignments
You may recall the F4–16DA–1 module requires 32 discrete output points from the
CPU. These points provide:
S The digital representation of two analog signals per scan.
S Identification of the two channels that are to receive the data.
S Output enable control for all channels.
Since all output points are automatically mapped into V-memory, it is very easy to
determine the location of the two data words that will be assigned to the module.
F4–16DA–1
8pt
Output
8pt
Output
Y0
–
Y7
32pt
Output
16pt
Output
V40503
V40502
V40501
MSB
LSB
Y
5
7
8
7
6
16pt
Input
Y10 Y20 Y60
–
–
–
Y17 Y57 Y77
V40500
Bit 15 14 13 12 11 10 9
16pt
Input
5
4
YY
5 4
0 7
Channels 9–16
3
2
1
0
Y
4
0
MSB
LSB
Bit 15 14 13 12 11 10 9
Y
3
7
8
7
6
5
4
Y Y
3 2
0 7
3
2
1
0
Y
2
0
Channels 1–8
Within these V-memory locations the individual bits represent specific information
about the channels selected and the analog signals.
F4–16DA–1 16-Ch. Analog Current Output
Output bits 12, 13, and 14 of both data words are the channel select outputs. They
are binary encoded to select the channel that will be updated with the data. The
bits of the lower data word select channels 1 to 8 as follows.
Bit
14
Off
Off
Off
Off
On
On
On
On
Bit
13
Off
Off
On
On
Off
Off
On
On
Bit
12
Off
On
Off
On
Off
On
Off
On
V40501
Channel
1
2
3
4
5
6
7
8
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– Channel Select Bits,
channels 1 through 8
The bits of the upper data word select channels 9 to 16 as follows.
Bit
14
Off
Off
Off
Off
On
On
On
On
Output Enable
Bits
Bit
13
Off
Off
On
On
Off
Off
On
On
Bit
12
Off
On
Off
On
Off
On
Off
On
V40502
Channel
9
10
11
12
13
14
15
16
Output bit 15 is the Output Enable
control bit in each data word for all eight
channels of each bank. When either bit
is off, the corresponding group of eight
channel output currents decrease to
their lowest level, which is 4 mA for
connected loads. Disabling the outputs
also clears all eight output data registers
for each bank. To resume analog output
levels, first the appropriate Output
Enable control bit must turn on. Then,
the CPU must write new data to each
channel to restore the output current for
that channel.
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– Channel Select Bits,
channels 9 through 16
V40501
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– Output Enable Bit,
channels 1 through 8
V40502
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– Output Enable Bit,
channels 9 through 16
OFF = Disable (and clear)
ON = Enable
F4-16DA-1
16-Ch. Analog Output
Channel Select
Bits
16–9
F4–16DA–1
16-Ch. Analog Output
16–10
F4–16DA–1 16-Ch. Analog Current Output
Analog Data
Bits
The first twelve bits of both V-memory
locations represent the analog data in
binary format.
Bit
Value
Bit
Value
0
1
6
64
1
2
7
128
2
4
8
256
3
8
9
512
4
16
10
1024
5
32
11
2048
V40501
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– data bits,
channels 1 through 8
V40502
MSB
LSB
1 1 1 1 11 9 8 7 6 5 4 3 2 1 0
5 4 3 2 10
– data bits,
channels 9 through 16
Module
Resolution
Since the module has 12-bit resolution,
the analog signal is made of 4096 counts
ranging from 0 – 4095 (212). For the 4 to
20 mA scale, sending a 0 produces a 4
mA signal, and 4095 gives a 20 mA
signal. This is equivalent to a binary
value of 0000 0000 0000 to 1111 1111
1111, or 000 to FFF hexadecimal. The
graph to the right shows the linear
relationship between the data value and
output signal level.
Each count can also be expressed in
terms of the signal level by using the
equation shown. The following table
shows the smallest signal change that
occurs when the digital value is
increased by 1 LSB.
20mA
4mA
0
4095
Resolution + H * L
4095
H = high limit of the signal range
L = low limit of the signal range
Signal Range
Span
(H – L)
Divide By
Smallest Change
4 to 20mA
16mA
4095
3.91 mA
F4–16DA–1 16-Ch. Analog Current Output
16–11
Update Any
Channel
As mentioned earlier, you can update two channels per scan using regular I/O
instructions, or any number of channels per scan using immediate I/O instructions.
The following diagram shows the data locations for an example system. You use
the channel select outputs to determine which channels get updated (more on this
later).
F4–16DA–1
8pt
Output
Y0
–
Y7
8pt
Output
32
Output
16pt
Output
16pt
Input
Y10 Y20 Y60
–
–
–
Y17 Y57 Y77
V40500
V40503
V40501
V40502
MSB
16pt
Input
LSB
MSB
LSB
Data Bits
Channel
Select Bits
Output
Enable Bit
Channels 9 – 16
Calculating the
Digital Value
Your program has to calculate the digital
value to send to the analog module.
There are many ways to do this, but most
applications are understood more easily
if you use measurements in engineering
units. This is accomplished by using the
conversion formula shown.
You may have to make adjustments to
the formula depending on the scale you
choose for the engineering units.
Data Bits
Channel
Select Bits
Output
Enable Bit
Channels 1 – 8
A + U 4095
H*L
A = Analog value (0 – 4095)
U = Engineering Units
H = high limit of the engineering
unit range
L = low limit of the engineering
unit range
F4-16DA-1
16-Ch. Analog Output
Writing the Control Program
F4–16DA–1 16-Ch. Analog Current Output
F4–16DA–1
16-Ch. Analog Output
16–12
Consider the following example which
controls pressure from 0.0 to 99.9 PSI.
By using the formula, you can easily
determine the digital value that should
be sent to the module. The example
shows the conversion required to yield
49.4 PSI. Notice the formula uses a
multiplier of 10. This is because the
decimal portion of 49.4 cannot be
loaded, so you adjust the formula to
compensate for it.
A + 10U
4095
10(H * L)
A + 494
4095
1000 * 0
A + 2023
Here is how you would write the program to perform the engineering unit
conversion. This example assumes you have calculated or loaded the engineering
unit value and stored it in V3000. Also, you have to perform this for all sixteen
channels if you’re using different data for each channel.
NOTE: The DL405 offers various instructions that allow you to perform math
operations using binary, BCD, etc. It’s usually easier to perform any math
calculations in BCD and then convert the value to binary before you send the data to
the module. If you are using binary math, you do not have to include the BIN
conversion.
X1
LD
V3000
When X1 is on, the engineering units (stored in V3000) are loaded
into the accumulator. This example assumes the numbers are BCD.
MUL
K4095
Multiply the accumulator by 4095 (to start the conversion).
DIV
K1000
Divide the accumulator by 1000 (because we used a multiplier of 10,
we have to use 1000 instead of 100).
BIN
Convert the BCD number to binary (you must omit this step if you
have converted the data elsewhere).
Store the result in V3101. This is the digital value, in binary form, that
should be sent to the module.
OUT
V3101
V-Memory
Registers
The ladder program examples that follow occasionally use certain V-memory
register addresses in the CPU that correspond to 16-bit Y output modules. Use the
table below to find the V-memory address for the particular slot of your analog
module. See Appendix A for additional addresses for DL450 CPUs.
V-Memory Register Addresses for 16-Point Output (Y) Locations
Y
000
020
040
060
100
120
140
160
200
220
V 40500 40501 40502 40503 40504 40505 40506 40507 40510 40511
Y
240
260
300
320
340
360
400
420
440
460
V 40512 40513 40514 40515 40516 40517 40520 40521 40522 40523
F4–16DA–1 16-Ch. Analog Current Output
430 440 450
The following two programs show you how to update a single channel. Notice the
DL440/DL450 and DL430 CPUs use slightly different programs, although the
DL430 example will also work with DL440 and DL450 CPUs. Since the DL430 does
not support the OUTF instruction, the program must be modified to make sure the
channel select bits are not accidentally changed by the data in the accumulator.
This example assumes you already have the data loaded in V3001.
SP1
LD
V3001
The LD instruction loads the data for channel 1 into
the accumulator. Since SP1 is used, this rung
automatically executes on every scan. You could
also use an X, C, etc. permissive contact.
BIN
The BIN instruction converts the accumulator data
to binary (you must omit this step if you’ve already
converted the data elsewhere).
OUTF Y20
K12
The OUTF sends the 12 bits to the data word. Our
example starts with Y20, but the actual value depends
on the location of the module in your application.
Y36
Turn Y36, Y35, and Y34 off to update Channel 1.
RST
Y36
Y35
Y34
Channel
Off
Off
Off
Off
On
On
On
On
Off
Off
On
On
Off
Off
On
On
Off
On
Off
On
Off
On
Off
On
Ch. 1
Ch. 2
Ch. 3
Ch. 4
Ch. 5
Ch. 6
Ch. 7
Ch. 8
Y35
Select Channel
RST
Y34
RST
Y37
Enable Outputs
SET
Y57
RST
Turn on Y37 to enable all eight output channels of
the first bank.
Turn off Y57 to disable the second bank of
channels, 9 through 16.
F4-16DA-1
16-Ch. Analog Output
Sending Data to
One Channel,
DL440/450
5 4 4
16–13
F4–16DA–1
16-Ch. Analog Output
16–14
F4–16DA–1 16-Ch. Analog Current Output
Sending Data to
One Channel,
DL430
4 4 4
SP1
LD
V3001
The LD instruction loads the data for channel 1 into
the accumulator. Since SP1 is used, this rung
automatically executes every scan. You could also
use an X, C, etc. permissive contact.
BIN
The BIN instruction converts the accumulator data
to binary (you must omit this step if you’ve already
converted the data elsewhere).
430 440 450
The ANDD instruction masks off the channel select
bits to prevent an accidental channel selection.
ANDD
KFFF
OUT
V40501
Y36
RST
Y35
Select Channel
RST
Y34
RST
Y37
Enable Outputs
SET
The OUT instruction sends the data to the module. Our
example starts with V40501, but the actual value
depends on the location of the module in your
application.
Turn Y36, Y35, and Y34 off to update Channel 1.
Y36
Y35
Y34
Channel
Off
Off
Off
Off
On
On
On
On
Off
Off
On
On
Off
Off
On
On
Off
On
Off
On
Off
On
Off
On
Ch. 1
Ch. 2
Ch. 3
Ch. 4
Ch. 5
Ch. 6
Ch. 7
Ch. 8
Turn on Y37 to enable all eight output channels of
the first bank.
Y57
RST
Sequencing
the Channel
Updates
Turn off Y57 to disable the second bank of
channels, 9 through 16.
The next four example programs show you how to send digital values to the module
when you have more than one channel. These examples automatically update all
sixteen channels over eight scans. Channel updates occur in pairs, such as
channels 1 and 9, channels 2 and 10, and so on. This method uses the same binary
code for the channel select bits of both groups of outputs, simplifying the programs.
You may recall we stated earlier you could update all sixteen channels in the same
scan. That’s true, you can do that if you have a DL440/450 CPU; however, this can
increase the scan time and you may not always need to update all sixteen channels
on every scan. We show you how to do this later in this chapter.
The first two sequencing examples are fairly simple and will work in most situations.
We recommend these for new users. They use control relays C1 through C8 as
index numbers corresponding to the pair of channels updated on any particular
scan. At the end of each scan, only one control relay C1 through C8 is on. On each
subsequent scan, the next control relay energizes. The channel sequencing
automatically begins with channels 1 and 9 on the first scan, or after any disruption
in the logic.
The last two examples, 3 and 4, are slightly more complex. However, they do not
depend on the use of control relays to provide channel sequencing. Instead, they
use function boxes to increment a channel pointer value in V-memory. Then, other
instructions perform bit manipulations to position the channel select bits properly in
the output words to the module.
F4–16DA–1 16-Ch. Analog Current Output
The following program example shows how to send digital values to the module
when you have more than one channel. This example assumes you have already
loaded the data according to the following table. It is important to use the rungs in
the order shown for the program to work.
430 440 450
V-Memory Locations for Output Data in Examples 1 and 2
Channel Number
V-Memory Storage
Channel Number
V-Memory Storage
1
2
3
4
5
6
7
8
3000
3001
3002
3003
3004
3005
3006
3007
9
10
11
12
13
14
15
16
3010
3011
3012
3013
3014
3015
3016
3017
Ch8 and Ch16 Done
C10
C0
OUT
When channels 8 and 16 are updated, C0 restarts
the update sequence.
Ch7 and Ch15 Done
C7
When channels 7 and 15 have been updated, this
rung loads the data for channel 16 into the
accumulator. The second LD instruction places the
data for channel 8 in the accumulator and pushes
channel 16’s data onto the stack.
LD
V3017
LD
V3007
C10
OUT
Ch6 and Ch14 Done
C6
When channels 6 and 14 have been updated, this
rung loads the data for channel 15 into the
accumulator. The second LD instruction places the
data for channel 7 in the accumulator and pushes
channel 15’s data onto the stack.
LD
V3016
LD
V3006
C7
OUT
Ch5 and Ch13 Done
C5
Turning on C7 triggers the channel update (see the
channel select rungs).
When channels 5 and 13 have been updated, this
rung loads the data for channel 14 into the
accumulator. The second LD instruction places the
data for channel 6 in the accumulator and pushes
channel 14’s data onto the stack.
LD
V3015
LD
V3005
C6
OUT
Ch4 and Ch12 Done
C4
Turning on C10 triggers the channel update (see
the channel select rungs).
Turning on C6 triggers the channel update (see the
channel select rungs).
When channels 4 and 12 have been updated, this
rung loads the data for channel 13 into the
accumulator. The second LD instruction places the
data for channel 5 in the accumulator and pushes
channel 13’s data onto the stack.
LD
V3014
LD
V3004
C5
OUT
Turning on C5 triggers the channel update (see the
channel select rungs).
F4-16DA-1
16-Ch. Analog Output
Sequencing
Example 1,
DL440/450
5 4 4
16–15
F4–16DA–1
16-Ch. Analog Output
16–16
F4–16DA–1 16-Ch. Analog Current Output
Example 1
Continued
Ch3 and Ch11 Done
C3
When channels 3 and 11 have been updated, this
rung loads the data for channel 12 into the
accumulator. The second LD instruction places the
data for channel 4 in the accumulator and pushes
channel 12’s data onto the stack.
LD
V3013
LD
V3003
C4
OUT
Ch2 and Ch10 Done
C2
When channels 2 and 10 have been updated, this
rung loads the data for channel 11 into the
accumulator. The second LD instruction places the
data for channel 3 in the accumulator and pushes
channel 11’s data onto the stack.
LD
V3012
LD
V3002
C3
OUT
Ch1 and Ch9 Done
C1
LD
V3001
C2
OUT
Restart
C1
LD
V3010
C2 thru C10
LD
V3000
C1
OUT
Output the Data
SP1
(Replace this portion of the
program when using the
DL430 Example 2)
Turning on C3 triggers the channel update (see the
channel select rungs).
When channels 1 and 9 have been updated, this
rung loads the data for channel 10 into the
accumulator. The second LD instruction places the
data for channel 2 in the accumulator and pushes
channel 10’s data onto the stack.
LD
V3011
C0
Turning on C4 triggers the channel update (see the
channel select rungs).
BIN
OUTF Y20
K12
POP
BIN
OUTF Y40
K12
Turning on C2 triggers the channel update (see the
channel select rungs).
This rung loads the data for channel 9 into the
accumulator. The second LD instruction places the
data for channel 1 in the accumulator and pushes
channel 9’s data onto the stack. C0 restarts the
sequence after channels 8 and 16 are done (see
the top rung). The first scan or any interruption in
control relay sequencing is detected when control
relays C1 through C10 are off (all eight contacts are
not shown here due to space constraints). In this
case, we also start the sequence with channels 1
and 9.
Turning on C1 triggers the channel update (see the
channel select rungs).
This rung converts the accumulator data for
channels 1 through 8 (one per scan) to binary (you
must omit this step if you’ve already converted the
data elsewhere). It also loads the data to the
appropriate bits of the data word for the first bank of
eight channels. Our example starts with Y20, but
the actual value depends on the location of the
module in your application.
We move the data for channels 9 through 16 (one
per scan) from the stack to the accumulator.
This rung converts the accumulator data for
channels 9 through 16 to binary (you must omit this
step if you’ve already converted the data
elsewhere). It also loads the data to the appropriate
bits of the data word for the second bank of eight
channels. In our example, it is Y40, but the actual
value depends on the location of the module in your
application.
F4–16DA–1 16-Ch. Analog Current Output
C2
Select Channel,
binary encoded
Y34
OUT
Y54
OUT
C4
C6
C10
C3
Select Channel, cont’d
Y35
OUT
Set Y36, Y35, and Y34 to the binary code which
selects the output channel 1 through 8, based on the
control relay status. We use the same binary code to
select channels 9 through 16.
CR(on)
Y36,Y56 Y35,Y55 Y34,Y54 Channels
C1
C2
C3
C4
C5
C6
C7
C10
Off
Off
Off
Off
On
On
On
On
Off
Off
On
On
Off
Off
On
On
Off
On
Off
On
Off
On
Off
On
Ch. 1 and 9
Ch. 2 and 10
Ch. 3 and 11
Ch. 4 and 12
Ch. 5 and 13
Ch. 6 and 14
Ch. 7 and 15
Ch. 8 and 16
Y55
OUT
C4
C7
C10
C5
Select Channel, cont’d
Y36
OUT
Y56
OUT
C6
C7
C10
SP1
Enable Outputs
Y37
OUT
Enable channels 1 through 8. SP1 is always on.
Y57
OUT
Enable channels 9 through 16.
F4-16DA-1
16-Ch. Analog Output
Example 1
Continued
16–17
F4–16DA–1
16-Ch. Analog Output
16–18
F4–16DA–1 16-Ch. Analog Current Output
Sequencing
Example 2,
DL430
4 4 4
430 440 450
Since the DL430 does not support the OUTF instruction, the previous program
must be modified to make sure the channel select bits or the output enable bits are
not accidentally changed by the data in the accumulator. Replace the “Output the
Data” rung in the middle of Example 1 with the new rung below. Be sure to retain the
original order of the rungs shown in Example 1 for the program to work. This will also
work with DL440 and DL450 CPUs.
Output the Data
SP1
BIN
ANDD
KFFF
OUT
V40501
POP
BIN
ANDD
KFFF
OUT
V40502
This rung converts the accumulator data for
channels 1 through 8 (one per scan) to binary (you
must omit this step if you’ve already converted the
data elsewhere).
The ANDD instruction masks off the channel select
bits to prevent an accidental channel selection.
The OUT instruction sends the data to the module.
Our example starts with V40501 for the first bank of
8 channels, but the actual value depends on the
location of the module in your application.
We move the data for channels 9 through 16 (one
per scan) from the stack to the accumulator.
This rung converts the accumulator data for
channels 9 through 16 (one per scan) to binary (you
must omit this step if you’ve already converted the
data elsewhere).
The ANDD instruction masks off the channel select
bits to prevent an accidental channel selection.
The OUT instruction sends the data to the module.
Our example uses V40502 for the second bank of 8
channels, but the actual value depends on the
location of the module in your application.
16–19
F4–16DA–1 16-Ch. Analog Current Output
The following program example shows how to send digital values to the module
when you have more than one channel. This example works only for DL440 and
DL450 CPUs. It assumes you are using the following data locations.
V-Memory Locations for Output Data in Example 3
430 440 450
Channel Number
V-Memory Storage
1
2
3
4
5
6
7
8
3000
3001
3002
3003
3004
3005
3006
3007
9
10
11
12
13
14
15
16
3010
3011
3012
3013
3014
3015
3016
3017
Channel Number
V-Memory Storage
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
shows 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). 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
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.
V1500
LD
V1500
Always On
Acc. 0
0
0
0
0
0
0
0
0
0
0
1
Use the channel selection value, which is now on the data stack, as an
offset from V3000 to load the channel data into the accumulator.
HEX Value in 1st
stack location
Octal
Octal
LDX
V3000
V 3
0
0
0
0
+
Acc. 0
1
0
=
0
V 3
0
0
1
2
3
4
5
0
The value in V3001 is
2345, which is slightly
over half scale.
Convert the BCD data to binary. Since the value can never be above
4095, only the 12 least significant bits of the accumulator are used.
BIN
0
0
0
0
2
3
4
5
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc. 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
0
0
1
1
1
BCD Value converted to binary now in accumulator.
ANDD
KFFF
Mask off the upper four bits of the word, just in case the data value is out
of range (greater than 4095).
F4-16DA-1
16-Ch. Analog Output
Sequencing
Example 3,
DL440/450
5 4 4
F4–16DA–1
16-Ch. Analog Output
16–20
F4–16DA–1 16-Ch. Analog Current Output
Example 3
Continued
Load the number of the channel to be updated back into the
accumulator again (the channel data is moved to the first data
stack location).
LD
V1500
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
0
0
0
0
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 15 14 13 12 11 10 9
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
0
0
4 3
2
1
0
0
0
0
0
1
0
8
7
6 5
4 3
2
1
0
0
0
0
0
0
0
0
0
0
0
8
7
6 5
4 3
2
1
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
accumulator with the value in the first data stack location.
ADDBS
Acc.
6 5
0
Set the Output Enable bit, by combining the value of 8000 hex with the
accumulator value. This sets bit 15 to “1”, enabling channels 1 through
8.
ORD
K8000
Acc.
7
0
This instruction moves the channel
select bit(s) into the proper location. We’ll
use it later when we send the 16-bit data
word to the module.
SHFL
K12
Acc.
8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
8
7
6 5
4 3
2
1
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 15 14 13 12 11 10 9
Stack
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
1
0
0
1
1
8
7
6 5
4 3
2
1
0
1
0
0
0
0
0
1
1
1
Data for Analog Module
OUTF Y20
K16
Send the lower 16 bits stored in the accumulator to the analog
module.. The lowest 12 bits contain the analog data. Bits 12, 13, and
14 are the channel selection bits. Bit 15 is the Output Enable bit. This
example uses Y20, but the actual value depends on the location of the
modules in your application.
F4–16DA–1 16-Ch. Analog Current Output
Channels 9 to 16
SP1
LD
V1500
Always On
LDX
V3010
BIN
ANDD
KFFF
LD
V1500
SHFL
K12
This loads the number of the channel to be updated into the
accumulator. The channels are 9–16, but the values in V1500 range
from 0–7 and correspond to the channels. We’ll use channel 10 as an
example.
Use the channel selection value, which is now on the data stack, as an
offset from V3010 to load the channel data into the accumulator.
Convert the BCD data to binary. Since the value can never be above
4095, only the 12 least significant bits of the accumulator are used.
Mask off the upper four bits of the word, just in case the data value is out
of range (greater than 4095).
Load the number of the channel to be updated back into the
accumulator again (the channel data is moved to the first data
stack location).
This instruction moves the channel select bit(s) into the proper location.
We’ll use it later when we send the 16-bit data word to the module.
ORD
K8000
Set the Output Enable bit, by combining the value of 8000 hex with the
accumulator value. This sets bit 15 to “1”, enabling channels 9 through
16.
ADDBS
Earlier in the program the data value was placed into the first data
stack location. The ADDBS instruction adds the value currently in the
accumulator with the value in the first data stack location.
OUTF Y40
K16
Send the lower 16 bits stored in the accumulator to the analog module.
The lowest 12 bits contain the analog data. Bits 12, 13, and 14 are the
channel selection bits. Bit 15 is the Output Enable bit. This example
uses Y20, but the actual value depends on the location of the modules
in your application.
Increment Channel Index
INCB
V1500
Increment the channel index value. This allows the logic to cycle
through all sixteen channels (8 pairs).
Reset Channel Index
V1500 K8
=
LD
K0
OUT
V1500
When channels 8 and 16 have been updated, then reset the channel
selection memory location to 0 (remember, 0 represents channel 1 and
channel 9).
F4-16DA-1
16-Ch. Analog Output
Example 3
Continued
16–21
F4–16DA–1
16-Ch. Analog Output
16–22
F4–16DA–1 16-Ch. Analog Current Output
Sequencing
Example 4,
DL430
4 4 4
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.
430 440 450
V-Memory Locations for Output Data in Example 4
Channel Number
V–Memory Storage
1
2
3
4
5
6
7
8
3000
3001
3002
3003
3004
3005
3006
3007
9
10
11
12
13
14
15
16
3010
3011
3012
3013
3014
3015
3016
3017
Channel Number
V–Memory Storage
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
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.
V1500
LD
V1500
Always On
Acc. 0
0
0
0
0
0
0
0
0
0
0
1
V1500 in accumulator.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
0
0
0
0
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 15 14 13 12 11 10 9
0
0
OUT
V1501
LD
V1500
7
6 5
4 3
2
1
0
0
0
0
0
0
0
1
0
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.
SHFL
K12
Acc.
8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
8
7
6 5
4 3
2
1
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.
V1500
Acc. 0
0
0
0
0
0
0
0
0
0
0
1
0
16–23
F4–16DA–1 16-Ch. Analog Current Output
Use the channel selection value, which is now on the data stack, as an
offset from V3000 to load the channel data into the accumulator.
HEX Value in 1st
Octal
Octal stack location.
LDX
V3000
V 3
0
0
0
0
+
Acc. 0
1
0
=
0
V 3
0
0
1
2
3
4
5
0
The value in V3001 is
2345, which is slightly
over half scale.
Convert the BCD data to binary. Since the value can never be above
4095, only the least significant 12 bits of the accumulator are used.
BIN
0
0
0
0
2
3
4
5
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc. 0
F4-16DA-1
16-Ch. Analog Output
Example 4
Continued
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
0
0
1
1
1
BCD Value converted to binary now in accumulator.
Mask off the upper four bits of the word, just in case the data value is out
of range (greater than 4095).
ANDD
KFFF
Earlier in the program the channel selection portion of the data word
was created and stored in V1501. Now we can OR this location with
the data word currently in the accumulator to get the final data word
that is ready to send to the analog module.
OR
V1501
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
1
0
0
1
1
+
15 14 13 12 11 10 9
V1501
0
0
0
1
0
0
0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
8
7
6 5
4 3
2
1
0
0
0
0
0
0
0
0
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
0
0
1
1
1
Data for Analog Module
Set the Output Enable bit, by combining the value of 8000 hex with the
accumulator value. This sets bit 15 to “1”, enabling channels 1 through
8.
ORD
K8000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
Acc.
0
0
0
OUT
V40501
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
8
7
6 5
4 3
2
1
0
1
0
0
0
0
0
1
1
1
Send the data stored in the lower half of the accumulator to the analog
module (the OUT instruction ignores the upper 16 bits of the
accumulator). The most significant four bits of the analog word contain
the channel selection bits. The remaining 12 bits contain the analog
data. This example uses V40501, but the actual value depends on the
location of the module in your application.
F4–16DA–1
16-Ch. Analog Output
16–24
F4–16DA–1 16-Ch. Analog Current Output
Example 4
Continued
Channels 9 to 16
SP1
LD
V1500
Load the channel selection from V1500 once again.
Always On
LDX
V3010
BIN
ANDD
KFFF
Use the channel selection value, which is now on the data stack, as an
offset from V3010 to load the channel data into the accumulator.
Convert the BCD data to binary. Since the value can never be above
4095, only the least significant 12 bits of the accumulator are used.
Mask off the upper four bits of the word, just in case the data value is out
of range (greater than 4095).
OR
V1501
Earlier in the program the channel selection portion of the data word
was created and stored in V1501. Now we can OR this location with
the data word currently in the accumulator to get the final data word
that is ready to send to the analog module.
ORD
K8000
Set the Output Enable bit, by combining the value of 8000 hex with the
accumulator value. This sets bit 15 to “1”, enabling channels 9 through
16.
OUT
V40502
Send the data stored in the lower half of the accumulator to the analog
module (the OUT instruction ignores the upper 16 bits of the
accumulator). The most significant four bits of the analog word contain
the channel selection bits and the output enable bit. The remaining 12
bits contain the analog data. This example uses V40502, but the actual
value depends on the location of the module in your application.
Increment Channel Index
INCB
V1500
Increment the channel index value. This allows the logic to cycle
through all sixteen channels (8 pairs).
Reset Channel Index
V1500 K8
=
LD
K0
OUT
V1500
When channels 8 and 16 have been updated, then reset the channel
selection memory location to 0 (remember, 0 represents channel 1 and
channel 9).
F4–16DA–1 16-Ch. Analog Current Output
430 440 450
By using the Immediate instructions found in the DL440 and DL450 CPUs, you can
easily update all sixteen channels in a single scan. This method slows 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 already have the data loaded in V3000 to V3007 for channels 1 to 7
respectively, and data loaded in V3010 to V3017 for channels 9 to 16 respectively.
NOTE: This program will not work in a remote/slave arrangement. Use one of the
programs shown that reads one channel per scan.
Initialize the Immediate Analog Output Pointers
SP1
LD
K8000
The LD instruction loads the data into the
accumulator. The constant K8000 represents
channel 1 and 9 selected, Output Enable bit is on.
OUT
V1401
We store the channel index pointer in V1401. The
program increments this in each pass, resetting it
after eight scans.
LDA
O3000
The Load Address instruction takes the octal 1401 and
converts it to hex, then puts it in the accumulator.
V3000 is the location wich contains the data for
channel 1.
OUT
V1402
LDA
O3010
OUT
V1403
V1402 contains the pointer for channel 1 to 8 data.
The Load Address instruction takes the octal 3010 and
converts it to hex, then puts it in the accumulator.
V3010 is the location which contains the data for
channel 9.
V1403 contains the pointer for channel 9 to 16 data.
The following FOR–NEXT loop updates all 16 channels in a single scan. The first
portion of the loop updates channels 1 through 8.
FOR-NEXT Loop
SP1
K8
FOR
The following FOR–NEXT loop updates channels 1
through 16. The valid range for the constant K is 2
to 8 for the module. For example, a value of 2 will
update channels 1 and 9, then 2 and 10.
Update Channels 1 - 8
SP1
LD
P1402
Load the analog output value into the accumulator.
V3000 = Ch. 1, V3001 = Ch. 2, ... V3007 = Ch. 8.
The number at V1402 is a pointer to the address of
the value.
BIN
Convert the data to binary. This step is optional,
and your program may do this conversion
elsewhere.
ANDD
KFFF
Mask off the channel select and output enable bits, so
they are not corrupted by data out of range.
OR
V1401
OUTIF Y20
K16
Combine the channel select and output enable bits. for
Y36, Y35, and Y34 with the data in the accumulator.
Immediately write the lower 16 bits of the accumulator
to the module’s lower data word. This updates
channels 1 through 8 during the FOR–NEXT loop. This
example uses Y20, but the actual value depends on
the location of the modules in your application.
F4-16DA-1
16-Ch. Analog Output
Updating All
Channels in a
Single Scan,
DL440/450
5 4 4
16–25
F4–16DA–1
16-Ch. Analog Output
16–26
F4–16DA–1 16-Ch. Analog Current Output
The second portion of the FOR–NEXT loop updates channels 9 through 16.
Update Channels 9 - 16
SP1
LD
P1403
Load the analog output value into the accumulator.
V3010 = Ch. 9, V3011 = Ch. 10, ... V3017 = Ch. 16.
The number at V1403 is a pointer to the address of
the value.
Convert the data to binary. This step is optional,
and your program may do this conversion
elsewhere.
BIN
ANDD
KFFF
Mask off the channel select and output enable bits, so
they are not corrupted by data out of range.
OR
V1401
Combine the channel select and output enable bits. for
Y56, Y55, and Y54 with the data in the accumulator.
OUTIF Y40
K16
Immediately write the lower 16 bits of the accumulator
to the module’s upper data word. This updates
channels 9 through 16 during the FOR–NEXT loop.
This example uses Y40, but the actual value depends
on the location of the modules in your application.
Now we increment the Immediate Analog Output Pointers for the next pair of
channels, before the next pass through the FOR-NEXT loop.
Increment Immediate Analog Output Pointers
SP1
INCB
V1402
Increment the analog output data pointer for channels 1
through 8.
INCB
V1403
Increment the analog output data pointer for channels 9
through 16.
LD
V1401
ADDB
K1000
OUT
V1401
Load the current channel index count into the
accumulator.
Add 1000 hex to the channel index value, since
the channel select field is in the most significant
four bits.
Save the incremented channel index value for the next
pass through the FOR–NEXT loop.
Here is the end of the FOR-NEXT loop.
NEXT
Execute the loop above the number of times specified in the FOR instruction.
The program above can be modified to immediately output any number of channel
pairs by changing the constant in the FOR instruction.
F4–16DA–1 16-Ch. Analog Current Output
430 440 450
You can also update just a pair of channels in a single scan by using the Immediate
instructions found in the DL440 and DL450 CPUs. By removing the FOR–NEXT
rungs and couple of other rungs, we create the example below. This example
assumes you will use one channel from the first eight, and a corresponding channel
from the second bank of eight. Also, the data must already be loaded in V1401 and
V1402 respectively.
Update the Channel
in Bank 1
SP1
LD
K8000
OUT
V1401
Load a constant representing the channel pair to be
updated into the accumulator.
Index
Channels
8000
9000
A000
B000
C000
D000
E000
F000
Ch. 1 and 9
Ch. 2 and 10
Ch. 3 and 11
Ch. 4 and 12
Ch. 5 and 13
Ch. 6 and 14
Ch. 7 and 15
Ch. 8 and 16
We store the channel index in V1401.
LD
V1402
Load the analog output value for the channel in bank
1 from V1402 into the accumulator.
BIN
Convert the data to binary. This step is optional,
and your program may do this conversion
elsewhere.
ANDD
KFFF
Mask off the channel select and output enable bits, so
they are not corrupted by data out of range.
OR
V1401
OUTIF Y20
K16
Update the Channel
in Bank 2
LD
V1403
BIN
ANDD
KFFF
Combine the channel select and output enable bits. for
Y36, Y35, and Y34 with the data in the accumulator.
Immediately write the lower 16 bits of the accumulator
to the module’s lower data word. This updates a
channel in the first bank of eight. This example uses
Y20, but the actual value depends on the location of
the modules in your application.
Load the analog output value for the channel in bank
2 from V1403 into the accumulator.
Convert the data to binary. This step is optional,
and your program may do this conversion
elsewhere.
Mask off the channel select and output enable bits, so
they are not corrupted by data out of range.
OR
V1401
Combine the channel select and output enable bits. for
Y56, Y55, and Y54 with the data in the accumulator.
OUTIF Y40
K16
Immediately write the lower 16 bits of the accumulator
to the module’s upper data word. This updates a
channel in the second bank of eight. This example
uses Y40, but the actual value depends on the location
of the modules in your application.
F4-16DA-1
16-Ch. Analog Output
Updating a Pair
of Channels in
a Single Scan,
DL440/450
5 4 4
16–27
F4–16DA–1
16-Ch. Analog Output
16–28
F4–16DA–1 16-Ch. Analog Current Output
Analog and
Digital Value
Conversions
Sometimes it is helpful to be able to quickly convert between the voltage or current
signal levels and the digital values. This is especially useful during machine startup
or troubleshooting. The following table provides formulas to make this conversion
easier.
Range
4 to 20mA
If you know the digital value ...
A + 16D ) 4
4095
For example, if you need a 9mA signal
level, you would use the following
formula to determine the digital value
that should be stored in the V-memory
location that contains the data.
If you know the analog signal level
...
D + 4095 (A * 4)
16
D + 4095 (A–4)
16
D + 4095 (9mA–4)
16
D + (255.94) (5)
D + 1280
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement