/* ************************************************************* */ /* * VTCOIL.H * * Zachary Wolf * 8/17/98 */ #ifndef __VTCOIL_HEADER #define __VTCOIL_HEADER /* ************************************************************* */ /* ENUM DEFINITIONS */ enum vtcoil_config_enum {VTCOIL_K7011_CM2100_PDI5025, VTCOIL_CM2100_PDI5025}; enum vtcoil_binary_enum {VTCOIL_TRUE, VTCOIL_FALSE}; /* ************************************************************* */ /* STRUCTURE DEFINITIONS */ struct vtcoil_param_struct { int board_addr; int k7011_addr; int cm2100_addr; int pdi5025_addr; enum vtcoil_config_enum config; /* hardware being used, choices in enum */ int num_encoder_pulse_per_rev; /* number of encoder pulses per revolution (0 = no encoder) */ int num_samp_per_rev; /* number of vt samples per revolution */ double motor_acc; /* motor acceleration (rev/sec/sec) */ double motor_vel; /* motor velocity (rev/sec) */ double rel_motor_rot_dir; /* multiplier for motor moves, +1 or -1 */ enum vtcoil_binary_enum show_ui; /* if TRUE, show user interface, don't show otherwise */ }; /* ************************************************************* */ /* PUBLIC FUNCTION DECLARATIONS */ void vtcoil_init(char log_file[], struct vtcoil_param_struct vtcoil_param); void vtcoil_locate_index(void); void vtcoil_route_signal(int mux_chan, char integ_chan); void vtcoil_set_gain(int gain); void vtcoil_auto_gain(void); void vtcoil_get_vt(char rot_dir, int num_samp, double vt[]); void vtcoil_get_vthar(char rot_dir, int num_rev, int num_har, double vthar_re[], double vthar_im[]); void vtcoil_get_vthar_pmave(int num_rev, int num_har, double vthar_re[], double vthar_im[]); void vtcoil_get_vthar_ave(int num_meas, int num_rev, int num_har, double vthar_re_ave[], double vthar_re_rms[], double vthar_im_ave[], double vthar_im_rms[]); void vtcoil_protect(void); void vtcoil_exit(void); /* ************************************************************** */ /* GLOBAL VARIABLES INITIALIZED TO DEFAULT VALUES */ static char pdi5025_chan = 'A'; static int pdi5025_gain = 1; /* ************************************************************** */ /* DONE */ #endif