//============================================================================== // // Title: Utilities.h // Purpose: A short description of the interface. // // Created on: 5/7/2014 at 10:29:17 AM by Arnaud Madur. // Copyright: LBNL. All Rights Reserved. // //============================================================================== #ifndef __Utilities_H__ #define __Utilities_H__ #ifdef __cplusplus extern "C" { #endif //============================================================================== // Include files #include #include "cvidef.h" //============================================================================== // Constants #define LINE 80 #define FILENAME 260 #define LINECYCLE 60 #define NCAL 10 #define NTEMPS 6 //============================================================================== // Types //============================================================================== // External variables // Paramters char und_name[LINE]; int und_nmbr; char und_dir[FILENAME]; char und_file[FILENAME]; int GPIBDVM[3]; // DVM GPIBs int hp3458_ID[3]; double DCV[3]; // DCV Scales double int_tm; // integration time in number of line cycles double Sc_V; // scan velocity double Sc_strt; // scan starting point double Sc_stp; // scan stopping point double HP_x[2]; // probe x locations for reference measurements double HP_y[2]; // probe y locations for reference measurements double HP_z[2]; // probe z locations for reference measurements double trig_spc; // trigger spacing double trig_axis; // trigger axis int num_pnts; // number of data points double *z; // axial coordinate for scans double *Vx; // Voltages for Bx data double *Vy; // Voltages for By data double *Bx; double *By; double Vx_ref[2]; // V for Bx reference double Vy_ref[2]; // V for By reference double Bx_ref[2]; // Bx reference measurements double By_ref[2]; // By reference measurements char HP_name[50]; // name of Hall probe char HP_cal_file[FILENAME]; // name and path of Hall probe calibration file double HP_cal_Vx[10], HP_cal_Bx[10]; // Values for HP Bx calibration double HP_cal_Vy[10], HP_cal_By[10]; // Values for HP By calibration double HP_cal_Vz[10], HP_cal_Bz[10]; // Values for HP Bz calibration double RmTemp; double Temp[NTEMPS]; // Files for input and output FILE *fplg; FILE *fpda; FILE *fpm; // Panel Handles //============================================================================== // Global functions int RefMeas (int index); int LogRecord (char *IDname, FILE *fpl); int RdParamFile (char *fname); double GetTemp (int channel); int MoveProbe (double x, double y, double z); int ProbeInterpolate (double Vint, double *pBint, double *V, double *B, int nint); int RdCalFile (char *cal_file); int WriteDataFile(char *fname); #ifdef __cplusplus } #endif #endif /* ndef __Utilities_H__ */