/* ************************************************************** */ /* * MOVEMAG.H * * Zachary Wolf * 9/7/05 */ #ifndef __MOVEMAG_HEADER #define __MOVEMAG_HEADER #if defined(__cplusplus) || defined(__cplusplus__) extern "C" { #endif /* ************************************************************* */ /* ENUM DEFINITIONS */ /* Device type: the first device is the move device, the second is the position read device */ enum movemag_device_type_enum {MOVEMAG_MANUAL_NONE, MOVEMAG_CM6K6_CM6K6, MOVEMAG_NONE_NONE}; /* ************************************************************* */ /* STRUCTURE DEFINITIONS */ struct movemag_param_struct { int port_num; /* RS232 port number */ int cm6k6_addr; /* Device address for the cm6k6 on the RS232 port */ enum movemag_device_type_enum device_type; /* Type of devices being used */ int num_axis /* Number of the motors connected */ double acc; /* Stage acceleration (m/s/s) */ double vel; /* Stage velocity (m/s) */ double dist_to_pitch_pivot; /* Distance between the actuator and the pitch pivot point (m) */ double dist_to_yaw_pivot; /* Distance between the actuator and the yaw pivot point (m) */ double dist_to_roll_pivot; /* Distance between the actuator and the roll pivot point (m) */ }; struct mag_pos_struct { double x; double y; double z; double pitch; double yaw; double roll; }; /* ************************************************************** */ /* PUBLIC FUNCTION DECLARATIONS */ void movemag_init(char log_file_in[], struct movemag_param_struct movemag_param_in); void movemag_rel_move_x(double x); void movemag_rel_move_y(double y); void movemag_rel_move_z(double z); void movemag_rel_move_pitch(double pitch); void movemag_rel_move_yaw(double yaw); void movemag_rel_move_roll(double roll); void movemag_abs_move_x(double x); void movemag_abs_move_y(double y); void movemag_abs_move_z(double z); void movemag_abs_move_pitch(double pitch); void movemag_abs_move_yaw(double yaw); void movemag_abs_move_roll(double roll); void movemag_get_pos(struct mag_pos_struct* pos); void movemag_uzero(void); void movemag_zero(void); void movemag_exit(void); /* ************************************************************** */ /* CONSTANTS */ #define MOVEMAG_MAX_CMD 80 /* ************************************************************** */ /* DONE */ #if defined(__cplusplus) || defined(__cplusplus__) } #endif #endif