18 #ifdef DECLSPEC_IMPORT 19 #undef DECLSPEC_IMPORT 21 #define DECLSPEC_IMPORT 57 #define KRNX_MAX_CONTROLLER 16 59 #define KRNX_MAX_CONTROLLER 8 61 #define KRNX_MAX_ROBOT 8 62 #define KRNX_MAX_PCPROG 3 66 #define KRNX_MAXAXES 18 68 #define KRNX_MAXSIGNAL 512 71 #define INT_CBUF_SIZ 512 73 #define NON_COMPATIBLE 90 #define DI_MAX_SIGNAL 960 91 #define DO_MAX_SIGNAL 960 92 #define INTERNAL_MAX_SIGNAL 960 94 #define DBG_FVAL_NUM 16 97 #define KRNX_NOERROR 0 98 #define KRNX_E_BADARGS (-0x1000) 99 #define KRNX_E_INTERNAL (-0x1001) 100 #define KRNX_E_NOTSUPPORTED (-0x1002) 101 #define KRNX_E_TIMEOUT (-0x1003) 102 #define KRNX_E_AUXNOTREADY (-0x1004) 103 #define KRNX_E_FOPENFAIL (-0x1005) 104 #define KRNX_E_FILENOTREADY (-0x1006) 105 #define KRNX_E_MATRIX (-0x1007) 106 #define KRNX_E_OUTOFRANGE (-0x1008) 107 #define KRNX_E_CANNOTCAL (-0x1009) 108 #define KRNX_E_COMPDATA (-0x100a) 109 #define KRNX_E_BADUSRID (-0x100c) 110 #define KRNX_E_NULLRESP (-0x100d) 111 #define KRNX_E_LOSTPROMPT (-0x100e) 112 #define KRNX_E_BUFSND (-0x1010) 113 #define KRNX_E_BUFRCV (-0x1011) 114 #define KRNX_E_BUFTMO (-0x1012) 116 #define KRNX_E_ASERROR (-0x1020) 117 #define KRNX_E_NOROBOT (-0x1021) 118 #define KRNX_E_DISABLED (-0x1022) 120 #define KRNX_E_CANTMOVECONFIG (-0x1030) 121 #define KRNX_E_JT5NOT0DEG (-0x1031) 122 #define KRNX_E_ILLCONFIG (-0x1032) 124 #define KRNX_E_SOCK (-0x2000) 125 #define KRNX_E_NOHOST (-0x2001) 126 #define KRNX_E_IOCTLSOCK (-0x2002) 127 #define KRNX_E_SOCKWRITE (-0x2003) 128 #define KRNX_E_SOCKREAD (-0x2004) 129 #define KRNX_E_NODATA (-0x2005) 130 #define KRNX_E_INVALIDPORT (-0x2006) 131 #define KRNX_E_CONNECT (-0x2007) 132 #define KRNX_E_CANTLOGIN (-0x2008) 133 #define KRNX_E_ALREADYOPENED (-0x2009) 134 #define KRNX_E_UNEXPECTED (-0x2010) 135 #define KRNX_E_KINENOTREADY (-0x2011) 136 #define KRNX_E_ASDELAYED (-0x2012) 137 #define KRNX_E_BUFEMPTY (-0x2013) 138 #define KRNX_E_BUFNO (-0x2014) 139 #define KRNX_E_BUFDATANUM (-0x2015) 141 #define KRNX_E_RT_INTERNAL (-0x2100) 142 #define KRNX_E_RT_CONNECT (-0x2101) 143 #define KRNX_E_RT_TIMEOUT (-0x2102) 144 #define KRNX_E_RT_NOTCONNECT (-0x2103) 145 #define KRNX_E_RT_SEND (-0x2104) 147 #define KRNX_E_PCASALREADYRUNNING (-0x2200) 148 #define KRNX_E_TOOMANYPROC (-0x2201) 149 #define KRNX_E_INVALIDFILENAME (-0x2202) 150 #define KRNX_E_ILLCONTNO (-0x2203) 152 #define KRNX_E_UNDEF (-0xFFFF) 169 #ifdef NON_COMPATIBLE 192 char program_name[20];
195 #ifdef NON_COMPATIBLE 204 #ifdef NON_COMPATIBLE 317 #define QUAL_PRG 0x0001 318 #define QUAL_LOC 0x0002 319 #define QUAL_REAL 0x0004 320 #define QUAL_STR 0x0008 321 #define QUAL_INT 0x0010 322 #define QUAL_SYS 0x0020 323 #define QUAL_ROB 0x0040 324 #define QUAL_AUX 0x0080 325 #define QUAL_ARC 0x0100 326 #define QUAL_IFP 0x0200 327 #define QUAL_ELOG 0x0400 328 #define QUAL_FLT 0x0800 350 DECLSPEC_IMPORT int WINAPI krnx_List(
int cont_no,
const char *element_name,
int element_type,
char *buffer,
int buffer_sz,
int *as_err_code=NULL );
353 DECLSPEC_IMPORT int WINAPI krnx_Prime(
int cont_no,
int robot_no,
const char *program,
int exec_num,
int step_num,
int create,
int *as_err_code=NULL );
513 DECLSPEC_IMPORT int WINAPI krnx_ArcCmdWrite(
int cont_no,
int robot_no,
int cmd,
int i_cmd,
int v_cmd );
515 DECLSPEC_IMPORT int WINAPI krnx_ArcStatusRead(
int cont_no,
int robot_no,
int *hw_status,
int *rob_status,
int *hw_cmd );
516 DECLSPEC_IMPORT int WINAPI krnx_ArcModifyWrite(
int cont_no,
int robot_no,
int and_cmd,
int or_cmd,
int and_status,
int or_status );
519 DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChange(
int cont_no,
int robot_no,
float sp,
float cur,
float vlt,
float width,
float freq,
int pn );
522 DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChange(
int cont_no,
int robot_no,
float x,
float y,
float z );
523 DECLSPEC_IMPORT int WINAPI krnx_ArcXyzRead(
int cont_no,
int robot_no,
float *x,
float *y,
float *z );
524 DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzChange(
int cont_no,
int robot_no,
float x,
float y,
float z );
525 DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzRead(
int cont_no,
int robot_no,
float *x,
float *y,
float *z );
DECLSPEC_IMPORT int WINAPI krnx_BufferRecvF(int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_SetRtcInfo(int cont_no, TKrnxRtcInfo *rtc_info)
DECLSPEC_IMPORT int WINAPI krnx_ExecMon(int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_XyzoatToJoint(int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint)
DECLSPEC_IMPORT int WINAPI krnx_GetPanelInfo(int cont_no, int robot_no, TKrnxPanelInfo *panelinfo)
struct TDebugMotionInfo TDebugMotionInfo
unsigned long usr_internal[INTERNAL_MAX_SIGNAL/32]
DECLSPEC_IMPORT int WINAPI krnx_eth_open(int cont_no)
DECLSPEC_IMPORT int WINAPI krnx_eth_init(char *hostname)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
DECLSPEC_IMPORT int WINAPI krnx_Open(int cont_no, char *hostname)
DECLSPEC_IMPORT int WINAPI krnx_JacobiXyzoat(int cont_no, int robot_no, const float *joint, const float *tool_xyzoat, float *jacobi66, float *xyzoat)
DECLSPEC_IMPORT int WINAPI krnx_XyzoatToJoint2(int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint, int conf)
#define INTERNAL_MAX_SIGNAL
DECLSPEC_IMPORT int WINAPI krnx_GetIoInfo(int cont_no, TKrnxIoInfo *ioinfo)
DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync(int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num)
DECLSPEC_IMPORT int WINAPI krnx_SetPriority(DWORD p)
DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx(int entry)
DECLSPEC_IMPORT int WINAPI krnx_MatrixToJoint(int cont_no, int robot_no, const float *matrix, float *joint, const float *old_joint)
struct TDebugVariableInfo TDebugVariableInfo
DECLSPEC_IMPORT int WINAPI krnx_JaInvXyzoat(int cont_no, int robot_no, const float *joint, const float *tool_xyzoat, float *ja_inv66, float *xyzoat)
DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionInfo(int cont_no, int robot_no, TKrnxMotionInfo *mtninfo)
DECLSPEC_IMPORT int WINAPI krnx_PanelToPC(int, int, char *)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompData(int cont_no, int robot_no, float *comp)
DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed(int cont_no, int robot_no, float spd, float *prev)
DECLSPEC_IMPORT int WINAPI krnx_PcContinue(int cont_no, int pcprogram_no, int next, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_eth_close(int cont_no)
DECLSPEC_IMPORT int WINAPI krnx_PcEnd(int cont_no, int pcprogram_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcInfo(int cont_no, TKrnxRtcInfo *rtc_info)
DECLSPEC_IMPORT int WINAPI krnx_Load(int cont_no, const char *filename)
DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix(int cont_no, int robot_no, const float *xyzoat, int *as_err_code)
unsigned long usr_do[DO_MAX_SIGNAL/32]
DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix(int cont_no, int robot_no, const float *xyzoat, int *as_err_code)
struct TDebugSignalInfo TDebugSignalInfo
DECLSPEC_IMPORT int WINAPI krnx_SaveEx(int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp, void *cb_param)
DECLSPEC_IMPORT int WINAPI krnx_GetASCycle(int robot_no, int *cycle_time)
DECLSPEC_IMPORT int WINAPI krnx_Save(int cont_no, const char *filename, const char *program_name, int option)
DECLSPEC_IMPORT int WINAPI krnx_BufferRecvB(int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_SetJoint(int cont_no, int robot_no, float ang[KRNX_MAXAXES])
DECLSPEC_IMPORT int WINAPI krnx_BufferPeekB(int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_SetRtcErrorFlag(int cont_no, int robot_no, int error_flag, unsigned short seq_no)
DECLSPEC_IMPORT int WINAPI krnx_JaInvMatrix(int cont_no, int robot_no, const float *joint, const float *tool_matrix, float *ja_inv66, float *matrix)
DECLSPEC_IMPORT int WINAPI krnx_BufferBusy(int cont_no, int buf_no)
DECLSPEC_IMPORT int WINAPI krnx_OldCompClear(int cont_no, int robot_no)
DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo(int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num)
DECLSPEC_IMPORT int WINAPI krnx_PcKill(int cont_no, int pcprogram_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetCycleCount(int cont_no, int robot_no, int counter_no)
DECLSPEC_IMPORT int WINAPI krnx_JointToXyzoat(int cont_no, int robot_no, const float *joint, float *xyzoat)
DECLSPEC_IMPORT int WINAPI krnx_ConvertErrorCode(int *error_code, char *error_level)
DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPosEx(int cont_no, int robot_no, int axis_no, int wk_no, float pos, float *prev)
DECLSPEC_IMPORT int WINAPI krnx_GetRobotName(int cont_no, int robot_no, char *robot_name)
DECLSPEC_IMPORT int WINAPI krnx_Reset(int cont_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_Abort(int cont_no, int robot_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_InverseMatrix(const float *matrix_a, float *matrix_b)
DECLSPEC_IMPORT int WINAPI krnx_GetLimitM(int cont_no, int robot_no, float *ll)
DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo(int cont_no, int io_no, const TKrnxDDSig **)
DECLSPEC_IMPORT int WINAPI krnx_MultiplyMatrix(const float *matrix_a, const float *matrix_b, float *matrix_c)
struct TDebugSystemInfo TDebugSystemInfo
DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo(int cont_no, int robot_no, TKrnxMotionInfo *mtninfo)
DECLSPEC_IMPORT int WINAPI krnx_IoSetDI(int cont_no, const char *in, const char *mask, size_t size)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcBufferLength(int cont_no, int robot_no)
DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix(int cont_no, int robot_no, float *xyzoat, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_List(int cont_no, const char *element_name, int element_type, char *buffer, int buffer_sz, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionData(int cont_no, int robot_no, TKrnxCurMotionData *md)
DECLSPEC_IMPORT int WINAPI krnx_Prime(int cont_no, int robot_no, const char *program, int exec_num, int step_num, int create, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcErrorFlag(int cont_no, int robot_no, int *error_flag)
DECLSPEC_IMPORT int WINAPI krnx_Execute(int cont_no, int robot_no, const char *program, int exec_num, int step_num, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_SetSignal(int cont_no, int signal_no, int status, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_LoadEx(int cont_no, const char *filename, FLoadCallBack cbfp, void *cb_param)
DECLSPEC_IMPORT int WINAPI krnx_BufferRecvW(int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_GetSignal(int cont_no, int signal_no, int *status, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_Do(int cont_no, int robot_no, const char *cmd, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_SetAppParam(int type, char *param)
DECLSPEC_IMPORT int WINAPI krnx_BufferSendF(int cont_no, int buf_no, short req_code, const float *p, int num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_GetConfig(int cont_no, int robot_no, float *joint, int *conf)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcSwitch(int cont_no, int robot_no, int *rtc_sw)
DECLSPEC_IMPORT int WINAPI krnx_BufferEmpty(int cont_no, int buf_no)
BOOL(* FLoadCallBack)(void *param, long byte, const char *msg)
struct TKrnxDebugInfoEnt TKrnxDebugInfoEnt
DECLSPEC_IMPORT int WINAPI krnx_IoSetDO(int cont_no, const char *out, const char *mask, size_t size)
DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix(int cont_no, int robot_no, float *xyzoat, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetArmMode(int, int)
DECLSPEC_IMPORT int WINAPI krnx_GetCurIoInfo(int cont_no, TKrnxIoInfo *ioinfo)
DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPos(int cont_no, int robot_no, int wk_no, float pos, float *prev)
DECLSPEC_IMPORT int WINAPI krnx_Ereset(int cont_no, int robot_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_GetKrnxVersion(char *ver_text, int ver_len)
DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo2(int cont_no, int robot_no, TKrnxProgramInfo *proginfo)
DECLSPEC_IMPORT int WINAPI krnx_NotSupport(void)
DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompMask(int cont_no, int robot_no, int mask)
DECLSPEC_IMPORT int WINAPI krnx_BufferSendB(int cont_no, int buf_no, short req_code, const char *p, int num, int timeout)
struct TSignalEx TSignalEx
DECLSPEC_IMPORT int WINAPI krnx_SetJT1Mode(int mode)
DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompData(int cont_no, int robot_no, const float *comp, int *status, unsigned short seq_no)
DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync(int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num)
DECLSPEC_IMPORT int WINAPI krnx_PcExecute(int cont_no, int pcprogram_no, const char *program, int exec_num, int step_num, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_BufferSendW(int cont_no, int buf_no, short req_code, const short *p, int num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_RecOneStep(int cont_no, const char *program, int step_num, const char *step_data, int insert, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_SendRtcCompData(int cont_no, unsigned short seq_no)
DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorLamp(int cont_no, int robot_no, int *error_lamp)
DECLSPEC_IMPORT void WINAPI krnx_timer_callback(void)
unsigned short clamp_spot_flg
DECLSPEC_IMPORT int WINAPI krnx_PcAbort(int cont_no, int pcprogram_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_MultiplyXyzoat(const float *xyzoat_a, const float *xyzoat_b, float *xyzoat_c)
DECLSPEC_IMPORT int WINAPI krnx_BufferPeekF(int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompLimit(int cont_no, int robot_no, float *comp_limit)
DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo(int cont_no, int robot_no, TKrnxProgramInfo *proginfo)
DECLSPEC_IMPORT int WINAPI krnx_Close(int sd)
DECLSPEC_IMPORT int WINAPI krnx_Delete(int cont_no, const char *element_name, int element_type, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_FrameMatrix(const float *mat_a, const float *mat_b, const float *mat_c, const float *mat_d, float *mat_p)
DECLSPEC_IMPORT int WINAPI krnx_GetLimitP(int cont_no, int robot_no, float *ul)
DECLSPEC_IMPORT int WINAPI krnx_MatrixToXyzoat(const float *matrix, float *xyzoat)
unsigned long usr_di[DI_MAX_SIGNAL/32]
DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig(int cont_no, char *dd_di, char *dd_do)
DECLSPEC_IMPORT int WINAPI krnx_Continue(int cont_no, int robot_no, int next, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_StopPcAs(void)
DECLSPEC_IMPORT int WINAPI krnx_InverseXyzoat(const float *xyzoat_a, float *xyzoat_b)
DECLSPEC_IMPORT int WINAPI krnx_JacobiMatrix(int cont_no, int robot_no, const float *joint, const float *tool_matrix, float *jacobi66, float *matrix)
DECLSPEC_IMPORT int WINAPI krnx_GetErrorInfo(int cont_no, int robot_no, int *error_code)
DECLSPEC_IMPORT int WINAPI krnx_Kill(int cont_no, int robot_no, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_BufferPeekW(int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout)
DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoEx(int cont_no, int robot_no, TKrnxMotionInfo *mtninfo, int data_type)
DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeedEx(int cont_no, int robot_no, int axis_no, float spd, float *prev)
struct TKrnxRtcInfo TKrnxRtcInfo
DECLSPEC_IMPORT int WINAPI krnx_RunPcAs(char *ini_file_name)
DECLSPEC_IMPORT int WINAPI krnx_PanelHw(int, int, char *)
DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorInfo(int cont_no, int robot_no, int *error_code)
DECLSPEC_IMPORT int WINAPI krnx_SetPanelInfo(int cont_no, int robot_no, TKrnxPanelInfo *panelinfo)
DECLSPEC_IMPORT int WINAPI krnx_JointToMatrix(int cont_no, int robot_no, const float *joint, float *matrix)
DECLSPEC_IMPORT int WINAPI krnx_FrameXyzoat(const float *xyz_a, const float *xyz_b, const float *xyz_c, const float *xyz_d, float *xyz_p)
DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed(int cont_no, int robot_no, float speed, int *as_err_code)
DECLSPEC_IMPORT int WINAPI krnx_Hold(int cont_no, int robot_no, int *as_err_code)
struct TDebugTrajInfo TDebugTrajInfo
DECLSPEC_IMPORT int WINAPI krnx_XyzoatToMatrix(const float *xyzoat, float *matrix)
DECLSPEC_IMPORT int WINAPI krnx_PrimeRtcCompData(int cont_no, int robot_no, const float *comp, int *status)
DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompDataEx(int cont_no, int robot_no, const float *comp, int *status, unsigned long *count_in, unsigned long *count_out, unsigned short seq_no)
DECLSPEC_IMPORT int WINAPI krnx_RtcInit(int cont_no)