SERIES IP236A INDUSTRIAL I/O PACK FIFO BUFFERED 16 BIT ANALOG OUTPUT MODULE
___________________________________________________________________________________________
- 13 -
6.
The host uses the vector to form a pointer to an interrupt
service routine for the interrupt handler to begin execution.
7.
Example of Generic Interrupt Handler Actions:
a)
Disable the interrupting IP by writing “0” to the
appropriate bit in the AVME9630/60 IP Interrupt Enable
Register.
b)
Service the interrupt.
c)
Clear the interrupting IP by
writing a “1” to the
appropriate bit in the AVME9630/60 IP Interrupt Clear
register.
d)
Enable the interrupting IP by writing “1” to the
appropriate bit in the AVME9630/60 IP Interrupt Enable
Register.
USE OF CALIBRATION DATA
Calibration data is provided in the form of calibration
coefficients, so the user can adjust and improve the accuracy of
the analog output voltage over the uncalibrated state. Each
channel's unique offset and gain calibration coefficients are
stored in memory. The use of software calibration allows the
elimination of hardware calibration potentiometers traditionally
used in producing precision analog outputs.
Software calibration uses some fairly complex equations.
Acromag provides you with the Industrial I/O Pack Software
Library diskette to make communication with the board and
calibration easy. It relieves you from having to turn the
equations of the following sections into debugged software
calibration code.
The functions are written in the “C”
programming language and can be linked into your application.
Refer to the “README.TXT” file in the root directory and the
“INFO236.TXT” file in the “IP236A” subdirectory on the diskette
for details.
Uncalibrated Performance
The uncalibrated performance is affected by two primary
error sources. These are the channel's offset and gain errors.
The use of channel specific calibration coefficients to accurately
adjust offset and gain is important because the worst case
uncalibrated error can be significant (although the typical
uncalibrated errors observed may be much less). See the
specification chapter for details regarding maximum uncalibrated
error.
Calibrated Performance
Accurate calibration of the IP236A can be accomplished
through software control by using calibration coefficients to adjust
the analog output voltage. Unique calibration coefficients are
stored in memory as (1/4 LSB’s) for each channel. Once
retrieved, the channel's unique offset and gain coefficients can be
used to correct the data value sent to the DAC channel to
accurately generate the desired output voltage. See the
specification chapter for details regarding maximum calibrated
error.
Data is corrected using a couple of formulas. Equation (1)
expresses the ideal relationship between the value (Ideal_count)
written to the 16-bit DAC to achieve a specified voltage within the
selected output range.
Equation (1):
Ideal_ Count =
Count_ Span Desired_ Voltage
Ideal_ Volt_ Span
where,
Count_Span
= 65,536 (a 16-bit converter has 2
16
possible levels)
Ideal_Volt_Span
= 20 Volts (for the bipolar 10 Volt range)
= 10 Volts (for the bipolar 5 or unipolar 0 to 10
volt ranges).
Using equation (1), one can determine the ideal count for any
desired voltage within the range. For example, if it is desired to
output a voltage of +5 Volts for the bipolar 10 volt range, the
Ideal_Count of 16,384 results. If this value is used to program
the DAC output, the output value will ap5 Volts to within
the uncalibrated error. This will be acceptable for some
applications.
For applications needing better accuracy, the software
calibration coefficients should be used to correct the Ideal_Count
into the Corrected_Count required to accurately produce the
output voltage. This is illustrated in the next equation.
Equation (2):
Corrected_ Count = Ideal_ Count
Gain_ Correction
Offset_ Corr Ideal_ Zero_ Count
1
where,
Gain_Correction =
Stored_Gain_Error / (4*65,536)
Offset_Correction =
Stored_Offset_Error / 4
Ideal_Zero_Count
= 0 for bipolar 5 and 10 volt ranges
32,768 for unipolar 0 to 10 volt range
Ideal_Count is determined from equation (1) given above.
Stored_Gain_Error and Stored_Offset_Error are written at the
factory and are obtained from memory on the IP236A on a per
channel basis. The Stored_Gain_Error and Stored_Offset_Error
are stored in memory as two’s complement numbers. Refer to
the “Calibration Coefficient Access Register” section for details
on how to read the coefficients from memory.
Using equation (2), you can determine the corrected count
from the ideal count. For the previous example, equation (1)
returned a result 16,384 for the Ideal_Count to produce an output
of +5 Volts. Assuming that a gain error of -185 and an offset
error of -43 are read from memory on the IP236A for the desired
channel, substitution into equation (2) yields:
Corrected_ Count = 16,384
-
= 16,361.6875
1
185
4 65536
43
4
If this value (rounded to 16,362) is used to program the DAC
output, the output value will ap5 Volts to within the
calibrated error (see the specification chapter for details
regarding maximum calibrated error).
Calibration Programming Example
Assume it is necessary to program channel 0 with an output
of -2.5 Volts. Also assume the bipolar range centered around 0
Volts is -10 to +10 Volts.