versadac  1
versadac - Scalable Recorder Firmware
eiot2cal.h
1 /*******************************************************************************
2 FILE : eiot2cal.h
3 VERSION : $Id: eiot2cal.h 5305 2006-10-27 12:09:59Z martinto $
4 AUTHOR : Phil Windsor
5 SYSTEM : Diab C for PowerPC under vxWorks
6 DESCRIPTION : Types used for calibration of T2500 analogue input and output modules
7 low*******************************************************************************/
8 #ifndef __EIOT2CAL_H
9 #define __EIOT2CAL_H
10 
11 #include "eio_ai.h"
12 #include "eio_ao.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* Used to communicate with the calibration state machine on AI modules */
19 typedef enum
20 {
21  EIO_AI_CAL_REQUEST_NONE, // no calibration operation requested
22  EIO_AI_CAL_REQUEST_ABORT, // user has requested termination of any calibration in progress (NOT RESTORE)
23  EIO_AI_CAL_REQUEST_CAL, // user has requested calibration to start
24  EIO_AI_CAL_REQUEST_SET_RANGE, // user has set range to calibrate
25  EIO_AI_CAL_REQUEST_CAL_STARTED, // system has switched to calibration range and is waiting for user to supply input
26  EIO_AI_CAL_REQUEST_START_MEASUREMENT, // user has applied input
27  EIO_AI_CAL_REQUEST_MEASUREMENT_COMPLETE, // system has finished collecting data for this calibration point
28  EIO_AI_CAL_REQUEST_SET_VALUE, // user has set the exact input level supplied
29  EIO_AI_CAL_REQUEST_SAVE, // user has requested new cal values to be saved to EEPROM
30  EIO_AI_CAL_REQUEST_SET_DEFAULT, // user has requested default cal values to be set
31  EIO_AI_CAL_REQUEST_RESTORE,
32  EIO_AI_CAL_REQUEST_WRITE_PROCESS_WORD
33 }EioAiCalibrationRequest;
34 
35 /* Calibration runtime data on AI modules*/
36 typedef struct
37 {
38  EioUint8 rangeNumber;
39  EioAICalType calType;
40  EioAiCalibrationRequest calibrationRequest;
41  float actualCalValue;
42  EioUint16 writeProcessWord;
44 
45 /* Used to communicate with the calibration state machine on the AO2 module */
46 typedef enum
47 {
48  EIO_AO_CAL_REQUEST_NONE, // no calibration operation requested
49  EIO_AO_CAL_REQUEST_ABORT, // user has requested termination of any calibration in progress (NOT RESTORE)
50  EIO_AO_CAL_REQUEST_CAL, // user has requested calibration to start
51  EIO_AO_CAL_REQUEST_SET_RANGE, // user has set range to calibrate
52  EIO_AO_CAL_REQUEST_CAL_STARTED, // system is outputting nominal calibration point value
53  EIO_AO_CAL_REQUEST_NEW_OUTPUT, // user has set actual calibration point value to output
54  EIO_AO_CAL_REQUEST_MEASURED_VALUE, // user has measured output value
55  EIO_AO_CAL_REQUEST_SAVE, // user has requested new cal values to be saved to EEPROM
56  EIO_AO_CAL_REQUEST_SET_DEFAULT, // user has requested default cal values to be set
57  EIO_AO_CAL_REQUEST_DEFAULT // system is setting default cal values
58 }EioAoCalibrationRequest;
59 
60 /* Calibration runtime data on AO2 module*/
61 typedef struct
62 {
63  EioUint8 rangeNumber;
64  EioAOCalType calType;
65  EioAoCalibrationRequest calibrationRequest;
66  float actualCalValue;
67  float measuredValue;
69 
70 /* Calibration range data on AI modules */
71 typedef struct
72 {
73  EioAICalRangeType rangeType;
74  float rangeLowLimit;
75  float rangeHighLimit;
76  float calPointLow;
77  float calPointHigh;
79 
80 #ifdef __cplusplus
81 } /* extern "C" */
82 #endif
83 #endif /* __EIOT2CAL_H */
Definition: eiot2cal.h:36
Definition: eiot2cal.h:71
Definition: eiot2cal.h:61