/* ************************************************************* */ /* * VTWIRE.H * * Zachary Wolf * 8/17/99 */ #ifndef __VTWIRE_HEADER #define __VTWIRE_HEADER /* ************************************************************** */ /* SEMI-PERMANENT PARAMETERS */ #define VTWIRE_MAX_NUM_SAMP 1000 #define VTWIRE_MAX_NUM_MEAS 10 #define VTWIRE_MAX_NUM_CHAR 100 /* ************************************************************* */ /* ENUM DEFINITIONS */ enum vtwire_config_enum {VTWIRE_MC4_PDI5025, VTWIRE_MC4_HP3458}; enum vtwire_binary_enum {VTWIRE_TRUE, VTWIRE_FALSE}; /* ************************************************************* */ /* STRUCTURE DEFINITIONS */ struct vtwire_param_struct { int board_addr; /* GPIB board address */ int mc4_addr; /* MC4 GPIB address */ int pdi5025_addr; /* PDI5025 GPIB address */ int hp3458_addr; /* HP3458 GPIB address */ char pdi5025_channel; /* PDI5025 (if being used) channel 'A' or 'B' */ int pdi5025_gain; /* PDI5025 (if being used) gain 1, 2, ... */ double hp3458_range; /* HP3458 (if being used) range .001 V, .01 V, ... */ char mc4_axis1; /* MC4 axis for stage 1 (W, X, Y, or Z) */ char mc4_axis2; /* MC4 axis for stage 2 (W, X, Y, or Z) */ enum vtwire_config_enum config; /* hardware being used, choices in enum */ double t_samp_before; /* sample time before moving the wire (sec) */ double t_samp_after; /* sample time after the wire has stopped moving (sec) */ double wire_vel; /* speed to move the wire at (m/s) */ double wire_acc; /* wire acceleration rate (m/s/s) */ enum vtwire_binary_enum do_offset_correction; /* if TRUE, do an offset correction, don't do if FALSE */ enum vtwire_binary_enum show_ui; /* if TRUE, show user interface, don't show if FALSE */ int num_meas_ave; /* number of measurements for averaging */ }; /* ************************************************************* */ /* PUBLIC FUNCTION DECLARATIONS */ void vtwire_init(char log_file[], struct vtwire_param_struct vtwire_param); void vtwire_get_vt(double x0, double dx, double* vt); void vtwire_get_vt_ave(double x0, double dx, double* vt_ave, double* vt_rms); void vtwire_move_wire_abs(double x0); void vtwire_set_zero_pos(void); void vtwire_zero_pos(void); void vtwire_exit(void); /* ************************************************************** */ /* DONE */ #endif