diff --git a/site_ansto/hardsup/nhq200util.h b/site_ansto/hardsup/nhq200util.h index 43126e61..2e4d08fe 100644 --- a/site_ansto/hardsup/nhq200util.h +++ b/site_ansto/hardsup/nhq200util.h @@ -2,37 +2,30 @@ N H Q 2 0 0 U T I L A few utility functions for talking to a NHQ 200 - voltage controller via the SINQ setup: TCP/IP--MAC--RS-232-- - NHQ200. + voltage controller via the SINQ setup: + TCP/IP===MOXA===RS-232===NHQ200. Mark Koennecke, Juli 1997 Mark Lesha, January 2006 (based on ITC4 code) Douglas Clowes, December 2006 (based on LAKESHORE340 code) ----------------------------------------------------------------------------*/ -#ifndef SINQNHQ200 -#define SINQNHQ200 +#ifndef NHQ200_UTIL_H +#define NHQ200_UTIL_H /*----------------------- ERRORCODES-------------------------------------- Most functions return a negative error code on failure. Error codes defined are those defined for serialsinq plus a few additional ones: */ -#define NHQ200__BADCOM -501 -/* command not recognized */ -#define NHQ200__BADPAR -502 -/* bad parameter to command */ -#define NHQ200__BADMALLOC -503 -/* error allocating memory */ -#define NHQ200__BADREAD -504 -/* error analysing command string on Read */ -#define NHQ200__FAULT -505 -/* fault or overload condition exists in NHQ200 */ -#define NHQ200__NONHQ200 -510 -/* Controller is not NHQ200 */ -#define NHQ200__BADSET -530 -/* failed three times to set temperature */ -#define NHQ200__READONLY -531 +#define NHQ200__BADCOM -501 /* command not recognized */ +#define NHQ200__BADPAR -502 /* bad parameter to command */ +#define NHQ200__BADMALLOC -503 /* error allocating memory */ +#define NHQ200__BADREAD -504 /* error analysing command string on Read */ +#define NHQ200__FAULT -505 /* fault or overload condition exists in NHQ200 */ +#define NHQ200__NONHQ200 -510 /* Controller is not NHQ200 */ +#define NHQ200__BADSET -530 /* failed three times to set voltage */ +#define NHQ200__READONLY -531 /*------------------------------------------------------------------------*/ typedef struct __NHQ200 { int iRead; @@ -73,16 +66,16 @@ void NHQ200_Close(pNHQ200 *pData); int NHQ200_Config(pNHQ200 *pData, int iTmo, int iRead, int iControl, float fDiv, float fMult); -/***** configure some aspects of a NHQ200temperature controller. +/***** configure some aspects of a NHQ200 voltage controller. The parameter are: - a pointer to the data structure for the controller as returned by NHQ200_Open - a value for the connection timeout - - the temperature sensor to use for reading the - temperature. - - the temperature sensor used by the NHQ200controller - for regulating the temperature. - - the divisor needed to calculate the real temperature + - the voltage sensor to use for reading the + voltage. + - the voltage sensor used by the NHQ200controller + for regulating the voltage. + - the divisor needed to calculate the real voltage from the sensor. The function returns 1 on success, a negative error code on failure. @@ -100,7 +93,7 @@ int NHQ200_Send(pNHQ200 *pData, char *pCommand, char *pReply, int iLen); */ int NHQ200_Read(pNHQ200 *pData, float *fVal); -/******* reads the current actual temperature of the sensor +/******* reads the current actual voltage of the sensor configured by ConfigNHQ200for reading. The value is returned in fVal. The first parameter is a pointer to a NHQ200 data structure as returned by NHQ200_Open. @@ -110,7 +103,7 @@ int NHQ200_Read(pNHQ200 *pData, float *fVal); */ int NHQ200_Set(pNHQ200 *pData, float fVal); -/****** sets a new preset temperature in the NHQ200temperature +/****** sets a new preset voltage in the NHQ200 voltage controller. Parameters are: - a pointer to a NHQ200data structure as returned by NHQ200_Open. - the new preset value. @@ -126,6 +119,6 @@ void NHQ200_ErrorTxt(pNHQ200 *pData, int iCode, char *pError, int iLen); */ -#endif +#endif /* NHQ200_UTIL_H */