krnx.h
Go to the documentation of this file.
1 #ifndef KRNX_H__
2 #define KRNX_H__
3 
4 #ifdef WIN32
5 /* for windows */
6 #include <windows.h>
7 #else
8 /* for Linux */
9 typedef void* HANDLE;
10 typedef char BOOL;
11 typedef char BOOLEAN;
12 typedef unsigned long DWORD;
13 typedef unsigned int UINT;
14 #define WINAPI
15 #define TRUE 1
16 #define FALSE 0
17 #define CALLBACK
18 #ifdef DECLSPEC_IMPORT
19 #undef DECLSPEC_IMPORT
20 #endif
21 #define DECLSPEC_IMPORT
22 #endif
23 
24 /************************************
25 *
26 * Kawasaki Robot Controller Network Extension
27 *
28 * Copyright (C) 2002 By
29 * System Technology Development Center,
30 * Kawasaki Heavy Industries, LTD.
31 *
32 * This software is furnished under a license and may be used
33 * and copied only in accordance with the terms of such license
34 * and with the inclusion of the above copyright notice.
35 *
36 * ファイル名:krnx.h
37 *
38 * $Header: /home/cvsroot/krnx_dll/krnx.h,v 1.33 2009/04/17 08:34:11 cvsuser Exp $
39 *
40 * 機能/目的:
41 * Kawasaki Robot Network Extension API 関数のプロトタイプ宣言
42 *
43 * グローバル関数:
44 *
45 * グローバル変数:
46 *
47 *
48 *****************************************************
49 */
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 #ifdef CAROTT3
57 #define KRNX_MAX_CONTROLLER 16 /* 最大接続コントローラ数 */
58 #else
59 #define KRNX_MAX_CONTROLLER 8 /* 最大接続コントローラ数 */
60 #endif
61 #define KRNX_MAX_ROBOT 8 /* 1コントローラがサポートするロボット台数 */
62 #define KRNX_MAX_PCPROG 3 /* 1コントローラがサポートするPCプログラム数 */
63 
64 
65 /* 最大軸数 */
66 #define KRNX_MAXAXES 18 /* this should be same as the defined in AS system */
67 
68 #define KRNX_MAXSIGNAL 512
69 
70 
71 #define INT_CBUF_SIZ 512
72 
73 #define NON_COMPATIBLE
74 /*
75  * !! 注 意 !!
76  *
77  * krnx_dllは、信号数が512点までしか対応していなかったが
78  * 上記 #define NON_COMPATIBLE をコメントアウトすることで、
79  * 960点まで対応するようになります。
80  * また、インタプリタ用のバッファサイズも80バイトであった
81  * ところが512バイトまで拡張されます。
82  *
83  * このコメントは、信号数およびバッファサイズが拡張されて * いない従来のバージョンと拡張された新バージョンの互換が * とれた時点で削除してください。 * また、合せて NON_COMPATIBLE も削除してください。 * */ #define DI_MAX_SIGNAL 960 #define DO_MAX_SIGNAL 960 #define INTERNAL_MAX_SIGNAL 960 #define DBG_FVAL_NUM 16 /* エラーコード */ #define KRNX_NOERROR 0 #define KRNX_E_BADARGS (-0x1000) #define KRNX_E_INTERNAL (-0x1001) #define KRNX_E_NOTSUPPORTED (-0x1002) #define KRNX_E_TIMEOUT (-0x1003) #define KRNX_E_AUXNOTREADY (-0x1004) #define KRNX_E_FOPENFAIL (-0x1005) #define KRNX_E_FILENOTREADY (-0x1006) #define KRNX_E_MATRIX (-0x1007) #define KRNX_E_OUTOFRANGE (-0x1008) #define KRNX_E_CANNOTCAL (-0x1009) #define KRNX_E_COMPDATA (-0x100a) #define KRNX_E_BADUSRID (-0x100c) #define KRNX_E_NULLRESP (-0x100d) #define KRNX_E_LOSTPROMPT (-0x100e) #define KRNX_E_BUFSND (-0x1010) #define KRNX_E_BUFRCV (-0x1011) #define KRNX_E_BUFTMO (-0x1012) #define KRNX_E_ASERROR (-0x1020) #define KRNX_E_NOROBOT (-0x1021) #define KRNX_E_DISABLED (-0x1022) /* FX00436 a */ #define KRNX_E_CANTMOVECONFIG (-0x1030) #define KRNX_E_JT5NOT0DEG (-0x1031) #define KRNX_E_ILLCONFIG (-0x1032) #define KRNX_E_SOCK (-0x2000) #define KRNX_E_NOHOST (-0x2001) #define KRNX_E_IOCTLSOCK (-0x2002) #define KRNX_E_SOCKWRITE (-0x2003) #define KRNX_E_SOCKREAD (-0x2004) #define KRNX_E_NODATA (-0x2005) #define KRNX_E_INVALIDPORT (-0x2006) #define KRNX_E_CONNECT (-0x2007) #define KRNX_E_CANTLOGIN (-0x2008) #define KRNX_E_ALREADYOPENED (-0x2009) #define KRNX_E_UNEXPECTED (-0x2010) #define KRNX_E_KINENOTREADY (-0x2011) #define KRNX_E_ASDELAYED (-0x2012) #define KRNX_E_BUFEMPTY (-0x2013) #define KRNX_E_BUFNO (-0x2014) #define KRNX_E_BUFDATANUM (-0x2015) #define KRNX_E_RT_INTERNAL (-0x2100) #define KRNX_E_RT_CONNECT (-0x2101) #define KRNX_E_RT_TIMEOUT (-0x2102) #define KRNX_E_RT_NOTCONNECT (-0x2103) #define KRNX_E_RT_SEND (-0x2104) #define KRNX_E_PCASALREADYRUNNING (-0x2200) /* Dcon-plus6 */ #define KRNX_E_TOOMANYPROC (-0x2201) /* Dcon-plus6 */ #define KRNX_E_INVALIDFILENAME (-0x2202) /* Dcon-plus6 */ #define KRNX_E_ILLCONTNO (-0x2203) /* Dcon-plus16 */ #define KRNX_E_UNDEF (-0xFFFF) typedef struct { short error_lamp; short motor_lamp; short cycle_lamp; short repeat_lamp; short run_lamp; short trigger_lamp; short teach_lock_lamp; short emergency; } TKrnxPanelInfo; typedef struct { #ifdef NON_COMPATIBLE char io_do[KRNX_MAXSIGNAL/8]; char io_di[KRNX_MAXSIGNAL/8]; char internal[KRNX_MAXSIGNAL/8]; #else char io_do[DO_MAX_SIGNAL/8]; char io_di[DI_MAX_SIGNAL/8]; char internal[INTERNAL_MAX_SIGNAL/8]; #endif /* NON_COMPATIBLE */ } TKrnxIoInfo; typedef struct { short robot_status; float monitor_speed; float always_speed; float accuracy; } TKrnxMonInfo; typedef struct { short status; long exec_count, remain_count; char program_name[20]; short priority; short step_number; #ifdef NON_COMPATIBLE char step_name[80]; #else char step_name[INT_CBUF_SIZ]; #endif /* NON_COMPATIBLE */ } TKrnxStepperInfo; typedef struct { #ifdef NON_COMPATIBLE /* 本来配列サイズは、KRNX_MAX_ROBOTではなく、 */ /* 2(AS側の最大アーム数/コントローラ)で */ /* 十分であるが、互換性確保のためそのままとする */ TKrnxMonInfo mon[KRNX_MAX_ROBOT]; TKrnxStepperInfo robot[KRNX_MAX_ROBOT]; #else TKrnxMonInfo mon[2/*KRNX_MAX_ROBOT*/]; TKrnxStepperInfo robot[2/*KRNX_MAX_ROBOT*/]; #endif /* NON_COMPATIBLE */ TKrnxStepperInfo pc[KRNX_MAX_PCPROG]; } TKrnxProgramInfo; typedef struct { float ang[KRNX_MAXAXES]; long enc[KRNX_MAXAXES]; float vel[KRNX_MAXAXES]; float ang_ref[KRNX_MAXAXES]; long vel_ref[KRNX_MAXAXES]; float cur_ref[KRNX_MAXAXES]; } TKrnxMotionInfo; /* ZZ ++ */ typedef struct TSignalEx { unsigned long usr_di[DI_MAX_SIGNAL/32]; unsigned long usr_do[DO_MAX_SIGNAL/32]; unsigned long usr_internal[INTERNAL_MAX_SIGNAL/32]; } TSignalEx; /*** RTC情報 ***/ typedef struct TKrnxRtcInfo { short cyc; short buf; short interpolation; } TKrnxRtcInfo; /* サーボ用変数 */ typedef struct TDebugVariableInfo { float val[KRNX_MAXAXES][DBG_FVAL_NUM]; }TDebugVariableInfo; /* 信号情報 */ typedef struct TDebugSignalInfo { TSignalEx sig; }TDebugSignalInfo; /* システム情報 */ typedef struct TDebugSystemInfo { int a; int b; int c; }TDebugSystemInfo; /* ロボット動作情報 */ typedef struct TDebugTrajInfo { char step_info[INT_CBUF_SIZ]; /* ステップ情報 simu.h */ float sp; /* 速度 */ float accu; /* 加速度 */ int ctl_axis; /* 軸数 */ }TDebugTrajInfo; typedef struct TDebugMotionInfo { float ang[KRNX_MAXAXES]; float xyzoat[KRNX_MAXAXES]; long enc[KRNX_MAXAXES]; float vel[KRNX_MAXAXES]; float ang_ref[KRNX_MAXAXES]; long vel_ref[KRNX_MAXAXES]; float cur_ref[KRNX_MAXAXES]; float tool[KRNX_MAXAXES]; int mode; /* モード 0:RPLAN, 1:RMOVE, 2:RWAIT, 3:RHOLD, 4:REND */ int flg_stepup; float end_pos_jtang[KRNX_MAXAXES]; float end_pos_trans[KRNX_MAXAXES]; unsigned short clamp_spot_flg; }TDebugMotionInfo; typedef struct TKrnxDebugInfoEnt { TDebugSystemInfo sys; /* */ TDebugMotionInfo mtn; /* */ TDebugTrajInfo trj; /* */ TDebugVariableInfo val; /* */ TDebugSignalInfo io; /* */ }TKrnxDebugInfoEnt; /* ZZ -- */ // C#(PC-AS)向け対策 // C#ではデフォルト引数は使用できない // 必要あれば別のAPIを用意する //#ifdef __cplusplus //DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname = NULL, char *port_path = NULL ); //#else DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname ); //#endif DECLSPEC_IMPORT int WINAPI krnx_Close( int sd ); DECLSPEC_IMPORT int WINAPI krnx_SetAppParam( int type, char *param ); /* FX00436 a */ /************************** * AUXAPI(モニタコマンド) * ************************** */ /* element type for DELETE,LIST,SAVE */ #define QUAL_PRG 0x0001 /* プログラム、変数 */ #define QUAL_LOC 0x0002 #define QUAL_REAL 0x0004 #define QUAL_STR 0x0008 #define QUAL_INT 0x0010 #define QUAL_SYS 0x0020 /* データ */ #define QUAL_ROB 0x0040 #define QUAL_AUX 0x0080 #define QUAL_ARC 0x0100 #define QUAL_IFP 0x0200 #define QUAL_ELOG 0x0400 /* 特殊データ */ #define QUAL_FLT 0x0800 #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Kill( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcKill( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetSignal( int cont_no, int signal_no, int status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Reset( int cont_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Delete( int cont_no, const char *element_name, int element_type, int *as_err_code=NULL ); 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 ); DECLSPEC_IMPORT int WINAPI krnx_Ereset( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Do( int cont_no, int robot_no, const char *cmd, int *as_err_code=NULL ); 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 ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code ); 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_Kill( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code ); 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_PcKill( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, 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_Reset( int cont_no, int *as_err_code ); 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_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_Ereset( int cont_no, int robot_no, 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_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_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_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code ); #endif DECLSPEC_IMPORT int WINAPI krnx_Save( int cont_no, const char *filename, const char *program_name, int option ); DECLSPEC_IMPORT int WINAPI krnx_Load( int cont_no, const char *filename ); typedef BOOL (*FLoadCallBack)( void *param, long byte, const char *msg ); #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_SaveEx( int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); DECLSPEC_IMPORT int WINAPI krnx_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); #else 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_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp, void *cb_param ); #endif DECLSPEC_IMPORT int WINAPI krnx_ConvertErrorCode( int *error_code, char *error_level ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); /************************** * AS-API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_GetRobotName( int cont_no, int robot_no, char *robot_name ); DECLSPEC_IMPORT int WINAPI krnx_GetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_SetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoEx( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo, int data_type ); DECLSPEC_IMPORT int WINAPI krnx_GetIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo2( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_BufferBusy( int cont_no, int buf_no ); DECLSPEC_IMPORT int WINAPI krnx_BufferEmpty( int cont_no, int buf_no ); 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_BufferSendW( int cont_no, int buf_no, short req_code, const short *p, int num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_BufferSendB( int cont_no, int buf_no, short req_code, const char *p, int num, int timeout ); 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_BufferPeekF( int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout ); 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_BufferPeekW( int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout ); 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_BufferPeekB( int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitM( int cont_no, int robot_no, float *ll ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitP( int cont_no, int robot_no, float *ul ); DECLSPEC_IMPORT int WINAPI krnx_GetErrorInfo( int cont_no, int robot_no, int *error_code ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDI( int cont_no, const char *in, const char *mask, size_t size ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDO( int cont_no, const char *out, const char *mask, size_t size ); /************************** * 順逆変換API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_JointToXyzoat( int cont_no, int robot_no, const float *joint, float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_JointToMatrix( int cont_no, int robot_no, const float *joint, float *matrix ); 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_MatrixToJoint( int cont_no, int robot_no, const float *matrix, float *joint, const float *old_joint ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyXyzoat( const float *xyzoat_a, const float *xyzoat_b, float *xyzoat_c ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyMatrix( const float *matrix_a, const float *matrix_b, float *matrix_c ); DECLSPEC_IMPORT int WINAPI krnx_InverseXyzoat( const float *xyzoat_a, float *xyzoat_b ); DECLSPEC_IMPORT int WINAPI krnx_InverseMatrix( const float *matrix_a, float *matrix_b ); DECLSPEC_IMPORT int WINAPI krnx_MatrixToXyzoat( const float *matrix , float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_XyzoatToMatrix( const float *xyzoat , float *matrix ); 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_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_JacobiMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *jacobi66 , float *matrix ); 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_JaInvMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *ja_inv66 , float *matrix ); 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_XyzoatToJoint2( int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint, int conf ); DECLSPEC_IMPORT int WINAPI krnx_GetConfig( int cont_no, int robot_no, float *joint, int *conf ); DECLSPEC_IMPORT int WINAPI krnx_GetASCycle( int robot_no, int *cycle_time ); DECLSPEC_IMPORT int WINAPI krnx_SetJT1Mode( int mode ); /************************** * RT-API * ************************** */ typedef struct { float ang[KRNX_MAXAXES]; float ang_ref[KRNX_MAXAXES]; float cur[KRNX_MAXAXES]; long enc[KRNX_MAXAXES]; } TKrnxCurMotionData; DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionData( int cont_no, int robot_no, TKrnxCurMotionData *md ); DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorLamp( int cont_no, int robot_no, int *error_lamp ); /* EX3390 a */ DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorInfo( int cont_no, int robot_no, int *error_code ); /* EX3390 a */ /* RTC */ 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_PrimeRtcCompData( int cont_no, int robot_no, const float *comp, int *status ); /* EX3391 a */ DECLSPEC_IMPORT int WINAPI krnx_SendRtcCompData( int cont_no, unsigned short seq_no ); /* EX3391 a */ 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_GetRtcCompData( int cont_no, int robot_no, float *comp ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompLimit( int cont_no, int robot_no, float *comp_limit ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcErrorFlag( int cont_no, int robot_no, int error_flag, unsigned short seq_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcErrorFlag( int cont_no, int robot_no, int *error_flag ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcSwitch( int cont_no, int robot_no, int *rtc_sw ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompMask( int cont_no, int robot_no, int mask ); DECLSPEC_IMPORT int WINAPI krnx_OldCompClear( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcBufferLength( int cont_no, int robot_no ); /* EX3390 a */ DECLSPEC_IMPORT void WINAPI krnx_timer_callback( void ); DECLSPEC_IMPORT int WINAPI krnx_RtcInit( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed( int cont_no, int robot_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPos( int cont_no, int robot_no, int wk_no, float pos, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeedEx( int cont_no, int robot_no, int axis_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPosEx( int cont_no, int robot_no, int axis_no, int wk_no, float pos, float *prev ); /******************************* * KRNX内部API ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_GetKrnxVersion( char *ver_text, int ver_len ); /* FX00919 a */ /************************** * ARC-API * ************************** */ #ifdef KRNX_ARC DECLSPEC_IMPORT int WINAPI krnx_ArcCmdWrite( int cont_no, int robot_no, int cmd, int i_cmd, int v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcCmdRead( int cont_no, int robot_no, int *i_cmd, int *v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcStatusRead( int cont_no, int robot_no, int *hw_status, int *rob_status, int *hw_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcModifyWrite( int cont_no, int robot_no, int and_cmd, int or_cmd, int and_status, int or_status ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChange( int cont_no, int robot_no, float sp, float cur, float vlt, float width, float freq, int pn ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); /* SRV_TORCH ++ */ DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtMotorLoad( int cont_no, int robot_no, float *mload ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtRotation( int cont_no, int robot_no, float *delta_ang ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetCurSrvtRotation( int cont_no, int robot_no, float *ang ); /* SRV_TORCH -- */ #endif /* KRNX_ARC */ /* ETHER */ DECLSPEC_IMPORT int WINAPI krnx_GetCycleCount( int cont_no, int robot_no, int counter_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_init( char *hostname ); DECLSPEC_IMPORT int WINAPI krnx_eth_open( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_close( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetPriority( DWORD p ); /******************************* * 旧PCコンとの互換性のため ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_NotSupport( void ); DECLSPEC_IMPORT int WINAPI krnx_PanelHw( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_PanelToPC( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_GetArmMode( int, int ); typedef struct { short no, num; // 信号番号 1〜1001〜、ビット数 char str[80]; // }TKrnxDDSig; DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig( int cont_no, char *dd_di, char *dd_do ); DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo( int cont_no, int io_no, const TKrnxDDSig** ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync( int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num ); /******************************* * PcAs起動API ******************************* */ /* ++ Dcon-plus6 ++ */ #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name ); #endif DECLSPEC_IMPORT int WINAPI krnx_StopPcAs( void ); /* -- Dcon-plus6 -- */ DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx( int entry ); /* Dcon-plus16 a */ /* New datasync api 090210 */ DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_SetJoint( int cont_no, int robot_no, float ang[KRNX_MAXAXES] ); #ifdef __cplusplus } #endif #endif /* KRNX_H__ */
84  * いない従来のバージョンと拡張された新バージョンの互換が
85  * とれた時点で削除してください。
86  * また、合せて NON_COMPATIBLE も削除してください。
87  *
88  */
89 
90 #define DI_MAX_SIGNAL 960
91 #define DO_MAX_SIGNAL 960
92 #define INTERNAL_MAX_SIGNAL 960
93 
94 #define DBG_FVAL_NUM 16
95 
96 /* エラーコード */
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)
115 
116 #define KRNX_E_ASERROR (-0x1020)
117 #define KRNX_E_NOROBOT (-0x1021)
118 #define KRNX_E_DISABLED (-0x1022) /* FX00436 a */
119 
120 #define KRNX_E_CANTMOVECONFIG (-0x1030)
121 #define KRNX_E_JT5NOT0DEG (-0x1031)
122 #define KRNX_E_ILLCONFIG (-0x1032)
123 
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)
140 
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)
146 
147 #define KRNX_E_PCASALREADYRUNNING (-0x2200) /* Dcon-plus6 */
148 #define KRNX_E_TOOMANYPROC (-0x2201) /* Dcon-plus6 */
149 #define KRNX_E_INVALIDFILENAME (-0x2202) /* Dcon-plus6 */
150 #define KRNX_E_ILLCONTNO (-0x2203) /* Dcon-plus16 */
151 
152 #define KRNX_E_UNDEF (-0xFFFF)
153 
154 
155 typedef struct
156 {
157  short error_lamp;
158  short motor_lamp;
159  short cycle_lamp;
160  short repeat_lamp;
161  short run_lamp;
164  short emergency;
166 
167 typedef struct
168 {
169 #ifdef NON_COMPATIBLE
170  char io_do[KRNX_MAXSIGNAL/8];
171  char io_di[KRNX_MAXSIGNAL/8];
172  char internal[KRNX_MAXSIGNAL/8];
173 #else
174  char io_do[DO_MAX_SIGNAL/8];
175  char io_di[DI_MAX_SIGNAL/8];
176  char internal[INTERNAL_MAX_SIGNAL/8];
177 #endif /* NON_COMPATIBLE */
178 } TKrnxIoInfo;
179 
180 typedef struct
181 {
185  float accuracy;
186 } TKrnxMonInfo;
187 
188 typedef struct
189 {
190  short status;
191  long exec_count, remain_count;
192  char program_name[20];
193  short priority;
194  short step_number;
195 #ifdef NON_COMPATIBLE
196  char step_name[80];
197 #else
198  char step_name[INT_CBUF_SIZ];
199 #endif /* NON_COMPATIBLE */
201 
202 typedef struct
203 {
204 #ifdef NON_COMPATIBLE
205  /* 本来配列サイズは、KRNX_MAX_ROBOTではなく、 */
206  /* 2(AS側の最大アーム数/コントローラ)で */
207  /* 十分であるが、互換性確保のためそのままとする */
210 #else
211  TKrnxMonInfo mon[2/*KRNX_MAX_ROBOT*/];
212  TKrnxStepperInfo robot[2/*KRNX_MAX_ROBOT*/];
213 #endif /* NON_COMPATIBLE */
216 
217 typedef struct
218 {
219  float ang[KRNX_MAXAXES];
220  long enc[KRNX_MAXAXES];
221  float vel[KRNX_MAXAXES];
222  float ang_ref[KRNX_MAXAXES];
223  long vel_ref[KRNX_MAXAXES];
224  float cur_ref[KRNX_MAXAXES];
226 
227 /* ZZ ++ */
228 typedef struct TSignalEx
229 {
230  unsigned long usr_di[DI_MAX_SIGNAL/32];
231  unsigned long usr_do[DO_MAX_SIGNAL/32];
233 } TSignalEx;
234 
235 /*** RTC情報 ***/
236 typedef struct TKrnxRtcInfo
237 {
238  short cyc;
239  short buf;
241 } TKrnxRtcInfo;
242 
243 /* サーボ用変数 */
244 typedef struct TDebugVariableInfo
245 {
248 
249 /* 信号情報 */
250 typedef struct TDebugSignalInfo
251 {
254 
255 /* システム情報 */
256 typedef struct TDebugSystemInfo
257 {
258  int a;
259  int b;
260  int c;
262 
263 /* ロボット動作情報 */
264 typedef struct TDebugTrajInfo
265 {
266  char step_info[INT_CBUF_SIZ]; /* ステップ情報 simu.h */
267  float sp; /* 速度 */
268  float accu; /* 加速度 */
269  int ctl_axis; /* 軸数 */
271 
272 typedef struct TDebugMotionInfo
273 {
274  float ang[KRNX_MAXAXES];
275  float xyzoat[KRNX_MAXAXES];
276  long enc[KRNX_MAXAXES];
277  float vel[KRNX_MAXAXES];
278  float ang_ref[KRNX_MAXAXES];
279  long vel_ref[KRNX_MAXAXES];
280  float cur_ref[KRNX_MAXAXES];
281  float tool[KRNX_MAXAXES];
282  int mode; /* モード 0:RPLAN, 1:RMOVE, 2:RWAIT, 3:RHOLD, 4:REND */
284  float end_pos_jtang[KRNX_MAXAXES];
285  float end_pos_trans[KRNX_MAXAXES];
286  unsigned short clamp_spot_flg;
288 
289 typedef struct TKrnxDebugInfoEnt
290 {
297 /* ZZ -- */
298 
299 // C#(PC-AS)向け対策// C#ではデフォルト引数は使用できない // 必要あれば別のAPIを用意する //#ifdef __cplusplus //DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname = NULL, char *port_path = NULL ); //#else DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname ); //#endif DECLSPEC_IMPORT int WINAPI krnx_Close( int sd ); DECLSPEC_IMPORT int WINAPI krnx_SetAppParam( int type, char *param ); /* FX00436 a */ /************************** * AUXAPI(モニタコマンド) * ************************** */ /* element type for DELETE,LIST,SAVE */ #define QUAL_PRG 0x0001 /* プログラム、変数 */ #define QUAL_LOC 0x0002 #define QUAL_REAL 0x0004 #define QUAL_STR 0x0008 #define QUAL_INT 0x0010 #define QUAL_SYS 0x0020 /* データ */ #define QUAL_ROB 0x0040 #define QUAL_AUX 0x0080 #define QUAL_ARC 0x0100 #define QUAL_IFP 0x0200 #define QUAL_ELOG 0x0400 /* 特殊データ */ #define QUAL_FLT 0x0800 #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Kill( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcKill( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetSignal( int cont_no, int signal_no, int status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Reset( int cont_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Delete( int cont_no, const char *element_name, int element_type, int *as_err_code=NULL ); 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 ); DECLSPEC_IMPORT int WINAPI krnx_Ereset( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Do( int cont_no, int robot_no, const char *cmd, int *as_err_code=NULL ); 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 ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code ); 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_Kill( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code ); 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_PcKill( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, 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_Reset( int cont_no, int *as_err_code ); 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_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_Ereset( int cont_no, int robot_no, 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_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_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_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code ); #endif DECLSPEC_IMPORT int WINAPI krnx_Save( int cont_no, const char *filename, const char *program_name, int option ); DECLSPEC_IMPORT int WINAPI krnx_Load( int cont_no, const char *filename ); typedef BOOL (*FLoadCallBack)( void *param, long byte, const char *msg ); #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_SaveEx( int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); DECLSPEC_IMPORT int WINAPI krnx_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); #else 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_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp, void *cb_param ); #endif DECLSPEC_IMPORT int WINAPI krnx_ConvertErrorCode( int *error_code, char *error_level ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); /************************** * AS-API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_GetRobotName( int cont_no, int robot_no, char *robot_name ); DECLSPEC_IMPORT int WINAPI krnx_GetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_SetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoEx( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo, int data_type ); DECLSPEC_IMPORT int WINAPI krnx_GetIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo2( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_BufferBusy( int cont_no, int buf_no ); DECLSPEC_IMPORT int WINAPI krnx_BufferEmpty( int cont_no, int buf_no ); 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_BufferSendW( int cont_no, int buf_no, short req_code, const short *p, int num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_BufferSendB( int cont_no, int buf_no, short req_code, const char *p, int num, int timeout ); 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_BufferPeekF( int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout ); 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_BufferPeekW( int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout ); 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_BufferPeekB( int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitM( int cont_no, int robot_no, float *ll ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitP( int cont_no, int robot_no, float *ul ); DECLSPEC_IMPORT int WINAPI krnx_GetErrorInfo( int cont_no, int robot_no, int *error_code ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDI( int cont_no, const char *in, const char *mask, size_t size ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDO( int cont_no, const char *out, const char *mask, size_t size ); /************************** * 順逆変換API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_JointToXyzoat( int cont_no, int robot_no, const float *joint, float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_JointToMatrix( int cont_no, int robot_no, const float *joint, float *matrix ); 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_MatrixToJoint( int cont_no, int robot_no, const float *matrix, float *joint, const float *old_joint ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyXyzoat( const float *xyzoat_a, const float *xyzoat_b, float *xyzoat_c ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyMatrix( const float *matrix_a, const float *matrix_b, float *matrix_c ); DECLSPEC_IMPORT int WINAPI krnx_InverseXyzoat( const float *xyzoat_a, float *xyzoat_b ); DECLSPEC_IMPORT int WINAPI krnx_InverseMatrix( const float *matrix_a, float *matrix_b ); DECLSPEC_IMPORT int WINAPI krnx_MatrixToXyzoat( const float *matrix , float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_XyzoatToMatrix( const float *xyzoat , float *matrix ); 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_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_JacobiMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *jacobi66 , float *matrix ); 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_JaInvMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *ja_inv66 , float *matrix ); 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_XyzoatToJoint2( int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint, int conf ); DECLSPEC_IMPORT int WINAPI krnx_GetConfig( int cont_no, int robot_no, float *joint, int *conf ); DECLSPEC_IMPORT int WINAPI krnx_GetASCycle( int robot_no, int *cycle_time ); DECLSPEC_IMPORT int WINAPI krnx_SetJT1Mode( int mode ); /************************** * RT-API * ************************** */ typedef struct { float ang[KRNX_MAXAXES]; float ang_ref[KRNX_MAXAXES]; float cur[KRNX_MAXAXES]; long enc[KRNX_MAXAXES]; } TKrnxCurMotionData; DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionData( int cont_no, int robot_no, TKrnxCurMotionData *md ); DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorLamp( int cont_no, int robot_no, int *error_lamp ); /* EX3390 a */ DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorInfo( int cont_no, int robot_no, int *error_code ); /* EX3390 a */ /* RTC */ 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_PrimeRtcCompData( int cont_no, int robot_no, const float *comp, int *status ); /* EX3391 a */ DECLSPEC_IMPORT int WINAPI krnx_SendRtcCompData( int cont_no, unsigned short seq_no ); /* EX3391 a */ 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_GetRtcCompData( int cont_no, int robot_no, float *comp ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompLimit( int cont_no, int robot_no, float *comp_limit ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcErrorFlag( int cont_no, int robot_no, int error_flag, unsigned short seq_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcErrorFlag( int cont_no, int robot_no, int *error_flag ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcSwitch( int cont_no, int robot_no, int *rtc_sw ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompMask( int cont_no, int robot_no, int mask ); DECLSPEC_IMPORT int WINAPI krnx_OldCompClear( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcBufferLength( int cont_no, int robot_no ); /* EX3390 a */ DECLSPEC_IMPORT void WINAPI krnx_timer_callback( void ); DECLSPEC_IMPORT int WINAPI krnx_RtcInit( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed( int cont_no, int robot_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPos( int cont_no, int robot_no, int wk_no, float pos, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeedEx( int cont_no, int robot_no, int axis_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPosEx( int cont_no, int robot_no, int axis_no, int wk_no, float pos, float *prev ); /******************************* * KRNX内部API ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_GetKrnxVersion( char *ver_text, int ver_len ); /* FX00919 a */ /************************** * ARC-API * ************************** */ #ifdef KRNX_ARC DECLSPEC_IMPORT int WINAPI krnx_ArcCmdWrite( int cont_no, int robot_no, int cmd, int i_cmd, int v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcCmdRead( int cont_no, int robot_no, int *i_cmd, int *v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcStatusRead( int cont_no, int robot_no, int *hw_status, int *rob_status, int *hw_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcModifyWrite( int cont_no, int robot_no, int and_cmd, int or_cmd, int and_status, int or_status ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChange( int cont_no, int robot_no, float sp, float cur, float vlt, float width, float freq, int pn ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); /* SRV_TORCH ++ */ DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtMotorLoad( int cont_no, int robot_no, float *mload ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtRotation( int cont_no, int robot_no, float *delta_ang ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetCurSrvtRotation( int cont_no, int robot_no, float *ang ); /* SRV_TORCH -- */ #endif /* KRNX_ARC */ /* ETHER */ DECLSPEC_IMPORT int WINAPI krnx_GetCycleCount( int cont_no, int robot_no, int counter_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_init( char *hostname ); DECLSPEC_IMPORT int WINAPI krnx_eth_open( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_close( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetPriority( DWORD p ); /******************************* * 旧PCコンとの互換性のため ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_NotSupport( void ); DECLSPEC_IMPORT int WINAPI krnx_PanelHw( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_PanelToPC( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_GetArmMode( int, int ); typedef struct { short no, num; // 信号番号 1〜1001〜、ビット数 char str[80]; // }TKrnxDDSig; DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig( int cont_no, char *dd_di, char *dd_do ); DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo( int cont_no, int io_no, const TKrnxDDSig** ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync( int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num ); /******************************* * PcAs起動API ******************************* */ /* ++ Dcon-plus6 ++ */ #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name ); #endif DECLSPEC_IMPORT int WINAPI krnx_StopPcAs( void ); /* -- Dcon-plus6 -- */ DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx( int entry ); /* Dcon-plus16 a */ /* New datasync api 090210 */ DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_SetJoint( int cont_no, int robot_no, float ang[KRNX_MAXAXES] ); #ifdef __cplusplus } #endif #endif /* KRNX_H__ */
300 // C#ではデフォルト引数は使用できない
301 // 必要あれば別のAPIを用意する//#ifdef __cplusplus //DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname = NULL, char *port_path = NULL ); //#else DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname ); //#endif DECLSPEC_IMPORT int WINAPI krnx_Close( int sd ); DECLSPEC_IMPORT int WINAPI krnx_SetAppParam( int type, char *param ); /* FX00436 a */ /************************** * AUXAPI(モニタコマンド) * ************************** */ /* element type for DELETE,LIST,SAVE */ #define QUAL_PRG 0x0001 /* プログラム、変数 */ #define QUAL_LOC 0x0002 #define QUAL_REAL 0x0004 #define QUAL_STR 0x0008 #define QUAL_INT 0x0010 #define QUAL_SYS 0x0020 /* データ */ #define QUAL_ROB 0x0040 #define QUAL_AUX 0x0080 #define QUAL_ARC 0x0100 #define QUAL_IFP 0x0200 #define QUAL_ELOG 0x0400 /* 特殊データ */ #define QUAL_FLT 0x0800 #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Kill( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code=NULL ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_PcKill( int cont_no, int pcprogram_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_SetSignal( int cont_no, int signal_no, int status, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Reset( int cont_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Delete( int cont_no, const char *element_name, int element_type, int *as_err_code=NULL ); 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 ); DECLSPEC_IMPORT int WINAPI krnx_Ereset( int cont_no, int robot_no, int *as_err_code=NULL ); DECLSPEC_IMPORT int WINAPI krnx_Do( int cont_no, int robot_no, const char *cmd, int *as_err_code=NULL ); 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 ); 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=NULL ); DECLSPEC_IMPORT int WINAPI krnx_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code ); 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_Kill( int cont_no, int robot_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code ); 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_PcKill( int cont_no, int pcprogram_no, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code ); DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, 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_Reset( int cont_no, int *as_err_code ); 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_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_Ereset( int cont_no, int robot_no, 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_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_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_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code ); #endif DECLSPEC_IMPORT int WINAPI krnx_Save( int cont_no, const char *filename, const char *program_name, int option ); DECLSPEC_IMPORT int WINAPI krnx_Load( int cont_no, const char *filename ); typedef BOOL (*FLoadCallBack)( void *param, long byte, const char *msg ); #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_SaveEx( int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); DECLSPEC_IMPORT int WINAPI krnx_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp=NULL, void *cb_param=NULL ); #else 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_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp, void *cb_param ); #endif DECLSPEC_IMPORT int WINAPI krnx_ConvertErrorCode( int *error_code, char *error_level ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info ); /************************** * AS-API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_GetRobotName( int cont_no, int robot_no, char *robot_name ); DECLSPEC_IMPORT int WINAPI krnx_GetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_SetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoEx( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo, int data_type ); DECLSPEC_IMPORT int WINAPI krnx_GetIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetCurIoInfo( int cont_no, TKrnxIoInfo *ioinfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo2( int cont_no, int robot_no, TKrnxProgramInfo *proginfo ); DECLSPEC_IMPORT int WINAPI krnx_BufferBusy( int cont_no, int buf_no ); DECLSPEC_IMPORT int WINAPI krnx_BufferEmpty( int cont_no, int buf_no ); 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_BufferSendW( int cont_no, int buf_no, short req_code, const short *p, int num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_BufferSendB( int cont_no, int buf_no, short req_code, const char *p, int num, int timeout ); 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_BufferPeekF( int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout ); 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_BufferPeekW( int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout ); 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_BufferPeekB( int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitM( int cont_no, int robot_no, float *ll ); DECLSPEC_IMPORT int WINAPI krnx_GetLimitP( int cont_no, int robot_no, float *ul ); DECLSPEC_IMPORT int WINAPI krnx_GetErrorInfo( int cont_no, int robot_no, int *error_code ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDI( int cont_no, const char *in, const char *mask, size_t size ); DECLSPEC_IMPORT int WINAPI krnx_IoSetDO( int cont_no, const char *out, const char *mask, size_t size ); /************************** * 順逆変換API * ************************** */ DECLSPEC_IMPORT int WINAPI krnx_JointToXyzoat( int cont_no, int robot_no, const float *joint, float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_JointToMatrix( int cont_no, int robot_no, const float *joint, float *matrix ); 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_MatrixToJoint( int cont_no, int robot_no, const float *matrix, float *joint, const float *old_joint ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyXyzoat( const float *xyzoat_a, const float *xyzoat_b, float *xyzoat_c ); DECLSPEC_IMPORT int WINAPI krnx_MultiplyMatrix( const float *matrix_a, const float *matrix_b, float *matrix_c ); DECLSPEC_IMPORT int WINAPI krnx_InverseXyzoat( const float *xyzoat_a, float *xyzoat_b ); DECLSPEC_IMPORT int WINAPI krnx_InverseMatrix( const float *matrix_a, float *matrix_b ); DECLSPEC_IMPORT int WINAPI krnx_MatrixToXyzoat( const float *matrix , float *xyzoat ); DECLSPEC_IMPORT int WINAPI krnx_XyzoatToMatrix( const float *xyzoat , float *matrix ); 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_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_JacobiMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *jacobi66 , float *matrix ); 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_JaInvMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *ja_inv66 , float *matrix ); 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_XyzoatToJoint2( int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint, int conf ); DECLSPEC_IMPORT int WINAPI krnx_GetConfig( int cont_no, int robot_no, float *joint, int *conf ); DECLSPEC_IMPORT int WINAPI krnx_GetASCycle( int robot_no, int *cycle_time ); DECLSPEC_IMPORT int WINAPI krnx_SetJT1Mode( int mode ); /************************** * RT-API * ************************** */ typedef struct { float ang[KRNX_MAXAXES]; float ang_ref[KRNX_MAXAXES]; float cur[KRNX_MAXAXES]; long enc[KRNX_MAXAXES]; } TKrnxCurMotionData; DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionData( int cont_no, int robot_no, TKrnxCurMotionData *md ); DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorLamp( int cont_no, int robot_no, int *error_lamp ); /* EX3390 a */ DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorInfo( int cont_no, int robot_no, int *error_code ); /* EX3390 a */ /* RTC */ 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_PrimeRtcCompData( int cont_no, int robot_no, const float *comp, int *status ); /* EX3391 a */ DECLSPEC_IMPORT int WINAPI krnx_SendRtcCompData( int cont_no, unsigned short seq_no ); /* EX3391 a */ 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_GetRtcCompData( int cont_no, int robot_no, float *comp ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompLimit( int cont_no, int robot_no, float *comp_limit ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcErrorFlag( int cont_no, int robot_no, int error_flag, unsigned short seq_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcErrorFlag( int cont_no, int robot_no, int *error_flag ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcSwitch( int cont_no, int robot_no, int *rtc_sw ); DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompMask( int cont_no, int robot_no, int mask ); DECLSPEC_IMPORT int WINAPI krnx_OldCompClear( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_GetRtcBufferLength( int cont_no, int robot_no ); /* EX3390 a */ DECLSPEC_IMPORT void WINAPI krnx_timer_callback( void ); DECLSPEC_IMPORT int WINAPI krnx_RtcInit( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed( int cont_no, int robot_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPos( int cont_no, int robot_no, int wk_no, float pos, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeedEx( int cont_no, int robot_no, int axis_no, float spd, float *prev ); DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPosEx( int cont_no, int robot_no, int axis_no, int wk_no, float pos, float *prev ); /******************************* * KRNX内部API ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_GetKrnxVersion( char *ver_text, int ver_len ); /* FX00919 a */ /************************** * ARC-API * ************************** */ #ifdef KRNX_ARC DECLSPEC_IMPORT int WINAPI krnx_ArcCmdWrite( int cont_no, int robot_no, int cmd, int i_cmd, int v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcCmdRead( int cont_no, int robot_no, int *i_cmd, int *v_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcStatusRead( int cont_no, int robot_no, int *hw_status, int *rob_status, int *hw_cmd ); DECLSPEC_IMPORT int WINAPI krnx_ArcModifyWrite( int cont_no, int robot_no, int and_cmd, int or_cmd, int and_status, int or_status ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChange( int cont_no, int robot_no, float sp, float cur, float vlt, float width, float freq, int pn ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeOk( int cont_no, int robot_no ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeMode( int cont_no, int robot_no, int on_off ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzChange( int cont_no, int robot_no, float x, float y, float z ); DECLSPEC_IMPORT int WINAPI krnx_ArcToolXyzRead( int cont_no, int robot_no, float *x, float *y, float *z ); /* SRV_TORCH ++ */ DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtMotorLoad( int cont_no, int robot_no, float *mload ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtRotation( int cont_no, int robot_no, float *delta_ang ); DECLSPEC_IMPORT int WINAPI krnx_ArcGetCurSrvtRotation( int cont_no, int robot_no, float *ang ); /* SRV_TORCH -- */ #endif /* KRNX_ARC */ /* ETHER */ DECLSPEC_IMPORT int WINAPI krnx_GetCycleCount( int cont_no, int robot_no, int counter_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_init( char *hostname ); DECLSPEC_IMPORT int WINAPI krnx_eth_open( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_eth_close( int cont_no ); DECLSPEC_IMPORT int WINAPI krnx_SetPriority( DWORD p ); /******************************* * 旧PCコンとの互換性のため ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_NotSupport( void ); DECLSPEC_IMPORT int WINAPI krnx_PanelHw( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_PanelToPC( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_GetArmMode( int, int ); typedef struct { short no, num; // 信号番号 1〜1001〜、ビット数 char str[80]; // }TKrnxDDSig; DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig( int cont_no, char *dd_di, char *dd_do ); DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo( int cont_no, int io_no, const TKrnxDDSig** ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync( int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num ); /******************************* * PcAs起動API ******************************* */ /* ++ Dcon-plus6 ++ */ #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name ); #endif DECLSPEC_IMPORT int WINAPI krnx_StopPcAs( void ); /* -- Dcon-plus6 -- */ DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx( int entry ); /* Dcon-plus16 a */ /* New datasync api 090210 */ DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_SetJoint( int cont_no, int robot_no, float ang[KRNX_MAXAXES] ); #ifdef __cplusplus } #endif #endif /* KRNX_H__ */
302 //#ifdef __cplusplus
303 //DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname = NULL, char *port_path = NULL );
304 //#else
305 DECLSPEC_IMPORT int WINAPI krnx_Open( int cont_no, char *hostname );
306 //#endif
307 DECLSPEC_IMPORT int WINAPI krnx_Close( int sd );
308 
309 DECLSPEC_IMPORT int WINAPI krnx_SetAppParam( int type, char *param ); /* FX00436 a */
310 
311 /**************************
312  * AUXAPI(モニタコマンド) *
313  **************************
314  */
315 
316 /* element type for DELETE,LIST,SAVE */
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
329 
330 #ifdef __cplusplus
331 DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code=NULL );
332 DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code=NULL );
333 DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code=NULL );
334 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=NULL );
335 DECLSPEC_IMPORT int WINAPI krnx_Kill( int cont_no, int robot_no, int *as_err_code=NULL );
336 DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code=NULL );
337 DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code=NULL );
338 DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code=NULL );
339 DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code=NULL );
340 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=NULL );
341 DECLSPEC_IMPORT int WINAPI krnx_PcKill( int cont_no, int pcprogram_no, int *as_err_code=NULL );
342 DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL );
343 DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL );
344 DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code=NULL );
345 DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code=NULL );
346 DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, int *as_err_code=NULL );
347 DECLSPEC_IMPORT int WINAPI krnx_SetSignal( int cont_no, int signal_no, int status, int *as_err_code=NULL );
348 DECLSPEC_IMPORT int WINAPI krnx_Reset( int cont_no, int *as_err_code=NULL );
349 DECLSPEC_IMPORT int WINAPI krnx_Delete( int cont_no, const char *element_name, int element_type, int *as_err_code=NULL );
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 );
351 DECLSPEC_IMPORT int WINAPI krnx_Ereset( int cont_no, int robot_no, int *as_err_code=NULL );
352 DECLSPEC_IMPORT int WINAPI krnx_Do( int cont_no, int robot_no, const char *cmd, 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 );
354 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=NULL );
355 DECLSPEC_IMPORT int WINAPI krnx_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code=NULL );
356 #else
357 DECLSPEC_IMPORT int WINAPI krnx_Abort( int cont_no, int robot_no, int *as_err_code );
358 DECLSPEC_IMPORT int WINAPI krnx_Hold( int cont_no, int robot_no, int *as_err_code );
359 DECLSPEC_IMPORT int WINAPI krnx_Continue( int cont_no, int robot_no, int next, int *as_err_code );
360 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 );
361 DECLSPEC_IMPORT int WINAPI krnx_Kill( int cont_no, int robot_no, int *as_err_code );
362 DECLSPEC_IMPORT int WINAPI krnx_SetMonSpeed( int cont_no, int robot_no, float speed, int *as_err_code );
363 DECLSPEC_IMPORT int WINAPI krnx_PcAbort( int cont_no, int pcprogram_no, int *as_err_code );
364 DECLSPEC_IMPORT int WINAPI krnx_PcEnd( int cont_no, int pcprogram_no, int *as_err_code );
365 DECLSPEC_IMPORT int WINAPI krnx_PcContinue( int cont_no, int pcprogram_no, int next, int *as_err_code );
366 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 );
367 DECLSPEC_IMPORT int WINAPI krnx_PcKill( int cont_no, int pcprogram_no, int *as_err_code );
368 DECLSPEC_IMPORT int WINAPI krnx_GetBaseMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code );
369 DECLSPEC_IMPORT int WINAPI krnx_SetBaseMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code );
370 DECLSPEC_IMPORT int WINAPI krnx_GetToolMatrix( int cont_no, int robot_no, float *xyzoat, int *as_err_code );
371 DECLSPEC_IMPORT int WINAPI krnx_SetToolMatrix( int cont_no, int robot_no, const float *xyzoat, int *as_err_code );
372 DECLSPEC_IMPORT int WINAPI krnx_GetSignal( int cont_no, int signal_no, int *status, int *as_err_code );
373 DECLSPEC_IMPORT int WINAPI krnx_SetSignal( int cont_no, int signal_no, int status, int *as_err_code );
374 DECLSPEC_IMPORT int WINAPI krnx_Reset( int cont_no, int *as_err_code );
375 DECLSPEC_IMPORT int WINAPI krnx_Delete( int cont_no, const char *element_name, int element_type, int *as_err_code );
376 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 );
377 DECLSPEC_IMPORT int WINAPI krnx_Ereset( int cont_no, int robot_no, int *as_err_code );
378 DECLSPEC_IMPORT int WINAPI krnx_Do( int cont_no, int robot_no, const char *cmd, int *as_err_code );
379 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 );
380 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 );
381 DECLSPEC_IMPORT int WINAPI krnx_ExecMon( int cont_no, const char *cmd, char *buffer, int buffer_sz, int *as_err_code );
382 #endif
383 
384 DECLSPEC_IMPORT int WINAPI krnx_Save( int cont_no, const char *filename, const char *program_name, int option );
385 DECLSPEC_IMPORT int WINAPI krnx_Load( int cont_no, const char *filename );
386 
387 typedef BOOL (*FLoadCallBack)( void *param, long byte, const char *msg );
388 
389 #ifdef __cplusplus
390 DECLSPEC_IMPORT int WINAPI krnx_SaveEx( int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp=NULL, void *cb_param=NULL );
391 DECLSPEC_IMPORT int WINAPI krnx_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp=NULL, void *cb_param=NULL );
392 #else
393 DECLSPEC_IMPORT int WINAPI krnx_SaveEx( int cont_no, const char *filename, const char *program_name, int option, FLoadCallBack cbfp, void *cb_param );
394 DECLSPEC_IMPORT int WINAPI krnx_LoadEx( int cont_no, const char *filename, FLoadCallBack cbfp, void *cb_param );
395 #endif
396 
397 DECLSPEC_IMPORT int WINAPI krnx_ConvertErrorCode( int *error_code, char *error_level );
398 DECLSPEC_IMPORT int WINAPI krnx_GetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info );
399 DECLSPEC_IMPORT int WINAPI krnx_SetRtcInfo( int cont_no, TKrnxRtcInfo *rtc_info );
400 
401 /**************************
402  * AS-API *
403  **************************
404  */
405 DECLSPEC_IMPORT int WINAPI krnx_GetRobotName( int cont_no, int robot_no, char *robot_name );
406 DECLSPEC_IMPORT int WINAPI krnx_GetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo );
407 DECLSPEC_IMPORT int WINAPI krnx_SetPanelInfo( int cont_no, int robot_no, TKrnxPanelInfo *panelinfo );
408 DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo );
409 DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionInfo( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo );
410 DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoEx( int cont_no, int robot_no, TKrnxMotionInfo *mtninfo, int data_type );
411 DECLSPEC_IMPORT int WINAPI krnx_GetIoInfo( int cont_no, TKrnxIoInfo *ioinfo );
412 DECLSPEC_IMPORT int WINAPI krnx_GetCurIoInfo( int cont_no, TKrnxIoInfo *ioinfo );
413 DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo( int cont_no, int robot_no, TKrnxProgramInfo *proginfo );
414 DECLSPEC_IMPORT int WINAPI krnx_GetProgramInfo2( int cont_no, int robot_no, TKrnxProgramInfo *proginfo );
415 
416 DECLSPEC_IMPORT int WINAPI krnx_BufferBusy( int cont_no, int buf_no );
417 DECLSPEC_IMPORT int WINAPI krnx_BufferEmpty( int cont_no, int buf_no );
418 DECLSPEC_IMPORT int WINAPI krnx_BufferSendF( int cont_no, int buf_no, short req_code, const float *p, int num, int timeout );
419 DECLSPEC_IMPORT int WINAPI krnx_BufferSendW( int cont_no, int buf_no, short req_code, const short *p, int num, int timeout );
420 DECLSPEC_IMPORT int WINAPI krnx_BufferSendB( int cont_no, int buf_no, short req_code, const char *p, int num, int timeout );
421 DECLSPEC_IMPORT int WINAPI krnx_BufferRecvF( int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout );
422 DECLSPEC_IMPORT int WINAPI krnx_BufferPeekF( int cont_no, int buf_no, short *req_code, float *p, int *num, int timeout );
423 DECLSPEC_IMPORT int WINAPI krnx_BufferRecvW( int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout );
424 DECLSPEC_IMPORT int WINAPI krnx_BufferPeekW( int cont_no, int buf_no, short *req_code, short *p, int *num, int timeout );
425 DECLSPEC_IMPORT int WINAPI krnx_BufferRecvB( int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout );
426 DECLSPEC_IMPORT int WINAPI krnx_BufferPeekB( int cont_no, int buf_no, short *req_code, char *p, int *num, int timeout );
427 
428 DECLSPEC_IMPORT int WINAPI krnx_GetLimitM( int cont_no, int robot_no, float *ll );
429 DECLSPEC_IMPORT int WINAPI krnx_GetLimitP( int cont_no, int robot_no, float *ul );
430 
431 DECLSPEC_IMPORT int WINAPI krnx_GetErrorInfo( int cont_no, int robot_no, int *error_code );
432 DECLSPEC_IMPORT int WINAPI krnx_IoSetDI( int cont_no, const char *in, const char *mask, size_t size );
433 DECLSPEC_IMPORT int WINAPI krnx_IoSetDO( int cont_no, const char *out, const char *mask, size_t size );
434 
435 /**************************
436  * 順逆変換API *
437  **************************
438  */
439 
440 DECLSPEC_IMPORT int WINAPI krnx_JointToXyzoat( int cont_no, int robot_no, const float *joint, float *xyzoat );
441 DECLSPEC_IMPORT int WINAPI krnx_JointToMatrix( int cont_no, int robot_no, const float *joint, float *matrix );
442 DECLSPEC_IMPORT int WINAPI krnx_XyzoatToJoint( int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint );
443 DECLSPEC_IMPORT int WINAPI krnx_MatrixToJoint( int cont_no, int robot_no, const float *matrix, float *joint, const float *old_joint );
444 DECLSPEC_IMPORT int WINAPI krnx_MultiplyXyzoat( const float *xyzoat_a, const float *xyzoat_b, float *xyzoat_c );
445 DECLSPEC_IMPORT int WINAPI krnx_MultiplyMatrix( const float *matrix_a, const float *matrix_b, float *matrix_c );
446 DECLSPEC_IMPORT int WINAPI krnx_InverseXyzoat( const float *xyzoat_a, float *xyzoat_b );
447 DECLSPEC_IMPORT int WINAPI krnx_InverseMatrix( const float *matrix_a, float *matrix_b );
448 DECLSPEC_IMPORT int WINAPI krnx_MatrixToXyzoat( const float *matrix , float *xyzoat );
449 DECLSPEC_IMPORT int WINAPI krnx_XyzoatToMatrix( const float *xyzoat , float *matrix );
450 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 );
451 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 );
452 DECLSPEC_IMPORT int WINAPI krnx_JacobiMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *jacobi66 , float *matrix );
453 DECLSPEC_IMPORT int WINAPI krnx_JacobiXyzoat( int cont_no, int robot_no, const float *joint, const float *tool_xyzoat , float *jacobi66 , float *xyzoat );
454 DECLSPEC_IMPORT int WINAPI krnx_JaInvMatrix( int cont_no, int robot_no, const float *joint, const float *tool_matrix , float *ja_inv66 , float *matrix );
455 DECLSPEC_IMPORT int WINAPI krnx_JaInvXyzoat( int cont_no, int robot_no, const float *joint, const float *tool_xyzoat , float *ja_inv66 , float *xyzoat );
456 
457 DECLSPEC_IMPORT int WINAPI krnx_XyzoatToJoint2( int cont_no, int robot_no, const float *xyzoat, float *joint, const float *old_joint, int conf );
458 DECLSPEC_IMPORT int WINAPI krnx_GetConfig( int cont_no, int robot_no, float *joint, int *conf );
459 
460 DECLSPEC_IMPORT int WINAPI krnx_GetASCycle( int robot_no, int *cycle_time );
461 
462 DECLSPEC_IMPORT int WINAPI krnx_SetJT1Mode( int mode );
463 
464 /**************************
465  * RT-API *
466  **************************
467  */
468 typedef struct
469 {
470  float ang[KRNX_MAXAXES];
471  float ang_ref[KRNX_MAXAXES];
472  float cur[KRNX_MAXAXES];
473  long enc[KRNX_MAXAXES];
475 
476 DECLSPEC_IMPORT int WINAPI krnx_GetCurMotionData( int cont_no, int robot_no, TKrnxCurMotionData *md );
477 DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorLamp( int cont_no, int robot_no, int *error_lamp ); /* EX3390 a */
478 DECLSPEC_IMPORT int WINAPI krnx_GetCurErrorInfo( int cont_no, int robot_no, int *error_code ); /* EX3390 a */
479 
480 /* RTC */
481 DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompData( int cont_no, int robot_no, const float *comp, int *status, unsigned short seq_no );
482 DECLSPEC_IMPORT int WINAPI krnx_PrimeRtcCompData( int cont_no, int robot_no, const float *comp, int *status ); /* EX3391 a */
483 DECLSPEC_IMPORT int WINAPI krnx_SendRtcCompData( int cont_no, unsigned short seq_no ); /* EX3391 a */
484 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 );
485 DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompData( int cont_no, int robot_no, float *comp );
486 DECLSPEC_IMPORT int WINAPI krnx_GetRtcCompLimit( int cont_no, int robot_no, float *comp_limit );
487 DECLSPEC_IMPORT int WINAPI krnx_SetRtcErrorFlag( int cont_no, int robot_no, int error_flag, unsigned short seq_no );
488 DECLSPEC_IMPORT int WINAPI krnx_GetRtcErrorFlag( int cont_no, int robot_no, int *error_flag );
489 DECLSPEC_IMPORT int WINAPI krnx_GetRtcSwitch( int cont_no, int robot_no, int *rtc_sw );
490 DECLSPEC_IMPORT int WINAPI krnx_SetRtcCompMask( int cont_no, int robot_no, int mask );
491 DECLSPEC_IMPORT int WINAPI krnx_OldCompClear( int cont_no, int robot_no );
492 DECLSPEC_IMPORT int WINAPI krnx_GetRtcBufferLength( int cont_no, int robot_no ); /* EX3390 a */
494 
495 DECLSPEC_IMPORT int WINAPI krnx_RtcInit( int cont_no );
496 
497 DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed( int cont_no, int robot_no, float spd, float *prev );
498 DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPos( int cont_no, int robot_no, int wk_no, float pos, float *prev );
499 DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeedEx( int cont_no, int robot_no, int axis_no, float spd, float *prev );
500 DECLSPEC_IMPORT int WINAPI krnx_SetConveyorPosEx( int cont_no, int robot_no, int axis_no, int wk_no, float pos, float *prev );
501 
502 /*******************************
503  * KRNX内部API
504  *******************************
505  */
506 DECLSPEC_IMPORT int WINAPI krnx_GetKrnxVersion( char *ver_text, int ver_len ); /* FX00919 a */
507 
508 /**************************
509  * ARC-API *
510  **************************
511  */
512 #ifdef KRNX_ARC
513 DECLSPEC_IMPORT int WINAPI krnx_ArcCmdWrite( int cont_no, int robot_no, int cmd, int i_cmd, int v_cmd );
514 DECLSPEC_IMPORT int WINAPI krnx_ArcCmdRead( int cont_no, int robot_no, 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 );
517 DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeOk( int cont_no, int robot_no );
518 DECLSPEC_IMPORT int WINAPI krnx_ArcWeldChangeMode( int cont_no, int robot_no, int on_off );
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 );
520 DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeOk( int cont_no, int robot_no );
521 DECLSPEC_IMPORT int WINAPI krnx_ArcXyzChangeMode( int cont_no, int robot_no, int on_off );
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 );
526 /* SRV_TORCH ++ */
527 DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtMotorLoad( int cont_no, int robot_no, float *mload );
528 DECLSPEC_IMPORT int WINAPI krnx_ArcGetSrvtRotation( int cont_no, int robot_no, float *delta_ang );
529 DECLSPEC_IMPORT int WINAPI krnx_ArcGetCurSrvtRotation( int cont_no, int robot_no, float *ang );
530 /* SRV_TORCH -- */
531 #endif /* KRNX_ARC */
532 
533 /* ETHER */
534 DECLSPEC_IMPORT int WINAPI krnx_GetCycleCount( int cont_no, int robot_no, int counter_no );
535 DECLSPEC_IMPORT int WINAPI krnx_eth_init( char *hostname );
536 DECLSPEC_IMPORT int WINAPI krnx_eth_open( int cont_no );
537 DECLSPEC_IMPORT int WINAPI krnx_eth_close( int cont_no );
539 
540 /*******************************
541  * 旧PCコンとの互換性のため ******************************* */ DECLSPEC_IMPORT int WINAPI krnx_NotSupport( void ); DECLSPEC_IMPORT int WINAPI krnx_PanelHw( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_PanelToPC( int, int, char *); DECLSPEC_IMPORT int WINAPI krnx_GetArmMode( int, int ); typedef struct { short no, num; // 信号番号 1〜1001〜、ビット数 char str[80]; // }TKrnxDDSig; DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig( int cont_no, char *dd_di, char *dd_do ); DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo( int cont_no, int io_no, const TKrnxDDSig** ); DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync( int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num ); /******************************* * PcAs起動API ******************************* */ /* ++ Dcon-plus6 ++ */ #ifdef __cplusplus DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name=NULL ); #else DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name ); #endif DECLSPEC_IMPORT int WINAPI krnx_StopPcAs( void ); /* -- Dcon-plus6 -- */ DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx( int entry ); /* Dcon-plus16 a */ /* New datasync api 090210 */ DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num ); DECLSPEC_IMPORT int WINAPI krnx_SetJoint( int cont_no, int robot_no, float ang[KRNX_MAXAXES] ); #ifdef __cplusplus } #endif #endif /* KRNX_H__ */
542  *******************************
543  */
545 DECLSPEC_IMPORT int WINAPI krnx_PanelHw( int, int, char *);
546 DECLSPEC_IMPORT int WINAPI krnx_PanelToPC( int, int, char *);
547 DECLSPEC_IMPORT int WINAPI krnx_GetArmMode( int, int );
548 
549 typedef struct
550 {
551  short no, num; // 信号番号 1〜1001〜、ビット数
552  char str[80]; //
553 }TKrnxDDSig;
554 
555 DECLSPEC_IMPORT int WINAPI krnx_IoGetDDSig( int cont_no, char *dd_di, char *dd_do );
556 DECLSPEC_IMPORT int WINAPI krnx_DDSigInfo( int cont_no, int io_no, const TKrnxDDSig** );
557 DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfoSync( int cont_no, int robot_no, TKrnxMotionInfo *md, int data_num );
558 
559 /*******************************
560  * PcAs起動API
561  *******************************
562  */
563 
564 /* ++ Dcon-plus6 ++ */
565 #ifdef __cplusplus
566 DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name=NULL );
567 #else
568 DECLSPEC_IMPORT int WINAPI krnx_RunPcAs( char *ini_file_name );
569 #endif
571 /* -- Dcon-plus6 -- */
572 DECLSPEC_IMPORT int WINAPI krnx_StopPcAsEx( int entry ); /* Dcon-plus16 a */
573 
574 /* New datasync api 090210 */
575 DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfoSync( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num );
576 
577 DECLSPEC_IMPORT int WINAPI krnx_GetDebugInfo( int cont_no, int robot_no, TKrnxDebugInfoEnt *md, int data_num );
578 
579 DECLSPEC_IMPORT int WINAPI krnx_SetJoint( int cont_no, int robot_no, float ang[KRNX_MAXAXES] );
580 
581 #ifdef __cplusplus
582 }
583 #endif
584 
585 #endif /* KRNX_H__ */
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)
msg
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]
Definition: krnx.h:232
DECLSPEC_IMPORT int WINAPI krnx_eth_open(int cont_no)
short priority
Definition: krnx.h:193
DECLSPEC_IMPORT int WINAPI krnx_eth_init(char *hostname)
bool param(const std::string &param_name, T &param_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 DI_MAX_SIGNAL
Definition: krnx.h:90
#define INTERNAL_MAX_SIGNAL
Definition: krnx.h:92
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)
TDebugTrajInfo trj
Definition: krnx.h:293
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
#define INT_CBUF_SIZ
Definition: krnx.h:71
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)
short cyc
Definition: krnx.h:238
DECLSPEC_IMPORT int WINAPI krnx_SetConveyorSpeed(int cont_no, int robot_no, float spd, float *prev)
short robot_status
Definition: krnx.h:182
#define KRNX_MAXSIGNAL
Definition: krnx.h:68
short emergency
Definition: krnx.h:164
DECLSPEC_IMPORT int WINAPI krnx_PcContinue(int cont_no, int pcprogram_no, int next, int *as_err_code)
short motor_lamp
Definition: krnx.h:158
DECLSPEC_IMPORT int WINAPI krnx_eth_close(int cont_no)
#define WINAPI
Definition: krnx.h:14
DECLSPEC_IMPORT int WINAPI krnx_PcEnd(int cont_no, int pcprogram_no, int *as_err_code)
unsigned int UINT
Definition: krnx.h:13
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]
Definition: krnx.h:231
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)
int ctl_axis
Definition: krnx.h:269
DECLSPEC_IMPORT int WINAPI krnx_GetASCycle(int robot_no, int *cycle_time)
#define DO_MAX_SIGNAL
Definition: krnx.h:91
short teach_lock_lamp
Definition: krnx.h:163
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)
short trigger_lamp
Definition: krnx.h:162
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)
#define DECLSPEC_IMPORT
Definition: krnx.h:21
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)
short run_lamp
Definition: krnx.h:161
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)
TDebugSystemInfo sys
Definition: krnx.h:291
struct TDebugSystemInfo TDebugSystemInfo
DECLSPEC_IMPORT int WINAPI krnx_GetMotionInfo(int cont_no, int robot_no, TKrnxMotionInfo *mtninfo)
#define KRNX_MAX_PCPROG
Definition: krnx.h:62
int flg_stepup
Definition: krnx.h:283
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)
long remain_count
Definition: krnx.h:191
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)
short cycle_lamp
Definition: krnx.h:159
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)
unsigned long DWORD
Definition: krnx.h:12
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)
TDebugMotionInfo mtn
Definition: krnx.h:292
BOOL(* FLoadCallBack)(void *param, long byte, const char *msg)
Definition: krnx.h:387
struct TKrnxDebugInfoEnt TKrnxDebugInfoEnt
DECLSPEC_IMPORT int WINAPI krnx_IoSetDO(int cont_no, const char *out, const char *mask, size_t size)
float sp
Definition: krnx.h:267
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)
float monitor_speed
Definition: krnx.h:183
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)
short error_lamp
Definition: krnx.h:157
DECLSPEC_IMPORT int WINAPI krnx_Ereset(int cont_no, int robot_no, int *as_err_code)
#define DBG_FVAL_NUM
Definition: krnx.h:94
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)
float accuracy
Definition: krnx.h:185
TDebugSignalInfo io
Definition: krnx.h:295
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)
char BOOLEAN
Definition: krnx.h:11
void * HANDLE
Definition: krnx.h:9
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)
float accu
Definition: krnx.h:268
DECLSPEC_IMPORT int WINAPI krnx_BufferSendW(int cont_no, int buf_no, short req_code, const short *p, int num, int timeout)
short interpolation
Definition: krnx.h:240
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)
short status
Definition: krnx.h:190
DECLSPEC_IMPORT void WINAPI krnx_timer_callback(void)
unsigned short clamp_spot_flg
Definition: krnx.h:286
DECLSPEC_IMPORT int WINAPI krnx_PcAbort(int cont_no, int pcprogram_no, int *as_err_code)
short num
Definition: krnx.h:551
TSignalEx sig
Definition: krnx.h:252
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)
short repeat_lamp
Definition: krnx.h:160
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]
Definition: krnx.h:230
float always_speed
Definition: krnx.h:184
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)
short buf
Definition: krnx.h:239
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)
short step_number
Definition: krnx.h:194
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)
#define KRNX_MAXAXES
Definition: krnx.h:66
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)
#define KRNX_MAX_ROBOT
Definition: krnx.h:61
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)
TDebugVariableInfo val
Definition: krnx.h:294
DECLSPEC_IMPORT int WINAPI krnx_PrimeRtcCompData(int cont_no, int robot_no, const float *comp, int *status)
char BOOL
Definition: krnx.h:10
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)


khi_robot_control
Author(s): nakamichi_d
autogenerated on Fri Mar 26 2021 02:34:21