7 1 F3–04DA–1 4-Channel

7 1 F3–04DA–1 4-Channel
F3–04DA–1
4-Channel
Analog Output
In This Chapter. . . .
17
Ċ Module Specifications
Ċ Setting the Module Jumpers
Ċ Connecting the Field Wiring
Ċ Module Operation
Ċ Writing the Control Program (DL330 / DL340)
Ċ Writing the Control Program (DL350)
7–2
F3–04DA–1 4-Channel Analog Output
Module Specifications
F3–04DA–1
4-Channel Analog Output
The following table provides the specifications for the F3–04DA–1 Analog Output
Module. Review these specifications to make sure the module meets your
application requirements.
Analog Output
Configuration
Requirements
Number of Channels
4
Output Ranges
0 – 5V, 0 – 10V, 4 – 12 mA,
4 – 20 mA (source)
Resolution
12 bit (1 in 4096)
Output Type
Single ended (one common)
Output Impedance
0.5W typical, voltage output
Output Current
5 mA source, 2.5 mA sink (voltage)
Short-circuit Current
40 mA typical, voltage output
Load Impedance
1KW maximum, current output
2KW minimum, voltage output
Linearity Error
1 count (0.03% maximum)
Maximum Inaccuracy at 77 °F
(25 °C)
0.6% of span, current output
0.2% of span, voltage output
Accuracy vs. Temperature
50 ppm / _C maximum
Conversion Time
30mS maximum
Power Budget Requirement
144 mA @9V, 108 mA @ 24V
External Power Supply
None required
Operating Temperature
32° to 140° F (0° to 60° C)
Storage Temperature
–4° to 158° F (–20° to 70° C)
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
The F3–04DA–1 Analog Output appears as a 16-point module. The module can be
installed in any slot configured for 16 points. See the DL305 User Manual for details
on using 16 point modules in DL305 systems. The limitation on the number of analog
modules are:
S For local and expansion systems, the available power budget and
16-point module usage are the limiting factors.
7–3
F3–04DA–1 4-Channel Analog Output
Setting the Module Jumpers
Jumper Locations
The module is set at the factory for a 0–10V signal on all four channels. (This range
also allows 4–20 mA operation since there are separate I and V wiring terminals.) If
this is acceptable you do not have to change any of the jumpers. The following
diagram shows the jumper locations.
Channel 4
10V
Channel 3
5V
10V
Channel 2
5V
10V
Channel 1
5V
10V
5V
F3–04DA–1
4-Channel Analog Output
Channel 3 Channel 1
Channel 4 Channel 2
Selecting Output
Signal Ranges
The jumper is set from the factory to allow either 0–10V or 4–20mA operation on all
channels. In addition, you can select 0 – 5V or 4 – 12 mA operation by moving the
jumper. (Only channel 1 is used in the example, but all channels must be set.)
Signal Range
Jumper Settings
Range
0 to +5 VDC
4 to 12 mA
0-10V
0 VDC to +10 VDC
4 to 20 mA
0-10V
0-5V
Range
0-5V
7–4
F3–04DA–1 4-Channel Analog Output
Connecting the Field Wiring
F3–04DA–1
4-Channel Analog Output
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 Don’t 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 The F3–04DA–1 receives all power from the base. A separate power supply is not
required.
Requirements
Load
Requirements
Each channel can be wired independently for a voltage or current transducer.
S Current transducers must have an impedance less than 1K ohm.
S Voltage transducers must have an impedance greater than 2K ohms.
7–5
F3–04DA–1 4-Channel Analog Output
Removable
Connector
The F3–04DA–1 module has a removable connector to make wiring easier. Simply
squeeze the top and bottom tabs and gently pull the connector from the module.
Wiring Diagram
Note 1: Shields should be connected to the 0V (COM)
of the module
F3–04DA–1
Internal Module Wiring
4–20mA are
Current Sourcing
See Note 1
CH1
Current
Output
0-1K ohm
C
O
M
CH1
+I
CH1
+I
–I
CH2
CH2
D/A
+I
D/A
CH2
Voltage
Output
2K ohm min
CH4
Voltage
Output
2K ohm min
+I
CH3
CH3
+I
–I
CH4
D/A
–V
–V
+I
CH3
+I
–I
CH4
–I
+V
+V
CH2
–V
+V
CH3
+I
CH2
–I
D/A
CH4
–I
+V
CH1
CH1
–I
–I
CH3
Current
Output
0-1K ohm
C
O
M
+V
CH1
+V
–V
CH2
–V
CH4
–V
Voltage is Sink/Source
C
O
M
+V
CH3
+V
–V
CH4
–V
24VDC
COM
C
O
M
F3–04DA–1
4-Channel Analog Output
Note 2: Unused voltage & current outputs should remain open (no connections)
ANALOG OUTPUT
7–6
F3–04DA–1 4-Channel Analog Output
Module Operation
F3–04DA–1
4-Channel Analog Output
Channel Scanning
Sequence
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.
The F3–04DA–1 module can update one channel per CPU scan. Your RLL program
selects which channel to update, so you have complete flexibility to solve your
application requirements.
Scan
I/O Update
Channel 1
Scan N
Execute Application Program
Channel 3
Scan N+1
Channel 1
Scan N+2
Channel 4
Scan N+3
Channel 2
Scan N+4
Calculate the data
Write data
7–7
F3–04DA–1 4-Channel Analog Output
Understanding the You may recall the F3–04DA–1 module appears to the CPU as a 16-point module.
These 16 points provide:
I/O Assignments
S the digital representation of the analog signal.
S identification of the channel to receive the data.
Since all I/O points are automatically mapped into Register (R) memory, it is very
easy to determine the location of the data word that will be assigned to the module.
F3–04DA1
8pt
Output
8pt
Output
050
–
057
040
–
047
030
–
037
16pt
Input
020
027
–
120
127
4ch.
(Analog)
010
017
–
110
117
R 002, R012
16pt
Input
000
007
–
100
107
R 000, R010
R 011
MSB
1
1
7
F3–04DA–1
4-Channel Analog Output
8pt
Relay
R 001
LSB
MSB
1
1
0
LSB
0
1
0
0
1
7
Within these two word locations, the individual bits represent specific information
about the analog signal.
Channel Selection
Inputs
The last four points of the upper register
are used as outputs to tell the module
which channel to update. In our example,
when output 114 is on, channel 1 will be
updated. Here’s how the outputs are
assigned.
Output
Channels
114
1
115
2
116
3
117
4
R011
MSB
LSB
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
7 6 5 4 3 2 1 0
- channel selection outputs
7–8
F3–04DA–1 4-Channel Analog Output
F3–04DA–1
4-Channel Analog Output
Analog Data Bits
The remaining twelve bits represent the
analog data in binary format.
Bit
Value
Bit
Value
0 (LSB)
1
6
64
1
2
7
128
2
4
8
256
3
8
9
512
4
16
10
1024
5
32
11
2048
R011
R001
MSB
LSB
1 1 1 1 11 1 1
1 1 1 1 11 1 1
7 6 5 4 32 1 0
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
7 6 5 4 3 2 1 0
- data bits
Since the module has 12-bit resolution, the analog signal is converted into 4096
“pieces” ranging from 0 – 4095 (212). For example, with a 0 to 10V scale, a 0V signal
would be 0, and a 10V signal would be 4095. This is equivalent to a a binary value of
0000 0000 0000 to 1111 1111 1111, or 000 to FFF hexadecimal. The following
diagram shows how this relates to each signal range.
0V – 10V
0V – 5V
+V
0V
0
4 – 12mA
12mA
20mA
4 mA
4mA
4095
0
Each “piece” can also be expressed in
terms of the signal level by using the
equation shown. The following table
shows the smallest signal levels that will
possibly result in a change in the data
value for each signal range.
Range
4 – 20mA
4095
0
4095
Resolution H L
4095
H = high limit of the signal range
L = low limit of the signal range
Highest Signal
Lowest Signal
Smallest Change
0 to 5V
5V
0V
1.22 mV
0 to 10V
10V
0V
2.44 mV
4 to 12mA
12mA
4mA
1.95 mA
4 to 20mA
20mA
4mA
3.91 mA
Now that you understand how the module and CPU work together to gather and
store the information, you’re ready to write the control program.
7–9
F3–04DA–1 4-Channel Analog Output
Writing the Control Program (DL330 / DL340)
Identifying the
Data Locations
As mentioned earlier, you can use the channel selection bits to determine which
channels will be updated. The following diagram shows the location for both the
channel selection bits and data bits.
F3–04DA–1
8pt
Output
8pt
Output
050
–
057
040
–
047
030
–
037
16pt
Input
4ch.
(Analog)
020
027
–
120
127
R 002, R012
010
017
–
110
117
16pt
Input
000
007
–
100
107
R 000, R010
R 011
MSB
1 1 1 1
1 1 1 1
7 6 5 4
F3–04DA–1
4-Channel Analog Output
8pt
Relay
R 001
LSB
MSB
1
1
0
0
1
7
LSB
0
1
0
- data bits
- channel selection inputs
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
all 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.
A 4096
U
HL
A = Analog value (0 – 4095)
U = Engineering Units
H = high limit of the Engineering
unit range
L = low limit of the Engineering
unit range
The following example shows how you would use Engineering units to obtain the
digital value to represent pressure (PSI) from 0 to 100. This example assumes you
want to obtain a pressure of 42 PSI, which is slightly less than half scale.
A 4096
U
HL
A 4096
42
100 0
A 1720
7–10
F3–04DA–1 4-Channel Analog Output
Here’s 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 R400. Also, you have to perform this for all channels if you’re using
different data for each channel.
Scale the data
F3–04DA–1
4-Channel Analog Output
374
This example assumes you have already loaded the Engineering unit
value in R400.
DSTR
R400
F50
This instruction loads Engineering unit value into
the accumulator on every scan.
Accumulator
Aux. Accumulator
0 0 4 2
0 0 0 0
R577
DIV
K100
F74
The Engineering unit value is divided by the
Engineering unit range, which in this case is 100.
(100 – 0 = 100)
Accumulator
Aux. Accumulator
0 0 0 0
4 2 0 0
R577
773
CMP
K1
F70
DSTR
R576
F50
F73
If not equal to one, this instruction moves the
two-byte decimal portion into the accumulator for
further operations.
Accumulator
Aux. Accumulator
4 2 0 0
4 2 0 0
F50
R576
The accumulator is then multiplied by the module
resolution, which is 4096. (4096 x 4200 =
17203200). Notice the most significant digits are
now stored in the auxilliary accumulator. (This is
different from the Divide instruction operation.)
3
DSTR
R576
R576
Compare for equal to 100 (100 div 100 = 1).
R577
MUL
K4096
R576
Accumulator
2 0 0
Aux. Accumulator
1 7 2 0
R577
R576
This instruction moves the two-byte auxilliary
accumulator
for further operations.
Accumulator
Aux. Accumulator
1 7 2 0
1 7 2 0
DOUT
R450
F60
R577
R576
This instruction stores the accumulator to R450
and R451. R450and R451 now contain the digital
value, which is 1720.
Accumulator
Store in R451 & R450
1 7 2 0
1 7 2 0
R451
773
R450
DSTR
K4095
F50
If equal to one, store 4095 into the accumulator.
DOUT
R450
F60
If equal to one, move 4095 from accumulator to
R450.
7–11
F3–04DA–1 4-Channel Analog Output
There will probably be times when you need more precise control. For example,
maybe your application requires 42.9 PSI, not just 42 PSI. By changing the scaling
value slightly, we can “imply” an extra decimal of precision. Notice in the following
example we’ve entered 429 as the Engineering unit value and we’ve added another
digit to the scale. Instead of a scale of 100, we’re using 1000, which implies 100.0 for
the PSI range.
Scale the data
374
This example assumes you have already loaded the Engineering unit
value in R400.
F50
This instruction loads Engineering unit value into
the accumulator on every scan.
Accumulator
Aux. Accumulator
0 4 2 9
0 0 0 0
R577
DIV
K1000
F74
The Engineering unit value is divided by the
Engineering unit range, which in this case is 1000.
(100.0 implied range)
0
Accumulator
0 0 0
Aux. Accumulator
4 2 9 0
R577
CMP
K1
773
DSTR
R576
F70
F50
If not equal to one, this instruction moves the
two-byte decimal portion into the accumulator for
further operations.
Accumulator
2 9 0
Aux. Accumulator
4 2 9 0
R577
F73
F50
R576
The accumulator is then multiplied by the module
resolution, which is 4096. (4096 x 4290 =
17571840). Notice the most significant digits are
now stored in the auxilliary accumulator. (This is
different from the Divide instruction operation.)
1
DSTR
R576
R576
Compare for equal to 1000 (1000 div 1000 = 1).
4
MUL
K4096
R576
Accumulator
8 4 0
Aux. Accumulator
1 7 5 7
R577
R576
This instruction moves the two-byte auxilliary
accumulator for further operations.
Accumulator
Aux. Accumulator
1 7 5 7
1 7 5 7
DOUT
R450
F60
R577
R576
This instruction stores the accumulator to R450
and R451. R450 and R451 now contain the digital
value, which is 1757.
Accumulator
Store in R451 & R450
1 7 5 7
1 7 5 7
R451
773
R450
DSTR
K4095
F50
If equal to one, store 4095 into the accumulator.
DOUT
R450
F60
If equal to one, move 4095 from accumulator to
R450.
F3–04DA–1
4-Channel Analog Output
DSTR
R400
7–12
F3–04DA–1 4-Channel Analog Output
Sending Data to a
Single Channel
The following program example shows how to send the digital value to a single
channel.
This example assumes you have already loaded the Engineering unit value in R450 and R451.
F3–04DA–1
4-Channel Analog Output
Send Channel 1
374
DSTR
R450
F50
This rung loads the data into the accumulator on
every scan.
BIN
F85
Since the data is in BCD format, you have to
convert it to binary before you send the data to the
module.
DOUT5
R001
F65
Send the accumulator data to the Register that
corresponds to the module, which is R001.
114
OUT
115
OUT
Indicate the channel to update. In this case,
channel 1 is being updated.
To update other channels with the same output
data, simple add the channel selection outputs for
the additional channels.
If you install the F3–04DA–1 in the slot corresponding to registers 6 and 16, you have
to make a slight program adjustment. This is because the DOUT5 instruction is not
supported for this slot.
This example assumes you have already loaded the Engineering unit value in R450 and R451.
Send Channel 1
374
DSTR
R450
F50
This rung loads the data into the accumulator on
every scan.
BIN
F85
Since the data is in BCD format, you have to
convert it to binary before you send the data to the
module.
DOUT1
R006
F61
Send the 8 least significant data bits to the first
Register that corresponds to the module which is
R006.
SHFR
K0008
F80
Shift the 4 most significant data bits to the right 8
places. (The data is still in the accumulator).
DOUT3
R016
F63
Send the 4 most significant data bits to the second
Register that corresponds to the module which is
R016.
164
OUT
Indicate the channel to update. In this case,
channel 1 is being updated.
7–13
F3–04DA–1 4-Channel Analog Output
Sequencing the
Channel Updates
Ch4 Done
117
160
OUT RST
Ch3 Done
116
DSTR
R456
F50
117
When channel 4 has been updated, 160 restarts
the update sequence.
When channel 3 has been updated, this rung loads
the data for channel 4 into the accumulator. By
turning on 117, this triggers the channel update.
(Since 117 is also used as an input, this results in
a one-shot.)
OUT
Ch2 Done
115
DSTR
R454
F50
116
When channel 2 has been updated, this rung loads
the data for channel 3 into the accumulator. By
turning on 116, this triggers the channel update.
(Since 116 is also used as an input, this results in
a one-shot.)
OUT
Ch1 Done
114
DSTR
R452
F50
115
When channel 1 has been updated, this rung loads
the data for channel 2 into the accumulator. By
turning on 115, this triggers the channel update.
(Since 115 is also used as an input, this results in
a one-shot.)
OUT
Restart
160
374
374
DSTR
R450
On
First
Scan
Always
on
F50
114
OUT
This rung loads the data for channel 1 into the
accumulator. Since 374 is used, this rung
automatically executes on the first scan. After that,
160 restarts this rung. If you examine the first rung,
you’ll notice 160 only comes on after channel 4
has been updated.
Since the data is in BCD format, you have to
convert it to binary before you send the data to the
module. (You can omit this step if you’ve already
converted the data elsewhere.)
BIN
F85
DOUT1
R001
F61
Send the 8 least significant data bits to the first
Register that corresponds to the module which is
R001.
SHFR
K8
F80
Shift the 4 most significant data bits to the right 8
places. (The data is still in the accumulator).
DOUT3
R0011
F63
Send the 4 most significant data bits to the second
Register that corresponds to the module which is
R011.
F3–04DA–1
4-Channel Analog Output
Sequencing
Example
This example shows how to send digital values to the module when you have more
than one channel. This example will automatically update all four channels over four
scans. The example is fairly simple and will work in most all situations, but there are
instances where problems can occur. The logic must be active on the first CPU scan
and all subsequent scans. If the logic gets stopped or disabled for some reason,
there is no way to restart it. If you’re using an RLL PLUS (Stage) program, put this logic
in an initial stage that is always active. Also, you should avoid using the this example
if you require the analog output logic to be used inside a Master Control Relay field of
control. Even if you do not have a need for the MCR, you can still accidentally disable
the analog output logic by inadvertently writing to the multiplexing control relays with
an operator interface or intelligent module, such as an ASCII BASIC module, etc.
The following program example shows how to send the digital values to multiple
channels. With this program, all channels will be updated within four scans. You must
use the rungs in the order shown, but you can include them anywhere in the program.
7–14
F3–04DA–1 4-Channel Analog Output
Writing the Control Program (DL350)
F3–04DA–1
4-Channel Analog Output
Reading Values:
Pointer Method
and Multiplexing
Pointer Method
There are two methods of reading values:
S The pointer method (all system bases must be D3–xx–1 to support the
pointer method)
S Multiplexing
You must use the multiplexing method with remote I/O modules (the pointer method
will not work). You can use either method when using DL350 CPU, but for ease of
programming it is strongly recommended that you use the pointer method.
The DL350 has special V-memory locations assigned to each base slot that greatly
simplifies the programming requirements. By using these V-memory locations you
can:
S specify the number of channels to update.
S specify where to obtain the output data.
NOTE: Do not use the pointer method and the PID Control Output auto transfer to
I/O module function together for the same module. If using PID loops, use the pointer
method and ladder logic code to map the analog output data from the PID loop to the
output module memory location(s).
The following program example shows how to set up these locations. Place this rung
anywhere in the ladder program, or in the initial stage when using stage
programming.
SP0
LD
K4
- or -
LD
K 84
Loads a constant that specifies the number of channels to scan and
the data format. The lower byte, most significant nibble (MSN)
selects the data format (i.e. 0=BCD, 8=Binary), the LSN selects
the number of channels (1 to 4).
The binary format is used for displaying data on some operator
interfaces.
Special V-memory location assigned to slot 3 that contains the
number of channels to scan.
OUT
V7663
This loads an octal value for the first V-memory location that will be
used to store the output data. For example, the O2000 entered here
would designate the following addresses.
Ch1 – V2000, Ch2 – V2001, ch3 – V2002, ch4 – V2003
LDA
O2000
The octal address (O2000) is stored here. V7703 is assigned to slot
3 and acts as a pointer, which means the CPU will use the octal
value in this location to determine exactly where to store the output
data.
OUT
V7703
The table shows the special V-memory locations used with the DL350. Slot 0 (zero)
is the module next to the CPU. Remember, the CPU only examines the pointer
values at these locations after a mode transition. The pointer method is supported on
expansion bases (all bases must be D3–xx–1) up to a total of 8 slots away from the
DL350. The pointer method is not supported in slot 8 of a 10 slot base.
Analog Output Module Slot Dependent V-memory Locations
Slot
0
1
2
3
4
5
6
7
No. of Channels
V7660 V7661 V7662
V7663 V7664
V7665 V7666
V7667
Storage Pointer
V7700 V7701 V7702
V7703 V7704
V7705 V7706
V7707
7–15
F3–04DA–1 4-Channel Analog Output
Multiplexing:
DL350 with a
D3–xx–01 Base
This example assumes the module is in Y0 address slot of D3–xx–1 base. In this
example V2000 contains the data for channel and V2001 for channel 2, etc. If any
expansion bases are used in the system, they must all be D3–xx–1 to be able to use
this example. Otherwise, the conventional base addressing must be used.
SP1
INC
This rung loads increments V1400 once every
scan from 0–4.
V2000
This rung loads the data for channel 1 into the
accumulator when V1400 = 1.
LD
The data is stored in V3000 before sending it to
the module.
OUT
V3000
V1400
Y14
OUT
(
Channel 2
K2
=
)
LD
V2001
OUT
V3000
Channel 3
V1400
Y15
OUT
(
K3
=
)
LD
V2002
OUT
V3000
Channel 4
K4
V1400
=
Y16
OUT
(
)
LD
The channel select bit for channel 1 is Y14.
This rung loads the data for channel 2 into the
accumulator when V1400 = 2.
The data is stored in V3000 before sending it to
the module.
The channel select bit for channel 2 is Y15.
This rung loads the data for channel 3 into the
accumulator when V1400 = 3.
The data is stored in V3000 before sending it to
the module.
The channel select bit for channel 3 is Y16.
V2003
This rung loads the data for channel 4 into the
accumulator when V1400 = 4.
V3000
The data is stored in V3000 before sending it to
the module.
OUT
LD
K0
When V1400 is reset to 0 when V1400 is =4.
OUT
V1400
(
Y17
OUT
)
example program continued on next page
The channel select bit for channel 4 is Y17.
F3–04DA–1
4-Channel Analog Output
Channel 1
K1
V1400
=
V1400
7–16
F3–04DA–1 4-Channel Analog Output
example program continued from previous page
SP1
LD
V3000
This rung converts the appropriate analog channel
data to binary for the module.
F3–04DA–1
4-Channel Analog Output
BIN
Y0
OUTF
K12
Multiplexing:
DL350 with a
Conventional
DL305 Base
The OUTF instruction sends the 12 bits of analog
data to the analog module memory address.
This example assumes the module is in the 10–17 / 110–117 slot of a 305
conventional base. In this example V3000 contains the BCD data for channel 1 and
V3001 contains the data for channel 2, etc. One more rung would be necessary for
channel 4.
Send Channel 1
SP1
LD
V3000
BIN
This rung loads the data for channel 1 into the
accumulator.
Converts the BCD data to binary.
ANDD
Kfff
Masks the 12 analog data bits
OUTF Y10
Output the first 8 analog data bits to the module
K8
SHFR
K8
Shifts the first 8 analog data bits out of the
accumulator, leaving the most significant 4 bits
OUTF Y110
K4
Output the last 4 analog data bits to the module
(
Y114
OUT
)
Channel 1 select bit.
example program continued on next page
7–17
F3–04DA–1 4-Channel Analog Output
example program continued from previous page.
Send Channel 2
SP1
LD
V3001
BIN
This rung loads the data for channel 2 into the
accumulator.
Converts the BCD data to binary.
ANDD
Kfff
Masks the 12 analog data bits
Output the first 8 analog data bits to the module
K8
SHFR
K8
Shifts the first 8 analog data bits out of the
accumulator, leaving the most significant 4 bits
OUTF Y110
K4
Output the last 4 analog data bits to the module
(
Send Channel 3
SP1
Y115
OUT
)
LD
V3002
Channel 2 select bit.
This rung loads the data for channel 3 into the
accumulator.
BIN
Converts the BCD data to binary.
ANDD
Kfff
Masks the 12 analog data bits
OUTF Y10
Output the first 8 analog data bits to the module
K8
SHFR
K8
Shifts the first 8 analog data bits out of the
accumulator, leaving the most significant 4 bits
OUTF Y110
K4
(
Y116
OUT
)
Output the last 4 analog data bits to the module
Channel 3 select bit.
F3–04DA–1
4-Channel Analog Output
OUTF Y10
7–18
F3–04DA–1 4-Channel Analog Output
F3–04DA–1
4-Channel Analog Output
Calculating the
Digital Value
Your program must 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.
A U 4095
HL
A = Analog value (0 – 4095)
U = Engineering Units
H = high limit of the engineering
unit range
L = low limit of the engineering
unit range
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
7–19
F3–04DA–1 4-Channel Analog Output
The example program shows how you would write the program to perform the
engineering unit conversion. This example assumes you have calculated or loaded
the engineering unit values in BCD and stored them in V2300 and V2301 for
channels 1 and 2 respectively.
NOTE: The DL350 offers various instructions that allow you to perform math
operations using BCD format. It is easier to perform math calculations in BCD and
then convert the value to binary before sending the data to the module.
LD
V2300
MUL
K4095
DIV
K1000
OUT
V3000
SP1
LD
V2301
MUL
K4095
DIV
K1000
OUT
V3001
The LD instruction loads the engineering units used with channel 1 into
the accumulator. This example assumes the numbers are BCD. Since
SP1 is used, this rung automatically executes on every scan. You could
also use an X, C, etc. permissive contact.
Multiply the accumulator by 4095 (to start the conversion).
Divide the accumulator by 1000 (because we used a multiplier of
10, we have to use 1000 instead of 100).
Store the BCD result in V3000 (the actual steps to write the data
were shown earlier).
The LD instruction loads the engineering units used with channel 2 into
the accumulator. This example assumes the numbers are BCD. Since
SP1 is used, this rung automatically executes on every scan. You could
also use an X, C, etc. permissive contact.
Multiply the accumulator by 4095 (to start the conversion).
Divide the accumulator by 1000 (because we used a multiplier of
10, we have to use 1000 instead of 100).
Store the BCD result in V3001 (the actual steps to write the data
were shown earlier).
F3–04DA–1
4-Channel Analog Output
SP1
7–20
F3–04DA–1 4-Channel Analog Output
Analog and Digital Sometimes it is helpful to be able to quickly convert between the voltage or current
Value Conversions signal levels and the digital values. This is especially helpful during machine startup
or troubleshooting. The following table provides formulas to make this conversion
easier.
F3–04DA–1
4-Channel Analog Output
Range
If you know the digital value ...
If you know the analog signal
level ...
0 to 5V
A 5D
4095
D 4095 A
5
0 to 10V
A 10D
4095
D 4095 A
10
4 to 12mA
A 12D 4
4095
D 4095 (A 4)
12
4 to 20mA
A 16D 4
4095
D 4095 (A 4)
16
For example, if you are using the
4–20mA range and you know you need a
10mA signal level, you would use the
following formula to determine the digital
value that should be sent to the module.
D 4095 (A 4)
16
D 4095 (10mA 4)
16
D (255.93) (6)
D 1536
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