// ************************************************************** // // XPS_C8_DF.H // // Yurii Levashov & Seva // 11/03/2005 // #ifndef __XPS_C8_HEADER #define __XPS_C8_HEADER #if defined(__cplusplus) || defined(__cplusplus__) extern "C" { #endif // ************************************************************** // PUBLIC FUNCTION DECLARATIONS // int xps_c8_init( int * dev_id); void xps_c8_exit(int SocketID); int xps_c8_move_abs(int SocketID, int group, double position , double positions[2]); int xps_c8_move_rel(int SocketID, int group, double distance , double positions[2]); double xps_c8_getMovingTime(int SocketID, int group, double distance ); int xps_c8_get_position(int SocketID, int group, double pos[]); int xps_c8_move_rel_both(int SocketID, int group, double distance, double positions[2]); void xps_set_slow(BOOL slow, int dev_id); //void xps_c8_stop_motion(int SocketID, char *pGroup); //int xps_c8_GetParameters (int SocketID, char * pGroup, double * vel, double * acc, double * minJerk, double * maxJerk); //int xps_c8_SetParameters (int SocketID, char * pGroup, double Vel, double Acc, double MinJerk, double MaxJerk); //------------------------------------------------------------------- // #define XPS_MAX_NUM_DEV 1 #define XPS_NUM_OF_1D_GROUPS 0 //number of single axis groups - reserved for future use #define XPS_NUM_OF_2D_GROUPS 2 //number of two axes groups - currently in use #define XPS_NUM_OF_3D_GROUPS 0 //number of three axes groups - reserved for future use //------------------------------------------------------------------- // // define controller param structure typedef struct tag_XPS_PARAM { char * pIPAddress; int nPort; } XPS_PARAM; typedef XPS_PARAM *LPXPS_PARAM; // define 2D Group param structure typedef struct tag_XPS_2DGROUP_PARAM { char Group[8]; char Axis1[8]; char Axis2[8]; double nScale1; //to avoid problems with the acceleration and velocity always keep double nScale2; // one parameter to be 1 or -1, and second one in range from -1 to 1 double nScale1_copy; //set automatically to recover scale after using mode with one axis scale = 0 double nScale2_copy; //set automatically to recover scale after using mode with one axis scale = 0 double acceleration; double velocity; double min_j_time; double max_j_time; double acceleration1; double velocity1; double min_j_time1; double max_j_time1; double offset; double position; int group_mode; //use to change stages positive direction or for other modes } XPS_2DGROUP; typedef XPS_2DGROUP *LPXPS_2DGROUP; void xps_c8_set_param( XPS_PARAM nParam, XPS_2DGROUP group_param[]); void xps_c8_set_group_mode(int group,int mode); int xps_c8_get_group_mode(int group); int xps_c8_move_axis_abs(int SocketID, int group, int axis, double position , double * pPosition); void xps_c8_set_ufint_scales(double entry_scale, double exit_scale); //different motion options enum xps_group_modes { MODE_1P2P, //0-both moving positive MODE_1N2N, //1-both moving negative MODE_1P2N, //2-first moving positive second moving negative direction MODE_1N2P, //3-first moving negative second moving positive direction MODE_1P2S, //4-first moving positive second do not move MODE_1N2S, //5-first moving negative second do not move MODE_1S2P, //6-first do not move second moving positive direction MODE_1S2N //7-first do not move second moving negative direction }; #endif