Analog F2-04THM User Manual

Chapter
Chapter
Chapter
F2-04THM 4-CHannel THerMoCouple InpuT
7
7
In This Chapter...
Module Specifications ............................................................................................... 7-2
Setting the Module Jumpers ..................................................................................... 7-6
Connecting the Field Wiring ..................................................................................... 7-9
Module Operation ................................................................................................... 7-13
Writing the Control Program .................................................................................. 7-15
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Module Specifications
The F2-04THM, 4-Channel Thermocouple Input Module provides the following features and benefits:
• Four thermocouple input channels with 16-bit voltage resolution or 0.1°F/°C temperature resolution.
• Automatically converts type E, J, K, R, S, T, B, N, or C thermocouple signals into direct temperature readings. No extra scaling or complex conversion is required.
• Temperature data can be expressed in °F or °C.
• Module can be configured as ±5V, ±156mV, 0–5V, 0–156mV input and will convert volts and millivolt signal levels into 16-bit digital (0–65535) values.
• Signal processing features include automatic cold junction compensation, thermocouple linearization, and digital filtering.
• The temperature calculation and linearization are based on data provided by the National Institute of Standards and Technology (NIST).
• Diagnostic features include detection of thermocouple burnout or disconnection.
IN
F2-04THM
THERMOCOUPLE mV 0-5, -5-+5VDC
CH1 + CH1 CH2 + CH2 CH3 + CH3 CH4 + CH4 +24V 0v
18-26.4VDC, 60mA
TEMP
VOLT
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
The following tables provide the specifications for the F2-04THM Analog Input Module. Review these specifications to make sure the module meets your application requirements.
General Specifications
Number of Channels Common Mode Range Common Mode Rejection Input Impedance Absolute Maximum Ratings
Accuracy vs. Temperature
Sampling Rate
PLC Update Rate
Digital Inputs Input Points Required
Power Budget Requirement External Power Supply Operating Temperature Storage Temperature Relative Humidity Environmental air Vibration Shock Noise Immunity
4, differential ±5VDC 90dB min. @ DC, 150dB min. @ 50/60Hz. 1Mq min. Fault-protected inputs to ±50VDC ±5ppm/ºC maximum; full scale calibration
(including maximum offset change) All 4 channels: 1.4 seconds (*5.4 seconds) 4 channels per scan max. (D2-240, D2-250–1, D2-260 and D2-262 CPU)
1 channel per scan ,max. D2-230 CPU
16 binary data bits, 2 channel ID bits, 4 diagnostic bits 32 point (X) input module
80mA (*100mA ) maximum, 5VDC (supplied by base) 40 mA, 10-30 VDC (*60 mA, 18-26.4 VDC) 0–60ºC (32–140ºF)
-2ºC to70ºC (-4ºF to158ºF) 5–95% (non-condensing) No corrosive gases permitted MIL STD 810C 514.2 MIL STD 810C 516.2 NEMA ICS3-304
Thermocouple Specifications
Type J Type K -150–1372ºC (-238–2502ºF) Type E -210–1000ºC (-346–1832ºF) Type R 65–1768ºC (149–3214ºF)
*Type R
Input Ranges
Display Resolution Cold Junction Compensation Warm-Up Time Linearity Error (End to End) Maximum Inaccuracy
NOTE: *R Wide range is available only on modules with date code 0410E2 and later. NOTE: Values in parenthesis with an asterisk are for older modules with two circuit board design and date
codes 0806E1 or previous. Values not in parenthesis are for single circuit board models with date code 0806E1 and above.
Wide Type S
Type T -230–400ºC (-382–752ºF) Type B 529–1820ºC (984–3308ºF) Type N -70–1300ºC (-94–2372ºF) Type C 65–2320ºC (149–4208ºF)
±0.1ºC or ±0.1ºF Automatic 30 minutes typically ±1ºC repeatability ±1ºC maximum, ±0.5ºC typical
±3ºC (excluding thermocouple error)
DL205 Analog I/O Manual, 7th Edition, Rev. G
-190–760ºC (-310–1400ºF)
65–1768ºC (149–3214ºF)
65–1768ºC
(149–3214ºF)
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Voltage Input Specifications
Voltage Ranges Resolution Full Scale Calibration Error
(Offset Error Included) Offset Calibration Error Linearity Error (End to End)
Maximum Inaccuracy
Voltage: 0-5V, ±5V, 0-156.25 mV, ±156.25 mVDC, 16 bit (1 in 65535)
±13 count typical, ±33 maximum
±1 count maximum @ 0V input ±1 count maximum ±0.02% @ 25ºC (77ºF)
Module Calibration
The F2-04THM module requires no calibration. The module automatically calibrates every five seconds, which removes offset and gain errors. For each thermocouple type, the temperature calculation and linearization performed by the microprocessor is accurate to within 0.01°C.
Thermocouple Input Configuration Requirements
The F2-04THM temperature input module requires 32 discrete input points. The module can be installed in any slot of a DL205 system. The limitations on the number of analog modules are:
• For local and local expansion systems, the available power budget and number of discrete I/O points.
• For remote I/O systems, the available power budget and number of remote I/O points.
Check the user manual for the particular model of CPU and I/O base being used for more information regarding power budget and number of local, local expansion or remote I/O points.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
F2-04THM
Correct!
Incorrect
7
Special Placement Requirements (D2-230 and Remote I/O Bases)
It is important to examine the configuration if a D2-230 CPU is being used. As can be seen in the section on Writing the Control Program, V-memory locations are used to manage the analog data. If the module is placed in a slot so that the input points do not start on a V-memory boundary, the program instructions aren’t able to access the data. This also applies when placing this module in a remote base using a D2-RSSS in the CPU slot.
Slot 0Slot 1Slot2 Slot 3Slot 4
16pt
Output
Y0
Y17
8pt
Output
Y20
--
--
Y27
Input
X0
--
X17
32pt
InputInput
X20
X60
--
X57
X67
8pt16pt
--
Data is correctly entered, so input points start on a V-memory boundary address as in the table graphic below.
MSB
X 5 7
X
X
4
5
7
0
LSB
X 4 0
V40400V40403
V40401--V40402
X 3 7
X
X
2
3
7
0
10404V20404V
F2-04THM
BSLBSM
X 2 0
T o use
Slot 0Slot 1Slot2 Slot 3Slot 4
16pt
Output
Y0
Y17
8pt
Output
Y20
--
--
Y27
X17
Input
X0
--
8pt
32pt16pt
InputInput
X20
X30
--
X27
X67
--
the
Data is split over three locations, (see graphic below) so instructions cannot access data from a D2-230 CPU.
MSB
X 7 7
V40403
X
X
6
7
7
0
LSB
X
X
6
5
0
V40402
X
X
5
4
0
7
BSLBSM
X
X
3
4
7
0
V40401
X
X
2
3
7
0
BSLBSM
X 2 0
V-memory references required for a D2-230 CPU, the first input address assigned to the module must be one of the following X locations. The corresponding V-memory addresses for the X locations are shown below.
X0 X20 X40 X60 X100 X120 X140 X160
X
V40400 V40401 V40402 V40403 V40404 V40405 V40406 V40407
V
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
J9

Setting the Module Jumpers

Jumper Locations
Use the figures below to locate the single jumper (J9) and the bank of eight jumpers (J7) on the PC board. Notice that the PC board was re-designed starting with date code 0806E1 and the jumper locations changed; the functionality of the jumpers did not change. To prevent losing a jumper when it is removed, store it in its original location by sliding one of its sockets over a single pin. The following options can be selected by installing or removing the appropriate jumpers:
• Number of channels
• Input type
• Conversion unit
• Calibrate enable
Jumper locations for modules having date code prior to 0806E1.
Calibrate enable
J7
J7
J9 J7
Options
CH+1
CH+2
Tc Type 0
Tc Type 1
Tc Type 2
Tc Type 3
Units-0
Units-1
Jumper locations for modules having date code 0806E1 and later.
J7
J7
J7
J9
J9
Options
CH+1
CH+2
Tc Type 0
Tc Type 1
Tc Type 2
Tc Type 3
Units-0
Units-1
Calibrate enable
Calibrate Enable
Locate the “Calibrate enable” jumper J9. The jumper comes from the factory with the jumper removed (the jumper is installed on one of the two pins only). Installing this jumper disables the thermocouple active burn-out detection circuitry, which enables a thermocouple calibrator to be attached to the module.
To be certain that the output of the thermocouple calibrator is within the 5V common mode voltage range of the module, connect the negative side of the differential voltage input channel to the 0V terminal, then connect the thermocouple calibrator to the differential inputs (for example, Ch 3+ and Ch 3).
For the voltage input ranges, this jumper is inactive and can be installed or removed with no effect on voltage input.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Selecting the Number of Channels
The top two J7 jumpers labeled CH+1 and CH+2 determine the number of channels that
will be used. The table shows how to set the jumpers for channels 1 to 4. The module comes with both jumpers installed for four channel operation. For example, to select channels 1 to 3, leave the CH+2 jumper installed and remove the CH+1 jumper. Any unused channels are not processed. For example, if channels 1 to 3 are selected, channel 4 will not be active.
X = jumper installed Blank space = jumper removed
Number of
Channels
1
2 X
3 X
4 X X
Jumper
CH+1 CH+2
Setting Input Type
The next four jumpers, Tc Type 0, Tc Type 1, Tc Type 2, and Tc Type 3, must be set to match either the type of thermocouple being used or the input voltage level. Since the module can be used with many types of thermocouples, use the table below to determine the proper settings for the thermocouple being used.
The module comes from the factory with all four jumpers installed for use with a J type thermocouple. To use a K type thermocouple, remove the jumper labeled Tc Type 0.
NOTE: All channels of the module must be the same thermocouple type or voltage range.
X = Jumper installed, and blank space = Jumper removed.
Thermocouple/
Voltage Inputs
J K E
R
R Wide*
S T B N C
0–5V
±5V
0–156 mV
±156 mV
*NOTE: R Wide is only available on modules with date code 0410E2 and later.
Tc Type 0 Tc Type 1 Tc Type 2 Tc Type 3
X X X X
X X X
X X X
X X
X
X X X
X X
X X
X
X X X
X X
X X
X
X X
Jumper
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Selecting the Conversion Units
Use the last two jumpers, Units-0 and Units-1, to set the conversion unit used for either thermocouple or voltage inputs. The options are magnitude plus sign or 2’s complement, plus Fahrenheit or Celsius for thermocouples. See the next two sections for jumper settings when using either thermocouple or voltage inputs.
Thermocouple Conversion Units
All thermocouple types are converted into a direct temperature reading in either Fahrenheit or Celsius. The data contains one implied decimal place. For example, a value in V-memory of 1002 would be 100.2°F or °C.
For thermocouple ranges which include negative temperatures (J,E,K,T,N), the display resolution is from -3276.7 to +3276.7. For positive-only thermocouple ranges (R,S,B,C), the display resolution is 0 – 6553.5.
Negative temperatures can be represented in either 2’s complement or magnitude plus sign form. If the temperature is negative, the most significant bit in the V-memory location is set (X17, if the starting address for the module is X0).
The 2’s complement data format may be required to correctly display bipolar data on some operator interfaces. This data format could also be used to simplify averaging a bipolar signal. To view this data format in DirectSoft, select Signed Decimal.
For unipolar thermocouple ranges (R,S,B,C), it does not matter if magnitude plus sign or 2’s complement is selected.
Use the table to select settings. The module comes with both jumpers installed for magnitude plus sign conversion in Fahrenheit. For example, remove the Units-0 jumper and leave the Units-1 jumper installed for magnitude plus sign conversion in Celsius.
X = Jumper installed, and
blank space = Jumper removed.
Number
of
Channels
Units-0 Units-1
Voltage Conversion Units
The bipolar voltage input ranges, 5V or 156mV (see previous page for 5V and 156mV settings), may be converted to a 15-bit magnitude plus sign or a 16-bit 2’s complement value.
Use the table to select settings. The module comes with both jumpers installed for magnitude plus sign conversion. Remove the Units-1 jumper and leave the Units-0 jumper installed for 2’s complement conversion.
X = Jumper installed, and blank space = Jumper removed.
Jumper
Pins
Units-0 Units-1
Temperature Conversion Units
Magnitude + Sign
°F °C
X X
X X
Voltage Conversion Units
Magnitude
Plus Sign
X X
X
Compliment
2’s Compliment
°F °C
2’s
NOTE: When selecting a Unipolar Voltage mode (0-5V, 0-156mV), BCD data type will not give a correct reading. Decimal data type should always be used for Unipolar Voltage modes.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input

Connecting the Field Wiring

Wiring Guidelines
Your company may have guidelines for wiring and cable installation. If so, check the guidelines before beginning the installation. Here are some general things to consider:
• Use the shortest wiring route whenever possible.
• Use shielded wiring and ground the shield at the transmitter source. Do not ground the shield at both the module and the source.
• Do not run the signal wiring next to large motors, high current switches, or transformers. This may cause noise problems.
• 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 F2-04THM module requires at least one field-side power supply. The same or separate power sources can be used for the 0–5 V or 0–156 mV transmitter voltage supply. The module requires 10–30 VDC, at 40mA, from the external power supply.
The DL205 AC bases have a built-in 24VDC power supply that provide up to 300mA of current. This can be used instead of a separate supply. Check the power budget to be safe.
It is desirable in some situations to power the transmitters separately in a location remote from the PLC. This will work as long as the transmitter supply meets the voltage and current requirements, and the transmitter’s minus (-) side and the module supply’s minus (-) side are connected together.
WARNING: If the internal 24VDC power budget is exceeded, it may cause unpredictable system operation that can lead to a risk of personal injury or equipment damage.
The DL205 base has a switching type power supply. As a result of switching, noise may cause some instability into the analog input data if the base power supply is used. If this is unacceptable, try one of the following:
1. Use a separate linear power supply.
2. Connect the 24VDC common to the frame ground, which
is the screw terminal marked ”G” on the base.
Unused temperature inputs should be shorted together and connected to common.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Thermocouples
Use shielded thermocouples whenever possible to minimize the presence of noise on the thermocouple wire. Ground the shield wire at one end only. For grounded thermocouples, connect the shield at the sensor end. For ungrounded thermocouples, connect the shield to the 0V (common) terminal.
Grounded Thermocouple Assembly
A grounded thermocouple provides better response time than an ungrounded thermocouple because the tip of the thermocouple junction is in direct contact with the protective case.
Ungrounded Thermocouple Assembly
An ungrounded thermocouple is electrically isolated from the protective case. If the case is electrically grounded it provides a low-impedance path for electrical noise to travel. The ungrounded thermocouple provides a more stable and accurate measurement in a noisy environment.
Exposed Grounded Thermocouple
The thermocouple does not have a protective case and is directly connected to a device with a higher potential. Grounding the thermocouple assures that the thermocouple remains within the common mode specifications. Because a thermocouple is essentially a wire, it provides a low-impedance path for electrical noise. The noise filter has a response of >100dB @ 50/60 Hz.
WARNING: A thermocouple can become shorted to a high voltage potential. Because common terminals are internally connected together, whatever voltage potential exists on one thermocouple will exist on the other channels.
7-10
Ambient Variations in Temperature
The F2-04THM module has been designed to operate within the ambient temperature range of 0 to 60°C.
The cold junction compensation is calibrated to operate in a still-air environment. If the module is used in an application that has forced convection cooling, an error of 2 to 3°C may be introduced. To compensate for this, ladder logic can be used to correct the values.
When configuring the system design it is best to locate any heat-producing devices above and away from the PLC chassis because the heat will affect the temperature readings. For example, heat introduced at one end of the terminal block can cause a channel-to-channel variation.
When exposing the F2-04THM module to abrupt ambient temperature changes it will take several minutes for the cold junction compensation and terminal block to stabilize. Errors introduced by abrupt ambient temperature changes will be less than 4°C.
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Wiring Diagrams
Use the following diagrams to connect the field wiring.
Thermocouple Input Wiring Diagram
Thermocouple Input Wiring Diagram
CH1 + CH1 CH2 + CH2 CH3 + CH3 CH4 + CH4 +24V 0v
TEMP
VOLT
Examples of grounded thermocouple wiring
Examples of grounded thermocouple wiring
Module Supply
24VDC
CH1+
CH1
CH2+
CH2
CH3+
CH3
CH4+
CH4
+24VDC
0V
IN
F2-04THM
THERMOCOUPLE mV
Analog Mux
0-5, -5-+5VDC
ADC
18-26.4VDC, 60mA
NOTE: Terminate shields at the respective signal source. Also, connect unused channels to a common terminal (0V, CH4+, CH4).
Voltage Input Wiring Diagram
CH1 + CH1 CH2 + CH2 CH3 + CH3 CH4 + CH4 +24V 0v
TEMP VOLT
Voltage Transmitter
Voltage Transmitter
Voltage Transmitter
Transmitter Supply
Module Supply
24 VDC
CH1+
CH1
CH2+
CH2
Analog Mux
IN
F2-04THM
THERMOCOUPLE mV 0-5, -5-+5VDC
ADC
CH3+
CH3
+
CH4+
--
CH4
+24VDC
0V
18-26.4VDC, 60mA
0V
NOTE: Connect unused channels to a common terminal (0V, CH4+, CH4). Also, when using 0-156 mV and 5V ranges, connect (-) or 0V terminals (CH1, CH2, CH3, CH4) to 0V module supply terminal to ensure common mode acceptance.
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-11
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
7-12
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input

Module Operation

Before beginning to write the control program, it is important to take a few minutes to understand how the module processes the analog signals.
Channel Scanning Sequence (Multiplexing) for a D2-230 CPU
The F2-04THM module can supply different amounts of data per scan, depending on the type of CPU being used. The D2-230 can obtain one channel of data per CPU scan. Since there are four channels, it can take up to four scans to get data for all channels. Once all channels have been scanned the process starts over with channel 1. Unused channels are not processed, so if only two channels are selected, each channel will be updated every other scan. The multiplexing method can also be used for the D2-240, D2-250-1, D2-260 or D2-262 CPUs.
Scan
ReadInputs
Execute ApplicationProgram
Read the data
Store data
WritetoOutputs
Scan N
Scan N+1
Scan N+2
Scan N+3
Scan N+4
System With
D2-230 CPU
Channel1
Channel2
Channel3
Channel4
Channel1
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-13
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Channel Scanning Sequence (Pointer Method) for D2-240, D2-250-1, D2-260 and D2-262 CPUs
If a D2-240, a D2-250-1, a D2-260 or a D2-262 CPU is being used, all four channels of input data can be captured in one scan. This is because the D2-240, D2-250-1, D2-260 and D2-262 CPUs support special V-memory locations that are used to manage the data transfer. This is discussed in more detail in the next section on Writing the Control Program.
Scan
ReadInputs
System With
D2-240, D2-250-- 1,
D2-250 or D2-260CPU
Execute ApplicationProgram
Read the data
Store data
WritetoOutputs
Scan N
Scan N+1
Scan N+2
Scan N+3
Scan N+4
Ch 1, 2, 3, 4
Ch 1, 2, 3, 4
Ch 1, 2, 3, 4
Ch 1, 2, 3, 4
Ch 1, 2, 3, 4
Analog Module Updates
Even though the channel updates to the CPU are synchronous with the CPU scan, the module asynchronously monitors the analog transmitter signal and converts the signal to a 16-bit binary representation. This enables the module to continuously provide accurate measurements without slowing down the discrete control logic in the RLL program.
The time required to sense the temperature and copy the value to V-memory is 1.4 seconds for a single board design module (5.4 seconds for a two board design module) plus 1 scan time maximum.
7-14
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
incoming data.

Writing the Control Program

Reading Values Pointer Method and Multiplexing
There are two methods of reading values:
• Pointer method
• Multiplexing
The multiplexing method must be used with a D2-230 CPU. The multiplexing method must also be used with remote I/O modules (the pointer method will not work). Either method can be used with the D2-240, D2-250-1, D2-260 and D2-262 CPUs, but for ease of programming it is highly recommended to use the pointer method.
Pointer Method for the D2-240, D2-250-1, D2-260 and D2-262 CPUs
The CPU has special V-memory locations (shown in tables on the following page) assigned to each base slot that greatly simplifies the programming requirements. These V-memory locations allow you to:
• Specify the data format
• Specify the number of channels to scan
• Specify the storage locations
The example program shows how to setup these locations. Place this rung anywhere in the ladder program, or in the initial stage if stage programming instructions are used. This is all that is required to read the data into V-memory locations. Once the data is in V-memory, math instructions can be used on the data, compare the data against preset values, etc. V2000 is used in the example, but any user V-memory location can be used. The module is installed in slot 2 for the examples. Use the V-memory locations shown in the application. The pointer method automatically converts values to BCD.
NOTE: D2-240 CPUs with firmware release version 2.5 or later and D2-250 CPUs with firmware release version 1.06 or later support this method. Use the D2-230 multiplexing example if the firmware revision is earlier.
SP0
LD
00
04 K0084
K
OUT V7662
LDA O2000
OUT V7672
DL205 Analog I/O Manual, 7th Edition, Rev. G
LD
-or-
Loadsaconstant that specifies the numberofchannelstoscan and thedataformat.The upperbyte, most significant nibble (MSN) selects the dataformat(0=BCD, 8=Binary),the LSNselects the numberofchannels(1, 2, 3, or 4).
Thebinaryformatisusedfor displayingdataonsomeoperator interfaces.The DL230/240 CPUs do notsupport binar ymath functions, whereasthe DL250 does.
Special V-memory location assignedtoslot2that contains the numberofchannelsto scan.
This loads an octalvalue forthe firstV-memorylocationthat will be used to storethe incoming data. Forexample, theO2000 entered herewoulddesignate thefollowing addresses: Ch1--V2000, V2001,Ch2-- V2002, V2003, Ch 3--V2004,V2005, Ch 4--V2006, V2007.
Theoctal address(O2000)isstoredhere. V7672isassignedtoslot 2 and acts as a pointer,whichmeans theCPU will usethe octal value in this location to determine exactlywheretostore the
7-15
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
The following tables show the special V-memory locations used by the D2-240, D2-250-1, D2-260 and D2-262 for the CPU base and local expansion base I/O slots. Slot 0 (zero) is the module next to the CPU or D2-CM module. Slot 1 is the module two places from the CPU or D2-CM, and so on. Remember, the CPU only examines the pointer values at these locations after a mode transition. Also, if the D2-230 (multiplexing) method is used, verify that these addresses in the CPU are 0 (zero).
The Table below applies to the D2-240, D2-250-1, D2-260 and D2-262 CPU base.
CPU Base: Analog Input Module Slot-Dependent V-memory Locations
Slot No. of Channels Storage Pointer
The Table below applies to the D2-250-1, D2-260 and D2-262 CPU base 1.
Expansion Base D2-CM #1: Analog Input Module Slot-Dependent V-memory Locations
Slot No. of Channels Storage Pointer
The Table below applies to the D2-250-1, D2-260 and D2-262 CPU base 2.
Expansion Base D2-CM #2: Analog Input Module Slot-Dependent V-memory Locations
Slot No. of Channels Storage Pointer
0 1 2 3 4 5 6 7 V7660 V7661 V7662 V7663 V7664 V7665 V7666 V7667 V7670 V7671 V7672 V7673 V7674 V7675 V7676 V7677
0 1 2 3 4 5 6 7 V36000 V36001 V36002 V36003 V36004 V36005 V36006 V36007 V36010 V36011 V36012 V36013 V36014 V36015 V36016 V36017
0 1 2 3 4 5 6 7 V36100 V36101 V36102 V36103 V36104 V36105 V36106 V36107 V36110 V36111 V36112 V36113 V36114 V36115 V36116 V36117
7-16
The Table below applies to the D2-260 and D2-262 CPU base 3.
Expansion Base D2-CM #3: Analog Input Module Slot-Dependent V-memory Locations
Slot No. of Channels Storage Pointer
0 1 2 3 4 5 6 7
V36200 V36201 V36202 V36203 V36204 V36205 V36206 V36207 V36210 V36211 V36212 V36213 V36214 V36215 V36216 V36217
The Table below applies to the D2-260 and D2-262 CPU base 4.
Expansion Base D2-CM #4: Analog Input Module Slot-Dependent V-memory Locations
Slot No. of Channels Storage Pointer
0 1 2 3 4 5 6 7
V36300 V36301 V36302 V36303 V36304 V36305 V36306 V36307 V36310 V36311 V36312 V36313 V36314 V36315 V36316 V36317
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
²
Check Channel1
Negative Temperature Readings with Magnitude Plus Sign (Pointer Method) for D2-240, D2-250-1, D2-260 and D2-262 CPUs
With bipolar ranges, some additional logic will be needed to determine whether the value being returned represents a positive voltage or a negative voltage. For example, the direction for a motor might need to be known. There is a solution for this:
• If bipolar ranges are used and a value greater than or equal to 8000 value is negative.
• If a value less than or equal to 7FFF
The sign bit is the most significant bit, which combines 8000 greater than or equal to 8000
, only the most significant bit and the active channel bits need
hex
is obtained, then the value is positive.
hex
to the data value. If the value is
hex
to be masked to determine the actual data value.
NOTE: D2-240 CPUs with firmware release version 2.5 or later and D2-250 CPUs with firmware release version 1.06 or later support this method. Use the D2-230 multiplexing example if your firmware is an earlier version.
The following two programs on this page and the next page show how this can be accomplished. The first example uses magnitude plus sign (binary) and the second example uses magnitude plus sign (BCD). The examples only show two channels.
It is good to know when a value is negative, so these rungs should be placed before any other operations that use the data, such as math instructions, scaling operations, etc. Also, if stage programming instructions are being used, these rungs should be in a stage that is always active.
NOTE: This logic is only needed for each channel that is using bipolar input signals.
is obtained, the
hex
Magnitude Plus Sign (Binary)
SP1
Check Channel2
SP1
Load channel 1datafromV-memoryintothe accumulator.Contact SP1 is always on.
This instruction masksthe sign bitofthe binary data, if it is set. Withoutthisstep, negativevalueswill not be correct so do notforget to include it.
Putthe actual signal value in V2010. Nowyou canuse thedatanormally.
C1
Channel 1datais negativewhenC1ison(avalue of
OUT
-- 1.0reads as 8010,--2.0 is 8020,etc.).
Load channel 2fromV-memoryintothe accumulator. Contact SP1 is always on.
This instruction masksthe sign bitofthe binary data, if it is set. Withoutthisstep, negativevalueswill not be correct so do notforget to include it.
Putthe actual signal value in V2012. Nowyou canuse thedatanormally.
C2
Channel 2datais negativewhenC2ison(avalue of
OUT
-- 1.0reads as 8010,--2.0 is 8020,etc.).
V2000 K8000
²
V2002 K8000
LD V2000
ANDD K7FFF
OUT V2010
LD V2002
ANDD K7FFF
OUT V2012
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-17
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Magnitude Plus Sign (BCD)
Check Channel1
SP1
LDD V2000
Load channel 1datafromV-memoryintothe accumulator. Remember,the data canbe negative. Contact SP1 is always on.
V2001 K8000
Check Channel2
SP1
V2003 K8000
ANDD
K7FFFFFFF
OUTD V2010
²
LDD V2002
ANDD
K7FFFFFFF
OUTD V2012
²
This instruction masks thesignbit of theBCD data, if it is set. Withoutthis step, negative values will not be correct so do notforget to include it.
Putthe actual signal value in V2010. Nowyou canuse thedatanormally.
C1
Channel 1datais negativewhenC1ison(avalue of
OUT
-- 1.0reads as 8000 0010, -- 2.0is8000 0020,etc.).
Load channel 2fromV-memoryintothe accumulator. Remember, the datacan be negative.Contact SP1 is always on.
This instruction masks thesignbit of theBCD data, if it is set. Withoutthis step, negative values will not be correct so do notforget to include it.
Putthe actual signal value in V2012. Nowyou canuse thedatanormally.
C2
Channel 2datais negativewhenC2ison(avalue of
OUT
-- 1.0reads as 8000 0010, -- 2.0is8000 0020,etc.).
7-18
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Repeatfor other channelsasrequired.
F2-04THM
Negative Temperatures 2’s Complement (Binary/Pointer Method) for D2-240, D2-250-1, D2-260 and D2-262 CPUs
The 2’s complement mode is used for negative temperature display purposes, while at the same time using the magnitude plus sign of the temperature in a control program. The DirectSoft element Signed Decimal is used to display negative numbers in 2’s complement form. To find the absolute value of a negative number in 2’s complement, invert the number and add 1 as shown in the following example:
V2000K8000
²
LD V2000
INV
ADDB K1
OUT V2010
Loadnegativevalue into theaccumulator so we canconvertittoapositivevalue.
Invert thebinarypattern in theaccumulator.
Add1.
Save Channel1dataatV2010.
Understanding the Input Assignments (Multiplexing Ladder Only)
Remember that the F2-04THM module appears as a 32-point discrete input module to the CPU. Use these points to obtain:
• An indication of which channel is active
• The digital representation of the analog signal
• Module diagnostic information
Since all input points are automatically mapped into V-memory, it is easy to determine the location of the data word that will be assigned to the module.
Slot 0Slot1 Slot 2Slot3 Slot 4
8pt
Input
X0
X7
8pt
Input
X10
--
--
X17
Input
X20
X57
--
16pt
16pt32pt
InputOutput
X60
Y0
--
X77
Y17
--
V40402
X 5 7
X
X
4
5
7
0
DL205 Analog I/O Manual, 7th Edition, Rev. G
V40400V40403
BSLBSM
0134567891011121314 251Bit 0134567891011121314 251Bit
X
X
3
4
7
0
V40401
X 3 0
BSLBSM
X 2 7
X 2 0
7-19
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
V40401
0
7
V40402
=brokentransmitter bits
When a D2-230 CPU is used, the input points must start on a V-memory boundary. To use the V-memory references required for a D2-230 CPU, refer to the table below. The first input address assigned to a module must be one of the X inputs shown. The table also shows the V-memory addresses that correspond to these X inputs.
X V
X0 X20 X40 X60 X100 X120 X140 X160
V40400 V40401 V40402 V40403 V40404 V40405 V40406 V40407
Analog Data Bits
The first 16 bits represent the analog data in binary format.
Bit Value Bit Value
0 1 8 256 1 2 9 512 2 4 10 1024 3 8 11 2048 4 16 12 4096 5 32 13 8192 6 64 14 16384 7 128 15 32768
Active Channel Bits
The active channel bits represent the multiplexed channel selections in binary format.
Bit 1 Bit 0 Channel
0 0 1 0 1 2 1 0 3 1 1 4
BSLBSM
1213141
5
X 3
X 5 7
= databits
V40402
=activechannelbits
01110987 654321
X 2
BSLBSM
01
X 4 0
7-20
Broken Transmitter Bits (Pointer and Multiplexing Ladder Methods)
The broken transmitter bits are on when the corresponding RTD is open.
Bit Channel
8 1 9 2 10 3 11 4
DL205 Analog I/O Manual, 7th Edition, Rev. G
BSLBSM
01110987654321
X 5 7
X
X
4
5
7
0
X 4 0
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
value is negative.
Reading Magnitude Plus Sign Values (Multiplexing)
The D2-230 CPU does not have the special V-memory locations that allows for automatic management of the data transfer. Since all channels are multiplexed into a single data word, the control program must be set up to determine which channel is being read. Since the module appears as X input points to the CPU, it is very easy to use the active channel status bits to determine which channel is being monitored.
NOTE: D2-230 CPUs with firmware release version 1.6 or later required for multiplexing ladder.
SP1
StoreChannel 1
X40 X41 X50
StoreChannel 2
X40 X41 X51
StoreChannel 3
X40 X41 X52
StoreChannel 4
X40 X41 X53
X37
X37
X37
X37
LD V40401
ANDD K7FFF
OUT V2000
OUT V2001
OUT V2002
OUT V2003
RST
SET
C1
RST
C1
SET
C2
RST
C2
SET
C3
RST
C3
SET
Loadsthe complete datawordintothe accumulator. TheV-memorylocation depends on theI/O configuration. SeeAppendixAforthe memory map.
This instructionmasks thesign bit.Without this, thevaluesusedwillnot be correctsodo not forget to include it.
When X40, X41, andX50 areoff,channel 1 datais stored in V2000. C0 is resettoindicate that channel1’s value is positive.
C0
C0
If X37ison, the datavalue representsanegative temperature. C0 is settoindicate that channel1’s value is negative.
When X40isonand X41 and X51are off, channel 2dataisstoredinV2001. C1 is resettoindicate that channel2’s value is positive.
If X37ison, the datavalue representsanegative temperature. C1 is settoindicate that channel2’s value is negative.
When X40and X52are off and X41is on, channel 3dataisstoredinV2002. C2 is resettoindicate that channel3’s value is positive.
If X37ison, then the datavalue representsa negative temperature. C2 is settoindicate that channel3’s value is negative.
When bothX40 andX41 areonand X53isoff, channel4data is stored in V2003. C3 is resetto indicate that channel 4’svalue is positive.
If X37ison, the datavalue representsanegative temperature. C3 is settoindicate that channel4’s
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-21
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
LoadData
Reading 2’s Compliment Values (Multiplexing)
The D2-230 CPU does not have the special V-memory locations that allows for automatic management of the data transfer. Since all channels are multiplexed into a single data word, the control program must be set up to determine which channel is being read. Since the module appears as X input points to the CPU, it is very easy to use the active channel status bits to determine which channel is being monitored. The 2’s complement data format may be required to correctly display bipolar data on some operator interfaces. This data format could also be used to simplify averaging a bipolar signal. To view this data format in DirectSOFT, select Signed Decimal.
SP1
StoreChannel 1
X40 X41 X50
StoreChannel 2
X40 X41 X51
StoreChannel 3
X40 X41 X52
StoreChannel 4
X40 X41 X53
LD
V40401
ANDD K7FFF
OUT V2000
OUT V2001
OUT V2002
OUT V2003
Loadsthe complete datawordintothe accumulator. TheV-memorylocation depends on theI/O configuration.
This instruction masksthe channel sign bit.
When X40, X41 and X50are off, channel1data is stored in V2000.
When X40isonand X41 and X51are off, channel2 dataisstoredinV2001.
When X40 and X52are off and X41ison, channel3 dataisstoredinV2002.
When bothX40 and X41are on and X53isoff,channel 4 dataisstoredinV2003.
Scaling the Input Data
No scaling of the input temperature is required. The readings directly reflect the actual temperatures. For example: a reading of 8482 is 848.2°C, a reading of 16386 is -0.2°C (magnitude plus sign) and a reading of 32770 is -0.2°C (2’s complement).
7-22
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
5
73
Module Resolution 16-Bit (Unipolar Voltage Input)
Unipolar analog signals are converted into 65536 counts ranging from 0–65535 (216). For example, with a 0–156mV signal range, 78mV would be 32767. A value of 65535 represents the upper limit of the range.
H or L = high or low limit of the range
Unipolar Resolution = 65535
H – L
5V
2.5V
0V
156mV
Module Resolution 15-Bit Plus Sign(Bipolar Voltage Input)
The module has 16-bit unipolar or 15-bit + sign bipolar resolution. Bipolar analog signals are converted into 32768 counts ranging from 0–32767 (215). For example, with a -156mV–156mV signal range, 156mV would be 32767. The bipolar ranges utilize a sign bit to provide 16-bit resolution. A value of 32767 can represent the upper limit of either side of the range. Use the sign bit to determine negative values.
H or L = high or low limit of the range
Bipolar Resolution = 32767
H – L
156mV
0V
-- 156mV
78 mV
0V
5V
0V
-- 5V 3276
3556032767
Counts
27670
Counts
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-23
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
Analog and Digital Value Conversions
Sometimes it is useful to be able to quickly convert between the signal levels and the digital values. This is especially helpful during startup or troubleshooting. This module does not operate like other versions of analog input modules. The bipolar ranges use 0–32767 for both positive and negative voltages. The sign bit allows this and it actually provides better resolution than those modules that do not offer a sign bit. The following table provides formulas to make this conversion easier.
Range If the digital value is known
5D
0–5 V
0–156.25 mV
±5V
±156.25 mV
A =
65535
0.15625D
A =
65535
A =
65535
0.3125D
A =
65535
10D
For example, if the ±5V range is used and the signal is measured at 2.5V, use the following formula to determine the digital value that is stored in the V-memory location that contains the data.
If the analog signal level is
known.
65535
D =
D =
D =
D =
D = 10
D = 10
5
65535
0.15625 65535
10
65535
0.3125
65535
(A)
(A)
(A)
(A)
65535
(2.5V)
D = 6553.5 (2.5)
D = 16383.75
(A)
7-24
DL205 Analog I/O Manual, 7th Edition, Rev. G
Chapter 7: F2-04THM, 4-Channel Thermocouple Input
SP1
Filtering Input Noise (D2-250-1, D2-260 and D2-262 CPUs Only)
Add the following logic to filter and smooth analog input noise in D2-250-1, D2-260 and D2-262 CPUs. This is especially useful when using PID loops. Noise can be generated by the field device and/or induced by field wiring.
In the following example, the analog value in BCD is first converted to a binary number. Memory location V1400 is the designated workspace in this example. The MULR instruction is the filter factor, which can be from 0.1–0.9. The example uses 0.2. Using a smaller filter factor increases filtering. A higher precision value can be used, but it is not generally needed. The filtered value is then converted back to binary and then to BCD. The filtered value is stored in location V1402 for use in the application program or a PID loop.
NOTE: Please review intelligent instructions (IBox) in Chapter 5, which simplify this and other functions. The IBox instructions are supported by the D2-250-1, D2-260 and D2-262.
NOTE: Be careful not to do a multiple number conversion on a value. For example, if the pointer method is used to get the analog value, it is in BCD and must be converted to binary. However, if the conventional method of reading analog is used and the first 15 bits are masked, the value is already in binary and no conversion is needed. Also, if the conventional method is used, change the LDD V2000 instruction to LD V2000.
LDD V2000
BIN
BTOR
SUBR V1400
MULR R0.2
ADDR V1400
OUTD V1400
RTOB
BCD
OUTD V1402
Loadsthe analog signal, whichisaBCDvalue and has beenloadedfromV-memorylocation V2000,intothe accumulator.Contact SP1 is always on.
Converts theBCD value in theaccumulator to binary. Remember,thisinstruc tion is not neededifthe analog value is originally broughtinasabinary number.
Converts thebinar yvalue in theaccumulator toarealnumber.
Subtractsthe real numberstoredinlocation V1400 from thereal numberinthe accumulator, and stores theresultinthe accumulator.V1400 is thedesignatedworkspaceinthisexample.
Multipliesthe real number in the accumulatorby0.2 (the filter factor), and stores theresultinthe accumulator.This is thefiltered value.
Adds thereal numberstoredin locationV1400 to therealnumber filtered valueinthe accumulator, and stores theresult in theaccumulator.
Copies thevalue in theaccumulator to location V1400.
Converts thereal number in the accumulatortoabinaryvalue, and stores theresult in theaccumulator.
Converts thebinaryvalue in theaccumulator to aBCD number. NOTE: The BCD instruction is not needed for PID loop PV (loop PV is a binary number).
Loads theBCD number filtered valuefrom theaccumulator intolocationV1402touse in your applicationorPID loop.
DL205 Analog I/O Manual, 7th Edition, Rev. G
7-25
Loading...