(Working) Code to interface 3 LoadCells to ADISense1000 and display values using the Labview code.

Fork of 4Bridge_ADISense1000_Example_copy by CAC_smartcushion

Committer:
seanwilson10
Date:
Thu Jan 25 16:00:23 2018 +0000
Revision:
0:76fed7dd9235
initial;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
seanwilson10 0:76fed7dd9235 1 /*!
seanwilson10 0:76fed7dd9235 2 ******************************************************************************
seanwilson10 0:76fed7dd9235 3 * @file: adi_sense_1000_calibration.h
seanwilson10 0:76fed7dd9235 4 * @brief: Constants defining a table of calibration constants for the device
seanwilson10 0:76fed7dd9235 5 *-----------------------------------------------------------------------------
seanwilson10 0:76fed7dd9235 6 *
seanwilson10 0:76fed7dd9235 7 Copyright 2017 (c) Analog Devices, Inc.
seanwilson10 0:76fed7dd9235 8
seanwilson10 0:76fed7dd9235 9 All rights reserved.
seanwilson10 0:76fed7dd9235 10
seanwilson10 0:76fed7dd9235 11 Redistribution and use in source and binary forms, with or without
seanwilson10 0:76fed7dd9235 12 modification, are permitted provided that the following conditions are met:
seanwilson10 0:76fed7dd9235 13 - Redistributions of source code must retain the above copyright
seanwilson10 0:76fed7dd9235 14 notice, this list of conditions and the following disclaimer.
seanwilson10 0:76fed7dd9235 15 - Redistributions in binary form must reproduce the above copyright
seanwilson10 0:76fed7dd9235 16 notice, this list of conditions and the following disclaimer in
seanwilson10 0:76fed7dd9235 17 the documentation and/or other materials provided with the
seanwilson10 0:76fed7dd9235 18 distribution.
seanwilson10 0:76fed7dd9235 19 - Neither the name of Analog Devices, Inc. nor the names of its
seanwilson10 0:76fed7dd9235 20 contributors may be used to endorse or promote products derived
seanwilson10 0:76fed7dd9235 21 from this software without specific prior written permission.
seanwilson10 0:76fed7dd9235 22 - The use of this software may or may not infringe the patent rights
seanwilson10 0:76fed7dd9235 23 of one or more patent holders. This license does not release you
seanwilson10 0:76fed7dd9235 24 from the requirement that you obtain separate licenses from these
seanwilson10 0:76fed7dd9235 25 patent holders to use this software.
seanwilson10 0:76fed7dd9235 26 - Use of the software either in source or binary form, must be run
seanwilson10 0:76fed7dd9235 27 on or directly connected to an Analog Devices Inc. component.
seanwilson10 0:76fed7dd9235 28
seanwilson10 0:76fed7dd9235 29 THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
seanwilson10 0:76fed7dd9235 30 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
seanwilson10 0:76fed7dd9235 31 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
seanwilson10 0:76fed7dd9235 32 IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
seanwilson10 0:76fed7dd9235 33 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
seanwilson10 0:76fed7dd9235 34 LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
seanwilson10 0:76fed7dd9235 35 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
seanwilson10 0:76fed7dd9235 36 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
seanwilson10 0:76fed7dd9235 37 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
seanwilson10 0:76fed7dd9235 38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
seanwilson10 0:76fed7dd9235 39 *
seanwilson10 0:76fed7dd9235 40 *****************************************************************************/
seanwilson10 0:76fed7dd9235 41
seanwilson10 0:76fed7dd9235 42 #ifndef __ADI_SENSE_1000_CALIBRATION_H__
seanwilson10 0:76fed7dd9235 43 #define __ADI_SENSE_1000_CALIBRATION_H__
seanwilson10 0:76fed7dd9235 44
seanwilson10 0:76fed7dd9235 45 #include "adi_sense_types.h"
seanwilson10 0:76fed7dd9235 46
seanwilson10 0:76fed7dd9235 47 typedef enum {
seanwilson10 0:76fed7dd9235 48 ADI_SENSE_1000_CAL_INTERNAL_REFERENCE_ABSOLUTE_VALUE_CAL_COEFFICIENT,
seanwilson10 0:76fed7dd9235 49 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_1MA,
seanwilson10 0:76fed7dd9235 50 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_750UA,
seanwilson10 0:76fed7dd9235 51 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_500UA,
seanwilson10 0:76fed7dd9235 52 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_250UA,
seanwilson10 0:76fed7dd9235 53 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_100UA,
seanwilson10 0:76fed7dd9235 54 ADI_SENSE_1000_CAL_EXCITATION_CURRENT_MISMATCH_CAL_COEFFICIENT_50UA,
seanwilson10 0:76fed7dd9235 55 ADI_SENSE_1000_CAL_REFERENCE_RESISTER1_CAL_COEFFICIENT,
seanwilson10 0:76fed7dd9235 56 ADI_SENSE_1000_CAL_REFERENCE_RESISTER2_CAL_COEFFICIENT,
seanwilson10 0:76fed7dd9235 57
seanwilson10 0:76fed7dd9235 58 ADI_SENSE_1000_CAL_TC_TYPE_AFE_OFFSET_MEASURE0,
seanwilson10 0:76fed7dd9235 59 ADI_SENSE_1000_CAL_TC_TYPE_AFE_GAIN_MEASURE0,
seanwilson10 0:76fed7dd9235 60 ADI_SENSE_1000_CAL_TC_TYPE_AFE_OFFSET_MEASURE1,
seanwilson10 0:76fed7dd9235 61 ADI_SENSE_1000_CAL_TC_TYPE_AFE_GAIN_MEASURE1,
seanwilson10 0:76fed7dd9235 62 ADI_SENSE_1000_CAL_TC_TYPE_AFE_OFFSET_MEASURE2,
seanwilson10 0:76fed7dd9235 63 ADI_SENSE_1000_CAL_TC_TYPE_AFE_GAIN_MEASURE2,
seanwilson10 0:76fed7dd9235 64 ADI_SENSE_1000_CAL_TC_TYPE_AFE_OFFSET_MEASURE3,
seanwilson10 0:76fed7dd9235 65 ADI_SENSE_1000_CAL_TC_TYPE_AFE_GAIN_MEASURE3,
seanwilson10 0:76fed7dd9235 66 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_OFFSET_MEASURE0,
seanwilson10 0:76fed7dd9235 67 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_GAIN_MEASURE0,
seanwilson10 0:76fed7dd9235 68 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_OFFSET_MEASURE1,
seanwilson10 0:76fed7dd9235 69 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_GAIN_MEASURE1,
seanwilson10 0:76fed7dd9235 70 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_OFFSET_MEASURE2,
seanwilson10 0:76fed7dd9235 71 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_GAIN_MEASURE2,
seanwilson10 0:76fed7dd9235 72 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_OFFSET_MEASURE3,
seanwilson10 0:76fed7dd9235 73 ADI_SENSE_1000_CAL_RTD_4_WIRE_TYPE_AFE_GAIN_MEASURE3,
seanwilson10 0:76fed7dd9235 74 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_OFFSET_MEASURE0,
seanwilson10 0:76fed7dd9235 75 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_GAIN_MEASURE0,
seanwilson10 0:76fed7dd9235 76 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_OFFSET_MEASURE1,
seanwilson10 0:76fed7dd9235 77 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_GAIN_MEASURE1,
seanwilson10 0:76fed7dd9235 78 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_OFFSET_MEASURE2,
seanwilson10 0:76fed7dd9235 79 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_GAIN_MEASURE2,
seanwilson10 0:76fed7dd9235 80 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_OFFSET_MEASURE3,
seanwilson10 0:76fed7dd9235 81 ADI_SENSE_1000_CAL_RTD_3_WIRE_TYPE_AFE_GAIN_MEASURE3,
seanwilson10 0:76fed7dd9235 82 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE_CJC0,
seanwilson10 0:76fed7dd9235 83 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE_CJC0,
seanwilson10 0:76fed7dd9235 84 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE_CJC1,
seanwilson10 0:76fed7dd9235 85 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE_CJC1,
seanwilson10 0:76fed7dd9235 86 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE0,
seanwilson10 0:76fed7dd9235 87 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE0,
seanwilson10 0:76fed7dd9235 88 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE1,
seanwilson10 0:76fed7dd9235 89 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE1,
seanwilson10 0:76fed7dd9235 90 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE2,
seanwilson10 0:76fed7dd9235 91 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE2,
seanwilson10 0:76fed7dd9235 92 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_OFFSET_MEASURE3,
seanwilson10 0:76fed7dd9235 93 ADI_SENSE_1000_CAL_RTD_2_WIRE_TYPE_AFE_GAIN_MEASURE3,
seanwilson10 0:76fed7dd9235 94 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_OFFSET_MEASURE0,
seanwilson10 0:76fed7dd9235 95 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_GAIN_MEASURE0,
seanwilson10 0:76fed7dd9235 96 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_OFFSET_MEASURE1,
seanwilson10 0:76fed7dd9235 97 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_GAIN_MEASURE1,
seanwilson10 0:76fed7dd9235 98 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_OFFSET_MEASURE2,
seanwilson10 0:76fed7dd9235 99 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_GAIN_MEASURE2,
seanwilson10 0:76fed7dd9235 100 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_OFFSET_MEASURE3,
seanwilson10 0:76fed7dd9235 101 ADI_SENSE_1000_CAL_10K_THERMISTOR_TYPE_AFE_GAIN_MEASURE3,
seanwilson10 0:76fed7dd9235 102 ADI_SENSE_1000_CAL_I_CHANNEL_TYPE_AFE_OFFSET,
seanwilson10 0:76fed7dd9235 103 ADI_SENSE_1000_CAL_I_CHANNEL_TYPE_AFE_GAIN,
seanwilson10 0:76fed7dd9235 104 ADI_SENSE_1000_CAL_V_CHANNEL_TYPE_AFE_OFFSET,
seanwilson10 0:76fed7dd9235 105 ADI_SENSE_1000_CAL_V_CHANNEL_TYPE_AFE_GAIN,
seanwilson10 0:76fed7dd9235 106
seanwilson10 0:76fed7dd9235 107 ADI_SENSE_1000_CAL_NUM_TABLES, /**< Counter of the enum */
seanwilson10 0:76fed7dd9235 108 ADI_SENSE_1000_CAL_NOT_VALID
seanwilson10 0:76fed7dd9235 109 } ADI_SENSE_1000_CAL_CONSTANTS;
seanwilson10 0:76fed7dd9235 110
seanwilson10 0:76fed7dd9235 111
seanwilson10 0:76fed7dd9235 112 typedef enum {
seanwilson10 0:76fed7dd9235 113 ADI_SENSE_1000_CAL_TEMP_P25,
seanwilson10 0:76fed7dd9235 114 ADI_SENSE_1000_CAL_TEMP_M40,
seanwilson10 0:76fed7dd9235 115 ADI_SENSE_1000_CAL_TEMP_P85,
seanwilson10 0:76fed7dd9235 116 ADI_SENSE_1000_CAL_NUM_TEMPS, /**< Counter of the enum */
seanwilson10 0:76fed7dd9235 117 } ADI_SENSE_1000_CAL_TEMP;
seanwilson10 0:76fed7dd9235 118
seanwilson10 0:76fed7dd9235 119 #endif /* __ADI_SENSE_1000_CALIBRATION_H__ */
seanwilson10 0:76fed7dd9235 120