Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 15 of 16

SLC 500 4-Channel Analog I/O Modules User Manual: C - Optional Analog Input Software Calibration

Pages 101 to 106 of 113, from SLC 500 4-Channel Analog I/O Modules User Manual

The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1746-NI4

Page 101

Appendix

C

Optional Analog Input Software Calibration

This appendix helps you calibrate an analog input channel using software offsets to increase the expected accuracy of an analog input circuit. Examples of equations and a ladder diagram are provided for your reference. A software calibration reduces the offset error and gain error at a given temperature by scaling the values read at calibration time.

Calibrating an Analog Input Channel

The following procedure can be adapted to all analog inputs; current or voltage. For this example the 1746-NI4 with a 4 mA to 20 mA input is used. Refer to the 1746-NI4 specifications in appendix A. These specifications represent the worst case values. The overall error for the NI4, which is guaranteed to be not more than ± 0.365% includes non-linearity, repeatability, offset error and gain error at a given temperature. The overall error of ± 0.365% at 20 mA equates to ± 60 LSB of error, or a code range of 16324 to 16444. Any value in this range is returned by an analog input channel at 20 mA. The expected nominal value at 20 mA is 16384. After performing a software calibration the overall error is reduced to 3 LSB, or a code range of 16381 to 16387. The graph on the next page shows the linear relationship between the input value and the resulting scaled value. The values in this graph are from the example program.

1

Publication 1746-UM005B-EN-P - June 2004

Page 102

C-2

Optional Analog Input Software Calibration

20 mA = 16384 (scale Hi)

Scaled Value

4 mA = 3277 (scale low) 3267 Low Value from card

16396 Hi Value from card

Input Value Scaled Value vs. Input Value

Calculating the Software Calibration Use the following equation to perform the software calibration: Scaled Value = (input value x slope) + offset Slope = (scaled max. - scaled min.) / (input max. - input min.) Offset = Scaled min. - (input min. x slope)

Procedure 1. Place your SLC 500 system in the normal operating temperature. Ensure that adjacent I/O modules in your system do not cause temperature fluctuations. For example, place high power and random load I/O modules away from your analog input module. 2. Determine the scaled high and low values you wish to use in your application. In this example, scaled high is 16384 and scaled low is 3277. 3. Using an analog input calibration source or your system’s input device placed at the 4 mA position, capture the low value by energizing the calibrate low input. Ensure that your low value lies within the conversion range of your analog input.

Publication 1746-UM005B-EN-P - June 2004

Page 103

Optional Analog Input Software Calibration

C-3

4. Using an analog input calibration source or your system’s input device placed at the 20 mA position, capture the high value by energizing the calibrate high input. Ensure that your high value lies within the conversion range of your analog input. 5. Energize the calibrate input. This causes the SLC to calculate the slope and offset values used to perform the error correction to the analog input. The analog channel is now calibrated to ± 3 LSB at the calibration temperature. Use the offset error drift and gain error drift to calculate the amount of additional error that can be introduced into your system due to temperature variation. The recommended calibration period is once every 6 months. If an application has a wide range of operating temperatures, a software calibration should be performed every 3 to 4 months.

Publication 1746-UM005B-EN-P - June 2004

Page 104

C-4

Optional Analog Input Software Calibration

Example Ladder Diagram The following ladder diagram requires 3 external inputs that are used to perform the calibration procedure. Lo causes the ladder to capture the 4 mA calibration value and Hi causes the ladder to capture the 20 mA calibration value. Cal causes the ladder diagram to scale the Hi and Lo values to the nominal values, which provides the slope and offset values used to calibrate the analog input channel. The following symbols are used in this example: Cal_Lo= I:1.0/0 Cal_Hi= I:1.0/1 Calibrate= I:1.0/2 Conversion= N10:0/3 Enable Analog_In= I:2.0 Lo_Value= N10:1 Hi_Value= N10:2 Scale_Hi= N10:3 Scale_Lo= N10:4 Scale_Span= N10:7 Span= N10:9 Slope_x10K= N10:18 Offset= N10:19 Analog_Scl= N10:20

Publication 1746-UM005B-EN-P - June 2004

Page 105

Optional Analog Input Software Calibration

C-5

Rung 2:0 | Cal_Lo | | I:1 N10:0 +MOV---------------+ | |----] [------[OSR]---------------------------------------+MOVE +-| | 0 0 |Source ANALOG_IN| | | | 8000| | | |Dest LO_VALUE| | | | 3267| | | +------------------+ | Rung 2:1 | Cal_Hi | | I:1 N10:0 +MOV---------------+ | |----] [------[OSR]---------------------------------------+MOVE +-| | 1 1 |Source ANALOG_IN| | | | 8000| | | |Dest HI_VALUE| | | | 16396| | | +------------------+ | Rung 2:2 | Calibrate | | I:1 N10:0 +SUB---------------+ | |----] [------[OSR]------------------------------+-+SUBTRACT +------+-| | 2 2 | |Source A HI_VALUE| | | | | | 16396| | | | | |Source B LO_VALUE| | | | | | 3267| | | | | |Dest SPAN| | | | | | 13129| | | | | +------------------+ | | | | +SUB---------------+ | | | +-+SUBTRACT +------+ | | | |Source A SCALE_HI| | | | | | 16384| | | | | |Source B SCALE_LO| | | | | | 3277| | | | | |Dest SCALE_SPAN| | | | | | 13107| | | | | +------------------+ | | | | +MUL--------------------+ | | | +-+MULTIPLY +-+ | | | |Source A SCALE_SPAN| | | | | | 13107| | | | | |Source B 10000| | | | | | | | | | | |Dest N10:16| | | | | | 32767| | | | | +-----------------------+ | | | | +DDV---------------+ | | | +-+DOUBLE DIVIDE +------+ | | | |Source SPAN| | | | | | 13129| | | | | |Dest SLOPE_X10K| | | | | | 9983| | | | | +------------------+ | |

Ladder logic continued on the next page.

Publication 1746-UM005B-EN-P - June 2004

Page 106

C-6

Optional Analog Input Software Calibration

| | +MUL--------------------+ | | | +-+MULTIPLY +-+ | | | |Source A LO_VALUE| | | | | | 3267| | | | | |Source B SLOPE_X10K| | | | | | 9983| | | | | |Dest N10:5| | | | | | 32767| | | | | +-----------------------+ | | | | +DDV---------------+ | | | +-+DOUBLE DIVIDE +------+ | | | |Source 10000| | | | | | | | | | | |Dest N10:6| | | | | | 3261| | | | | +------------------+ | | | | +SUB---------------+ | | | +-+SUBTRACT +------+ | | | |Source A SCALE_LO| | | | | | 3277| | | | | |Source B N10:6| | | | | | 3261| | | | | |Dest OFFSET| | | | | | 16| | | | | +------------------+ | | | | S:5 | | | +--(U)----------------------+ | | 0 | Rung 2:3 | Conversion | | Enable | | N10:0 +MUL--------------------+ | |----] [-----------------------------------------+-+MULTIPLY +-+-| | 3 | |Source A ANALOG_IN| | | | | | 8000| | | | | |Source B SLOPE_X10K| | | | | | 9983| | | | | |Dest N10:8| | | | | | 0| | | | | +-----------------------+ | | | | S:5 | | | +--(U)----------------------+ | | | 0 | | | | +DDV---------------+ | | | +-+DOUBLE DIVIDE +------+ | | | |Source 10000| | | | | | | | | | | |Dest N10:12| | | | | | 0| | | | | +------------------+ | | | | | | +ADD---------------+ | | | +-+ADD +------+ | | |Source A N10:12| | | | 0| | | |Source B OFFSET| | | | 16| | | |Dest ANALOG_SCL| | | | 8002| | | +------------------+ | Rung 2:4 | | |-------------------------------------+END+------------------------------------|

Publication 1746-UM005B-EN-P - June 2004