hp663x2.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:29k
源码类别:

MTK

开发平台:

C++ Builder

  1. /*****************************************************************************/
  2. /*  $Header: /VXIPnP/Eagle/hp663x2/hp663x2.h 3     5/22/00 10:19a Rickc $  */
  3. /*  Copyright 1998-2000 Agilent Technologies, Inc.                           */
  4. /*---------------------------------------------------------------------------*/
  5. /*  Driver for hp663x2, Dynamic Measurement dc Sources                       */
  6. /*  Driver Version: A.01.00                                                  */
  7. /*****************************************************************************/
  8. #ifndef hp663x2_INCLUDE 
  9. #define hp663x2_INCLUDE
  10. #include "vpptype.h"
  11. /* Used for "C" externs in C++ */
  12. #if defined(__cplusplus) || defined(__cplusplus__)
  13. extern "C" {
  14. #endif
  15. /*****************************************************************************/
  16. /*  STANDARD SECTION                                                         */
  17. /*  Constants and function prototypes for HP standard functions.             */
  18. /*****************************************************************************/
  19.         /***************************************************/
  20.         /*  Standard constant error conditions returned    */
  21.         /*  by driver functions.                           */
  22.         /*    HP Common Error numbers start at BFFC0D00    */
  23.         /*    The parameter errors extend the number of    */
  24.         /*      errors over the eight defined in VPP 3.4   */
  25.         /***************************************************/
  26. #define HP663X2_INSTR_ERROR_NULL_PTR      (_VI_ERROR+0x3FFC0D02L) /* 0xBFFC0D02 */
  27. #define HP663X2_INSTR_ERROR_RESET_FAILED  (_VI_ERROR+0x3FFC0D03L) /* 0xBFFC0D03 */
  28. #define HP663X2_INSTR_ERROR_UNEXPECTED    (_VI_ERROR+0x3FFC0D04L) /* 0xBFFC0D04 */
  29. #define HP663X2_INSTR_ERROR_INV_SESSION   (_VI_ERROR+0x3FFC0D05L) /* 0xBFFC0D05 */
  30. #define HP663X2_INSTR_ERROR_LOOKUP        (_VI_ERROR+0x3FFC0D06L) /* 0xBFFC0D06 */
  31. #define HP663X2_INSTR_ERROR_DETECTED      (_VI_ERROR+0x3FFC0D07L) /* 0xBFFC0D07 */
  32. #define HP663X2_INSTR_NO_LAST_COMMA       (_VI_ERROR+0x3FFC0D08L) /* 0xBFFC0D08 */ 
  33. #define HP663X2_INSTR_ERROR_PARAMETER9    (_VI_ERROR+0x3FFC0D20L) /* 0xBFFC0D20 */
  34. #define HP663X2_INSTR_ERROR_PARAMETER10   (_VI_ERROR+0x3FFC0D21L) /* 0xBFFC0D21 */
  35. #define HP663X2_INSTR_ERROR_PARAMETER11   (_VI_ERROR+0x3FFC0D22L) /* 0xBFFC0D22 */
  36. #define HP663X2_INSTR_ERROR_PARAMETER12   (_VI_ERROR+0x3FFC0D23L) /* 0xBFFC0D23 */
  37. #define HP663X2_INSTR_ERROR_PARAMETER13   (_VI_ERROR+0x3FFC0D24L) /* 0xBFFC0D24 */
  38. #define HP663X2_INSTR_ERROR_PARAMETER14   (_VI_ERROR+0x3FFC0D25L) /* 0xBFFC0D25 */
  39. #define HP663X2_INSTR_ERROR_PARAMETER15   (_VI_ERROR+0x3FFC0D26L) /* 0xBFFC0D26 */
  40. #define HP663X2_INSTR_ERROR_PARAMETER16   (_VI_ERROR+0x3FFC0D27L) /* 0xBFFC0D27 */
  41. #define HP663X2_INSTR_ERROR_PARAMETER17   (_VI_ERROR+0x3FFC0D28L) /* 0xBFFC0D28 */
  42. #define HP663X2_INSTR_ERROR_PARAMETER18   (_VI_ERROR+0x3FFC0D29L) /* 0xBFFC0D29 */
  43. #define HP663X2_INSTR_ERROR_MEAS_TMO   (_VI_ERROR+0x3FFC0D2AL) /* 0xBFFC0D2A */
  44. #define HP663X2_INSTR_ERROR_PORT_CONFIG   (_VI_ERROR+0x3FFC0D2BL) /* 0xBFFC0D2B */
  45. #define HP663X2_INSTR_ERROR_GET_LIMIT   (_VI_ERROR+0x3FFC0D2CL) /* 0xBFFC0D2C */
  46. #define HP663X2_INSTR_ERROR_NSUP_FUNC   (_VI_ERROR+0x3FFC0D2DL) /* 0xBFFC0D2D */
  47. #define HP663X2_INSTR_ERROR_NSUP_PARAM   (_VI_ERROR+0x3FFC0D2EL) /* 0xBFFC0D2E */
  48.         /***************************************************/
  49.         /*  Constants used by system status functions      */
  50.         /*    These defines are bit numbers which define   */
  51.         /*    the operation and questionable registers.    */
  52.         /*    They are instrument specific.                */
  53.         /***************************************************/
  54. #define HP663X2_STB_QUES 0x0008
  55. #define HP663X2_STB_MAV 0x0010
  56. #define HP663X2_STB_ESB 0x0020
  57. #define HP663X2_STB_MSS 0x0040
  58. #define HP663X2_STB_RQS 0x0040
  59. #define HP663X2_STB_OPER 0x0080
  60. #define HP663X2_SRE_QUES ((ViInt16)8)
  61. #define HP663X2_SRE_MAV ((ViInt16)16)
  62. #define HP663X2_SRE_ESB ((ViInt16)32)
  63. #define HP663X2_SRE_MSS ((ViInt16)64)
  64. #define HP663X2_SRE_OPER ((ViInt16)128)
  65. #define HP663X2_OPER_CAL 0x0001
  66. #define HP663X2_OPER_WTG 0x0020
  67. #define HP663X2_OPER_CV 0x0100
  68. #define HP663X2_OPER_CC_POS 0x0400
  69. #define HP663X2_OPER_CC_NEG 0x0800
  70. #define HP663X2_QUES_OV 0x0001
  71. #define HP663X2_QUES_OCP 0x0002
  72. #define HP663X2_QUES_FUSE 0x0004
  73. #define HP663X2_QUES_OT 0x0010
  74. #define HP663X2_QUES_RI 0x0200
  75. #define HP663X2_QUES_UNREG 0x0400
  76. #define HP663X2_QUES_OVLD 0x4000
  77. #define HP663X2_ESR_OPC 0x0001
  78. #define HP663X2_ESR_QYE 0x0004
  79. #define HP663X2_ESR_DDE 0x0008
  80. #define HP663X2_ESR_EXE 0x0010
  81. #define HP663X2_ESR_CME 0x0020
  82. #define HP663X2_ESR_PON 0x0080
  83. #define HP663X2_REG_ESE 0
  84. #define HP663X2_REG_SRE 1
  85. #define HP663X2_REG_OPER 2
  86. #define HP663X2_REG_QUES 3
  87. #define HP663X2_CMDSTRING_MAX 256
  88. #define HP663X2_CMDSTRING_Q_MIN 2
  89. #define HP663X2_CMDSTRING_Q_MAX 32767L
  90. /***************************************************/
  91.         /*  Constants used by function hp663x2_timeOut      */
  92.         /***************************************************/
  93. #define HP663X2_TIMEOUT_MAX         2147483647L
  94. #define HP663X2_TIMEOUT_MIN         0L
  95.         /***************************************************/
  96.         /*  Required plug and play functions from VPP-3.1  */
  97.         /***************************************************/
  98. ViStatus _VI_FUNC hp663x2_init (ViRsrc resourceName,
  99. ViBoolean idQuery,
  100.                                 ViBoolean resetDevice,
  101. ViPSession instrumentHandle);
  102. ViStatus _VI_FUNC hp663x2_reset (ViSession instrumentHandle);
  103. ViStatus _VI_FUNC hp663x2_self_test (ViSession instrumentHandle,
  104.                                      ViPInt16 testResult,
  105.                                      ViChar _VI_FAR testMessage[]);
  106. ViStatus _VI_FUNC hp663x2_error_message (ViSession instrumentHandle,
  107.                                          ViStatus statusCode,
  108.                                          ViChar _VI_FAR statusMessage[]);
  109. ViStatus _VI_FUNC hp663x2_error_query (ViSession instrumentHandle,
  110.                                        ViPInt32  errorCode,
  111.    ViChar  _VI_FAR errorMessage[]);
  112. ViStatus _VI_FUNC hp663x2_revision_query (ViSession instrumentHandle,
  113.                                           ViChar _VI_FAR instrumentDriverRevision[],
  114.                                           ViChar _VI_FAR firmwareRevision[] );
  115. ViStatus _VI_FUNC hp663x2_close (ViSession instrumentHandle);
  116. ViStatus _VI_FUNC hp663x2_errorQueryDetect (ViSession instrumentHandle,
  117. ViBoolean errorQueryDetect);
  118. ViStatus _VI_FUNC hp663x2_errorQueryDetect_Q (ViSession instrumentHandle,
  119.                                               ViPBoolean errorQueryDetect);
  120.         /***************************************************/
  121.         /*  HP standard utility functions                  */
  122.         /***************************************************/
  123. ViStatus _VI_FUNC hp663x2_timeOut (ViSession instrumentHandle, ViInt32 timeOut);
  124. ViStatus _VI_FUNC hp663x2_timeOut_Q (ViSession instrumentHandle, ViInt32 *timeOut);
  125. ViStatus _VI_FUNC hp663x2_dcl (ViSession instrumentHandle);
  126. ViStatus _VI_FUNC hp663x2_trg (ViSession instrumentHandle);
  127. ViStatus _VI_FUNC hp663x2_opc_Q (ViSession instrumentHandle,
  128.  ViPBoolean instrumentReady);
  129.         /***************************************************/
  130.         /*  HP standard status functions                   */
  131.         /***************************************************/
  132. ViStatus _VI_FUNC hp663x2_readStatusByte_Q (ViSession instrumentHandle,
  133. ViInt16 *statusByte);
  134. ViStatus _VI_FUNC hp663x2_operEvent_Q (ViSession instrumentHandle,
  135.    ViInt32 *operationEventRegister);
  136. ViStatus _VI_FUNC hp663x2_operCond_Q (ViSession instrumentHandle,
  137.   ViInt32 *operationConditionRegister);
  138. ViStatus _VI_FUNC hp663x2_quesEvent_Q (ViSession instrumentHandle,
  139.    ViInt32 *questionableEventRegister);
  140. ViStatus _VI_FUNC hp663x2_quesCond_Q (ViSession instrumentHandle,
  141.   ViInt32 *questionableConditionRegister);
  142.         /***************************************************/
  143.         /*  HP standard command passthrough functions      */
  144.         /***************************************************/
  145. ViStatus _VI_FUNC hp663x2_cmd (ViSession instrumentHandle,
  146.    ViString stringCommand);
  147. ViStatus _VI_FUNC hp663x2_cmdString_Q (ViSession instrumentHandle,
  148.    ViString queryStringCommand,
  149.    ViInt32 stringSize,
  150.    ViChar _VI_FAR stringResult[]);
  151. ViStatus _VI_FUNC hp663x2_cmdInt(ViSession  instrumentHandle,
  152.  ViString   sendIntegerCommand,
  153.  ViInt32    sendInteger );
  154. ViStatus _VI_FUNC hp663x2_cmdInt16_Q(ViSession  instrumentHandle,
  155.  ViString   queryI16Command,
  156.  ViPInt16   i16Result);
  157. /* End of HP standard declarations */
  158. /*---------------------------------------------------------------------------*/
  159. /*****************************************************************************/
  160. /*  INSTRUMENT SPECIFIC SECTION                                              */
  161. /*  Constants and function prototypes for instrument specific functions.     */
  162. /*****************************************************************************/
  163.         /***************************************************/
  164.         /*  Instrument specific error numbers              */
  165.         /***************************************************/
  166. #define HP663X2_INSTR_ERROR_NVRAM_RD0_CS 1
  167. #define HP663X2_INSTR_ERROR_NVRAM_CONFIG_CS 2
  168. #define HP663X2_INSTR_ERROR_NVRAM_CAL_CS 3
  169. #define HP663X2_INSTR_ERROR_NVRAM_STATE_CS 4
  170. #define HP663X2_INSTR_ERROR_NVRAM_RST_CS 5
  171. #define HP663X2_INSTR_ERROR_RAM_SELFTEST 10
  172. #define HP663X2_INSTR_ERROR_DAC_SELFTEST1 11
  173. #define HP663X2_INSTR_ERROR_DAC_SELFTEST2 12
  174. #define HP663X2_INSTR_ERROR_DAC_SELFTEST3 13
  175. #define HP663X2_INSTR_ERROR_DAC_SELFTEST4 14
  176. #define HP663X2_INSTR_ERROR_OVDAC_SELFTEST 15
  177. #define HP663X2_INSTR_ERROR_DIGIO_SELFTEST 80
  178. #define HP663X2_INSTR_ERROR_INGUARD_RXBUF_OVR 213
  179. #define HP663X2_INSTR_ERROR_RS232_FRAMING 216
  180. #define HP663X2_INSTR_ERROR_RS232_PARITY 217
  181. #define HP663X2_INSTR_ERROR_RS232_RX_OVR 218
  182. #define HP663X2_INSTR_ERROR_FP_UART_OVR 220
  183. #define HP663X2_INSTR_ERROR_FP_UART_FRAMING 221
  184. #define HP663X2_INSTR_ERROR_FP_UART_PARITY 222
  185. #define HP663X2_INSTR_ERROR_FP_RXBUF_OVR 223
  186. #define HP663X2_INSTR_ERROR_FP_TIMEOUT 224
  187. #define HP663X2_INSTR_ERROR_CAL_SWITCH 401
  188. #define HP663X2_INSTR_ERROR_CAL_PASSWORD 402
  189. #define HP663X2_INSTR_ERROR_CAL_DISABLED 403
  190. #define HP663X2_INSTR_ERROR_CAL_RB_CONST 404
  191. #define HP663X2_INSTR_ERROR_CAL_PROG_CONST 405
  192. #define HP663X2_INSTR_ERROR_CAL_CMD_SEQUENCE 406
  193. #define HP663X2_INSTR_ERROR_CVCC_STATUS 407
  194. #define HP663X2_INSTR_ERROR_ALC_NOT_NORMAL 408
  195. #define HP663X2_INSTR_ERROR_TOO_MANY_SWE_POINTS 601
  196. #define HP663X2_INSTR_ERROR_RS232_CMD_ONLY 602
  197. #define HP663X2_INSTR_ERROR_INCOMPATIBLE_FETCH 603
  198. #define HP663X2_INSTR_ERROR_MEAS_OVERRANGE 604
  199.         /***************************************************/
  200.         /*  Instrument specific constants                  */
  201.         /***************************************************/
  202. #define HP663X2_DEFAULT_MEAS_TIMEOUT 5000 /* milliseconds */
  203. #define HP663X2_VOLTAGE 0
  204. #define HP663X2_CURRENT 1
  205. #define HP663X2_DISP_NORMAL 0
  206. #define HP663X2_DISP_TEXT 1
  207. #define HP663X2_MEAS_DC 0
  208. #define HP663X2_MEAS_ACDC 1
  209. #define HP663X2_MEAS_HIGH 2
  210. #define HP663X2_MEAS_LOW 3
  211. #define HP663X2_MEAS_MAX 4
  212. #define HP663X2_MEAS_MIN 5
  213. #define HP663X2_TRIG_SRC_BUS 0
  214. #define HP663X2_TRIG_SRC_INT 1
  215. #define HP663X2_TRIG_COUNT_MAX 100
  216. #define HP663X2_TRIG_COUNT_MIN 1
  217. #define HP663X2_TRIG_SLOPE_EITHER    0
  218. #define HP663X2_TRIG_SLOPE_POS       1
  219. #define HP663X2_TRIG_SLOPE_NEG       2
  220. #define HP663X2_RELAY_POLARITY_NORMAL     0
  221. #define HP663X2_RELAY_POLARITY_REVERSE    1
  222. #define HP663X2_RI_OFF 0
  223. #define HP663X2_RI_LATCHING 1
  224. #define HP663X2_RI_LIVE 2
  225. #define HP663X2_DFI_SRC_PREV 0
  226. #define HP663X2_DFI_SRC_QUES 1
  227. #define HP663X2_DFI_SRC_OPER 2
  228. #define HP663X2_DFI_SRC_ESB 3
  229. #define HP663X2_DFI_SRC_RQS 4
  230. #define HP663X2_DFI_SRC_OFF 5
  231. #define HP663X2_DIG_OUT_MAX 7
  232. #define HP663X2_DIG_OUT_MIN 0
  233. #define HP663X2_PON_STATE_RST 0
  234. #define HP663X2_PON_STATE_RCL0 1
  235. #define HP663X2_SWEEP_INT_MAX 390e-6
  236. #define HP663X2_SWEEP_INT_MIN 15.6e-6
  237. #define HP663X2_SWEEP_SIZE_MIN 1
  238. #define HP663X2_SWEEP_SIZE_MAX 4096
  239. #define HP663X2_SWEEP_OFFSET_MIN -4095
  240. #define HP663X2_SWEEP_OFFSET_MAX 2000000000
  241. #define HP663X2_SENSE_FUNC_VOLT 0
  242. #define HP663X2_SENSE_FUNC_CURR 1
  243. #define HP663X2_CURR_DET_ACDC 0
  244. #define HP663X2_CURR_DET_DC 1
  245. #define HP663X2_CURR_IMM            0
  246. #define HP663X2_CURR_TRIG           1
  247. #define HP663X2_CURR_Q              0
  248. #define HP663X2_CURR_Q_TRIG         1
  249. #define HP663X2_CURR_Q_MAX          2
  250. #define HP663X2_CURR_Q_MIN          3
  251. #define HP663X2_RES_IMM         0
  252. #define HP663X2_RES_TRIG            1
  253. #define HP663X2_RES_Q               0
  254. #define HP663X2_RES_Q_TRIG          1
  255. #define HP663X2_RES_Q_MAX           2
  256. #define HP663X2_RES_Q_MIN           3
  257. #define HP663X2_RES_Q_TRIG_MAX 4
  258. #define HP663X2_RES_Q_TRIG_MIN 5
  259. #define HP663X2_VOLT_IMM 0
  260. #define HP663X2_VOLT_TRIG 1
  261. #define HP663X2_VOLT_OVP 2
  262. #define HP663X2_VOLT_OVP_MAX 3
  263. #define HP663X2_VOLT_OVP_MIN 4
  264. #define HP663X2_VOLT_Q 0
  265. #define HP663X2_VOLT_Q_MAX          1
  266. #define HP663X2_VOLT_Q_MIN 2
  267. #define HP663X2_VOLT_Q_TRIG         3
  268. #define HP663X2_VOLT_Q_TRIG_MAX     4
  269. #define HP663X2_VOLT_Q_TRIG_MIN     5
  270. #define HP663X2_VOLT_Q_OVP 6
  271. #define HP663X2_VOLT_Q_OVP_MAX      7
  272. #define HP663X2_VOLT_Q_OVP_MIN      8
  273. #define HP663X2_ARM_OUTPUT_ONCE 0
  274. #define HP663X2_ARM_OUTPUT_CONTINUOUS 1
  275. #define HP663X2_ARM_OUTPUT_CONTINUOUS_OFF 2
  276. #define HP663X2_ARM_ACQUISITION 3
  277. #define HP663X2_ARM_VOLT_ACQUISITION    4
  278. #define HP663X2_ARM_CURR_ACQUISITION    5
  279. #define HP663X2_TRIG_OUTPUT 0
  280. #define HP663X2_TRIG_ACQUISITION 1
  281. #define HP663X2_SET_VOLT 0
  282. #define HP663X2_SET_CURR 1
  283. #define HP663X2_OUTP_STATUS_OFF 0
  284. #define HP663X2_OUTP_STATUS_CV 1
  285. #define HP663X2_OUTP_STATUS_CC 2
  286. #define HP663X2_OUTP_STATUS_UNREG 3
  287. #define HP663X2_OUTP_STATUS_PROT 4
  288. #define HP663X2_OUTP_STATUS_UNKNOWN 5
  289. #define HP663X2_SENSE_WIND_RECT 0
  290. #define HP663X2_SENSE_WIND_HANN 1
  291. #if 0
  292. /* these are read from the unit at init time */
  293. /*
  294. #define HP663X2_VOLT_TRIG_MAX 20.0
  295. #define HP663X2_VOLT_MAX 20.0
  296. #define HP663X2_CURR_TRIG_MAX 2.0
  297. #define HP663X2_CURR_MAX 2.0
  298. #define HP663X2_VOLT_TRIG_MIN 0
  299. #define HP663X2_VOLT_MIN 0
  300. #define HP663X2_CURR_TRIG_MIN 0
  301. #define HP663X2_CURR_MIN 0
  302. */
  303. #endif
  304. #define HP663X2_ACQ_COUNT_MIN 1
  305. #define HP663X2_ACQ_COUNT_MAX 100
  306. #define HP663X2_HW_SETTLING_MIN 0
  307. #define HP663X2_HW_SETTLING_MAX 30000 /* 30 seconds */
  308. #define HP663X2_OCP_DELAY_MIN 0
  309. #define HP663X2_OCP_DELAY_MAX 2147480000
  310. /********* added by dawn - 6/28/96 **********/
  311. /* these times may be modified after more testing */
  312. #define HP663X2_CLOCK_W_DISPLAY_ON 55
  313. #define HP663X2_CLOCK_W_DISPLAY_OFF 15
  314. #define HP663X2_CLOCK_HW_SETTLE 50
  315. #define HP663X2_CLOCK_RESET_INST 100
  316. #define HP663X2_CLOCK_SELF_TEST 200
  317.         /***************************************************/
  318.         /*  Instrument specific functions                  */
  319.         /***************************************************/
  320. ViStatus _VI_FUNC hp663x2_rippleRiDfi (ViSession instrumentHandle);
  321. ViStatus _VI_FUNC hp663x2_readOutputStatus (ViSession instrumentHandle,
  322.                                             ViPInt16 outputStatus);
  323. ViStatus _VI_FUNC hp663x2_outputVoltCurr(ViSession instrumentHandle,
  324.  ViReal64 voltLev,
  325.  ViReal64 currLev);
  326. ViStatus _VI_FUNC hp663x2_setMeasure (ViSession instrumentHandle,
  327.                                       ViInt16 outputParam,
  328.   ViReal64 outputLev,
  329.   ViInt16 settlingTime,
  330.                                       ViPReal64 voltQLev,
  331.   ViPReal64 currQLev,
  332.                                       ViPInt16 outputStatus);
  333. ViStatus _VI_FUNC hp663x2_doDelay (ViSession instrumentHandle,
  334.    ViInt16 milliSeconds);
  335. ViStatus _VI_FUNC hp663x2_setDisplay (ViSession instrumentHandle,
  336.                                       ViBoolean dispState,
  337.   ViInt16 dispMode,
  338.                                       ViChar _VI_FAR messageText[]);
  339. ViStatus _VI_FUNC hp663x2_getDisplay (ViSession instrumentHandle,
  340.                                       ViPBoolean dispState,
  341.   ViPInt16 dispMode,
  342.                                       ViChar _VI_FAR messageText[]);
  343. ViStatus _VI_FUNC hp663x2_measureVolt (ViSession instrumentHandle,
  344.                                        ViInt16 measurement,
  345.    ViPReal64 voltResult);
  346. ViStatus _VI_FUNC hp663x2_measureCurr (ViSession instrumentHandle,
  347.                                        ViInt16 measurement,
  348.    ViPReal64 currResult);
  349. ViStatus _VI_FUNC hp663x2_measureVoltArray (ViSession instrumentHandle,
  350.                                             ViInt32 numReadings,
  351.                                             ViReal64 _VI_FAR voltArray []);
  352. ViStatus _VI_FUNC hp663x2_measureCurrArray (ViSession instrumentHandle,
  353.                                             ViInt32 numReadings,
  354.                                             ViReal64 _VI_FAR currArray []);
  355. ViStatus _VI_FUNC hp663x2_fetchVolt (ViSession instrumentHandle,
  356.                                      ViInt16 measurement,
  357.  ViPReal64 voltResult);
  358. ViStatus _VI_FUNC hp663x2_fetchCurr (ViSession instrumentHandle,
  359.                                      ViInt16 measurement,
  360.  ViPReal64 currResult);
  361. ViStatus _VI_FUNC hp663x2_fetchVoltArray (ViSession instrumentHandle,
  362.                                           ViInt32 numReadings,
  363.                                           ViReal64 _VI_FAR voltArray []);
  364. ViStatus _VI_FUNC hp663x2_fetchCurrArray (ViSession instrumentHandle,
  365.                                           ViInt32 numReadings,
  366.                                           ViReal64 _VI_FAR currArray []);
  367. ViStatus _VI_FUNC hp663x2_setVoltAcqTrig (ViSession instrumentHandle,
  368.   ViInt16 acqTrigSource,
  369.   ViInt16 acqTrigVoltCount,
  370.   ViInt16 acqTrigVoltSlope,
  371.   ViReal64 acqTrigVoltLev,
  372.   ViReal64 acqTrigVoltHyst);
  373. ViStatus _VI_FUNC hp663x2_getVoltAcqTrig (ViSession instrumentHandle,
  374.   ViPInt16 acqTrigSource,
  375.   ViPInt16 acqTrigVoltCount,
  376.   ViPInt16 acqTrigVoltSlope,
  377.   ViPReal64 acqTrigVoltLev,
  378.   ViPReal64 acqTrigVoltHyst);
  379. ViStatus _VI_FUNC hp663x2_setCurrAcqTrig (ViSession instrumentHandle,
  380.   ViInt16 acqTrigSource,
  381.   ViInt16 acqTrigCurrCount,
  382.   ViInt16 acqTrigCurrSlope,
  383.   ViReal64 acqTrigCurrLev,
  384.   ViReal64 acqTrigCurrHyst);
  385. ViStatus _VI_FUNC hp663x2_getCurrAcqTrig (ViSession instrumentHandle,
  386.   ViPInt16 acqTrigSource,
  387.   ViPInt16 acqTrigCurrCount,
  388.   ViPInt16 acqTrigCurrSlope,
  389.   ViPReal64 acqTrigCurrLev,
  390.   ViPReal64 acqTrigCurrHyst);
  391. ViStatus _VI_FUNC hp663x2_setSweepParams (ViSession instrumentHandle,
  392.   ViReal64 sampleInterval,
  393.   ViInt32 sweepSize,
  394.   ViInt32 sweepOffset);
  395. ViStatus _VI_FUNC hp663x2_getSweepParams (ViSession instrumentHandle,
  396.                                           ViPReal64 sampleInterval,
  397.                                           ViPInt32 sweepSize,
  398.   ViPInt32 sweepOffset);
  399. ViStatus _VI_FUNC hp663x2_setMeasTimeout (ViSession instrumentHandle,
  400.                                           ViInt32 measTimeout);
  401. ViStatus _VI_FUNC hp663x2_getMeasTimeout (ViSession instrumentHandle,
  402.                                           ViPInt32 measTimeout);
  403. ViStatus _VI_FUNC hp663x2_clearOutpProt (ViSession instrumentHandle);
  404. ViStatus _VI_FUNC hp663x2_setOutpRelayPolarity (ViSession instrumentHandle,
  405. ViInt16 relayPolarity);
  406. ViStatus _VI_FUNC hp663x2_getOutpRelayPolarity (ViSession instrumentHandle,
  407. ViPInt16 relayPolarity);
  408. ViStatus _VI_FUNC hp663x2_setOutpState (ViSession instrumentHandle,
  409. ViBoolean outputState,
  410. ViBoolean switchRelay);
  411. ViStatus _VI_FUNC hp663x2_getOutpState (ViSession instrumentHandle,
  412. ViPBoolean outputState);
  413. ViStatus _VI_FUNC hp663x2_setPonState (ViSession instrumentHandle,
  414.    ViInt16 ponState);
  415. ViStatus _VI_FUNC hp663x2_getPonState (ViSession instrumentHandle,
  416.    ViPInt16 ponState);
  417. ViStatus _VI_FUNC hp663x2_setOutpRelay (ViSession instrumentHandle,
  418. ViBoolean relayState);
  419. ViStatus _VI_FUNC hp663x2_getOutpRelay (ViSession instrumentHandle,
  420. ViPBoolean relayState);
  421. ViStatus _VI_FUNC hp663x2_setRiDfi (ViSession instrumentHandle,
  422. ViInt16 riMode,
  423.                                     ViBoolean dfiState,
  424. ViInt16 dfiSourceBit);
  425. ViStatus _VI_FUNC hp663x2_getRiDfi (ViSession instrumentHandle,
  426. ViPInt16 riMode,
  427.                                     ViPBoolean dfiState,
  428. ViPInt16 dfiSourceBit);
  429. ViStatus _VI_FUNC hp663x2_setOutpTrigSource (ViSession instrumentHandle,
  430.  ViInt16 outpTrigSource);
  431. ViStatus _VI_FUNC hp663x2_getOutpTrigSource (ViSession instrumentHandle,
  432.  ViPInt16 outpTrigSource);
  433. ViStatus _VI_FUNC hp663x2_getAcqSenseFunc (ViSession instrumentHandle,
  434.    ViPInt16 senseFunction);
  435. ViStatus _VI_FUNC hp663x2_setCurrSenseParams (ViSession instrumentHandle,
  436.                                               ViReal64 currSenseRange,
  437.                                               ViInt16 currSenseDetector);
  438. ViStatus _VI_FUNC hp663x2_getCurrSenseParams (ViSession instrumentHandle,
  439.                                               ViPReal64 currSenseRange,
  440.                                               ViPInt16 currSenseDetector);
  441. ViStatus _VI_FUNC hp663x2_setWindowType (ViSession instrumentHandle,
  442.                                          ViInt16 windowType);
  443. ViStatus _VI_FUNC hp663x2_getWindowType (ViSession instrumentHandle,
  444.                                          ViPInt16 windowType);
  445. ViStatus _VI_FUNC hp663x2_setCurr (ViSession instrumentHandle,
  446.    ViInt16 currParam,
  447.    ViReal64 currLev);
  448. ViStatus _VI_FUNC hp663x2_getCurr (ViSession instrumentHandle,
  449.    ViInt16 currQParam,
  450.    ViPReal64 currLev);
  451. ViStatus _VI_FUNC hp663x2_setVolt (ViSession instrumentHandle,
  452.    ViInt16 voltParam,
  453.    ViReal64 voltLev);
  454. ViStatus _VI_FUNC hp663x2_getVolt (ViSession instrumentHandle,
  455.    ViInt16 voltQParam,
  456.    ViPReal64 voltLev);
  457. ViStatus _VI_FUNC hp663x2_setRes (ViSession instrumentHandle,
  458.                                     ViInt16 resParam,
  459.                                     ViReal64 resLev);
  460. ViStatus _VI_FUNC hp663x2_getRes(ViSession instrumentHandle,
  461.    ViInt16 resQParam,
  462.    ViPReal64 resLev);
  463. ViStatus _VI_FUNC hp663x2_setOcpParams (ViSession instrumentHandle,
  464. ViBoolean ocpEnable,
  465. ViReal64 ccDelay);
  466. ViStatus _VI_FUNC hp663x2_getOcpParams (ViSession instrumentHandle,
  467. ViPBoolean ocpEnable,
  468. ViPReal64 ccDelay);
  469. ViStatus _VI_FUNC hp663x2_setDigio (ViSession instrumentHandle, ViInt16 digOutData);
  470. ViStatus _VI_FUNC hp663x2_getDigio (ViSession instrumentHandle,
  471. ViPInt16 digInData);
  472. ViStatus _VI_FUNC hp663x2_getVoltAlcBandwidth (ViSession instrumentHandle,
  473.    ViPInt32 alcBandwidth);
  474. ViStatus _VI_FUNC hp663x2_abort (ViSession instrumentHandle);
  475. ViStatus _VI_FUNC hp663x2_arm (ViSession instrumentHandle, ViInt16 trigSystem);
  476. ViStatus _VI_FUNC hp663x2_trigger (ViSession instrumentHandle, ViInt16 subSystem);
  477. ViStatus _VI_FUNC hp663x2_trg (ViSession instrumentHandle);
  478. ViStatus _VI_FUNC hp663x2_stdEvent_Q (ViSession instrumentHandle,
  479.   ViPInt16 stdEventStatus);
  480. ViStatus _VI_FUNC hp663x2_setEnableReg (ViSession instrumentHandle,
  481.                                         ViInt16 enableRegister,
  482. ViInt16 enableMask);
  483. ViStatus _VI_FUNC hp663x2_getEnableReg (ViSession instrumentHandle,
  484.                                         ViInt16 enableRegister,
  485. ViPInt16 enableMask);
  486.         /***************************************************/
  487.         /*  New constants/functions as of Rev. A.01.00     */
  488.         /***************************************************/
  489. #define HP663X2_QUES_FP 0x0008
  490.         /***************************************************/
  491.         /*  DVM                                            */
  492.         /***************************************************/
  493. #define HP663X2_ARM_DVM_ACQUISITION 6
  494. #define HP663X2_DVM 2
  495. ViStatus _VI_FUNC hp663x2_fetchDvm (ViSession instrumentHandle,
  496.                                     ViInt16 measurement,
  497.                                     ViPReal64 voltResult);
  498. ViStatus _VI_FUNC hp663x2_getDvmAcqTrig (ViSession instrumentHandle,
  499.                                          ViPInt16 acqTrigSource,
  500.                                          ViPInt16 acqTrigVoltCount,
  501.                                          ViPInt16 acqTrigVoltSlope,
  502.                                          ViPReal64 acqTrigVoltLev,
  503.                                          ViPReal64 acqTrigVoltHyst);
  504. ViStatus _VI_FUNC hp663x2_measureDvm (ViSession instrumentHandle,
  505.                                       ViInt16 measurement,
  506.                                       ViPReal64 voltResult);
  507. ViStatus _VI_FUNC hp663x2_setDvmAcqTrig (ViSession instrumentHandle,
  508.                                          ViInt16 acqTrigSource,
  509.                                          ViInt16 acqTrigVoltCount,
  510.                                          ViInt16 acqTrigVoltSlope,
  511.                                          ViReal64 acqTrigVoltLev,
  512.                                          ViReal64 acqTrigVoltHyst);
  513.         /***************************************************/
  514.         /*  Second output                                  */
  515.         /***************************************************/
  516. #define HP663X2_QUES_UNREG2 0x0100
  517. #define HP663X2_QUES_OCP2 0x1000
  518. #define HP663X2_OPER_CV2 0x0200
  519. #define HP663X2_OPER_CC2 0x1000
  520. #define HP663X2_CURR2_IMM 0
  521. #define HP663X2_CURR2_TRIG 1
  522. #define HP663X2_CURR2_Q             0
  523. #define HP663X2_CURR2_Q_MAX         1
  524. #define HP663X2_CURR2_Q_MIN         2
  525. #define HP663X2_CURR2_Q_TRIG        3
  526. #define HP663X2_CURR2_Q_TRIG_MAX 4
  527. #define HP663X2_CURR2_Q_TRIG_MIN 5
  528. #define HP663X2_VOLT2_IMM 0
  529. #define HP663X2_VOLT2_TRIG 1
  530. #define HP663X2_VOLT2_Q 0
  531. #define HP663X2_VOLT2_Q_MAX         1
  532. #define HP663X2_VOLT2_Q_MIN 2
  533. #define HP663X2_VOLT2_Q_TRIG        3
  534. #define HP663X2_VOLT2_Q_TRIG_MAX    4
  535. #define HP663X2_VOLT2_Q_TRIG_MIN    5
  536. ViStatus _VI_FUNC hp663x2_getCurr2 (ViSession instrumentHandle,
  537.                                     ViInt16 currQParam,
  538.                                     ViPReal64 currLev);
  539. ViStatus _VI_FUNC hp663x2_getDisplayChannel (ViSession instrumentHandle,
  540.                                              ViPInt32 dispChannel);
  541. ViStatus _VI_FUNC hp663x2_getSenseProt (ViSession instrumentHandle,
  542.                                         ViPBoolean senseProtState);
  543. ViStatus _VI_FUNC hp663x2_getVolt2 (ViSession instrumentHandle,
  544.                                     ViInt16 voltQParam,
  545.                                     ViPReal64 voltLev);
  546. ViStatus _VI_FUNC hp663x2_measureCurr2 (ViSession instrumentHandle,
  547.                                         ViInt16 measurement,
  548.                                         ViPReal64 currResult);
  549. ViStatus _VI_FUNC hp663x2_measureVolt2 (ViSession instrumentHandle,
  550.                                         ViInt16 measurement,
  551.                                         ViPReal64 voltResult);
  552. ViStatus _VI_FUNC hp663x2_outputVoltCurr2 (ViSession instrumentHandle,
  553.    ViReal64 voltLev,
  554.    ViReal64 currLev);
  555. ViStatus _VI_FUNC hp663x2_readOutputStatus2 (ViSession instrumentHandle,
  556.                                              ViPInt16 outputStatus);
  557. ViStatus _VI_FUNC hp663x2_setCurr2 (ViSession instrumentHandle,
  558.                                     ViInt16 currParam,
  559.                                     ViReal64 currLev);
  560. ViStatus _VI_FUNC hp663x2_setDisplayChannel (ViSession instrumentHandle,
  561.                                              ViInt32 dispChannel);
  562. ViStatus _VI_FUNC hp663x2_setMeasure2 (ViSession instrumentHandle,
  563.                                        ViInt16 outputParam,
  564.    ViReal64 outputLev,
  565.    ViInt16 settlingTime,
  566.                                        ViPReal64 voltQLev,
  567.    ViPReal64 currQLev,
  568.                                        ViPInt16 outputStatus);
  569. ViStatus _VI_FUNC hp663x2_setSenseProt (ViSession instrumentHandle,
  570.                                         ViBoolean senseProtState);
  571. ViStatus _VI_FUNC hp663x2_setVolt2 (ViSession instrumentHandle,
  572.                                     ViInt16 voltParam,
  573.                                     ViReal64 voltLev);
  574. /* End of instrument specific declarations */
  575. /*---------------------------------------------------------------------------*/
  576. /* Used for "C" externs in C++ */
  577. #if defined(__cplusplus) || defined(__cplusplus__)
  578. }
  579. #endif 
  580. #endif /* hp663x2_INCLUDE */