unit GTFunc;

interface

const GTDLL = 'GTdll.dll';

type 	PLongWord=^LongWord;
type 	PLongInt=^LongInt;
type 	PWord=^Word;
type 	PSmallInt=^SmallInt;

//////*************Base GE Command Start**************/
Function GT_AddList():SmallInt;stdcall;
Function GT_AlarmOff(axis:Word):SmallInt;stdcall;
Function GT_AlarmOn(axis:Word):SmallInt;stdcall;
Function GT_ArcXY(x_center,y_center,angle:Double):SmallInt;stdcall;
Function GT_ArcXYP(x_end,y_end,r:Double;dir:SmallInt):SmallInt;stdcall;
Function GT_ArcYZ(y_center,z_center,angle:Double):SmallInt;stdcall;
Function GT_ArcYZP(y_end,z_end,r:Double;dir:SmallInt):SmallInt;stdcall;
Function GT_ArcZX(z_center,x_center,angle:Double):SmallInt;stdcall;
Function GT_ArcZXP(z_end,x_end,r:Double;dir:SmallInt):SmallInt;stdcall;
Function GT_AxisOff(axis:Word):SmallInt;stdcall;
Function GT_AxisOn(axis:Word):SmallInt;stdcall;
Function GT_CaptHome(axis:Word):SmallInt;stdcall;
Function GT_Close():SmallInt;stdcall;
Function GT_ClrSts(axis:Word):SmallInt;stdcall;
Function GT_DrvRst(axis:Word):SmallInt;stdcall;
Function GT_EndList():SmallInt;stdcall;
Function GT_EStpMtn():SmallInt;stdcall;
Function GT_ExInpt(value:PWord):SmallInt;stdcall;
Function GT_ExOpt(value:Word):SmallInt;stdcall;
Function GT_GetAtlPos(axis:SmallInt;pos:PLongInt):SmallInt;stdcall;
Function GT_GetBrkPnt(pnt:PDouble):SmallInt;stdcall;
Function GT_GetCapt(axis:Word;value:PDouble):SmallInt;stdcall;
Function GT_GetCmdSts(value:PWord):SmallInt;stdcall;
Function GT_GetCrdSts(coord_status:PWord):SmallInt;stdcall;
Function GT_GetLmtSwt(value:PWord):SmallInt;stdcall;
Function GT_GetMtnNm(motion_linenum:PWord):SmallInt;stdcall;
Function GT_GetPrfPnt(pnt:PDouble):SmallInt;stdcall;
Function GT_GetPrfVel(vel:PDouble):SmallInt;stdcall;
Function GT_GetSegPnt(pnt:PDouble):SmallInt;stdcall;
Function GT_GetSts(axis:Word; value:PWord):SmallInt;stdcall;
Function GT_HardRst():SmallInt;stdcall;
Function GT_LmtSns(value:Word):SmallInt;stdcall;
Function GT_LmtsOff(axis:SmallInt):SmallInt;stdcall;
Function GT_LmtsOn(axis:SmallInt):SmallInt;stdcall;
Function GT_LnXY(x,y:Double):SmallInt;stdcall;
Function GT_LnXYZ(x,y,z:Double):SmallInt;stdcall;
Function GT_LnXYZA(x,y,z,A:Double):SmallInt;stdcall;
Function GT_LnXYG0(x,y:Double):SmallInt;stdcall;
Function GT_LnXYZG0(x,y,z:Double):SmallInt;stdcall;
Function GT_LnXYZAG0(x,y,z,A:Double):SmallInt;stdcall;
Function GT_MvXY(x,y,vel,accel:Double):SmallInt;stdcall;
Function GT_MvXYZ(x,y,z,vel,accel:Double):SmallInt;stdcall;
Function GT_MvXYZA(x,y,z,A,vel,accel:Double):SmallInt;stdcall;
Function GT_Open(PortBase:LongWord=65535;irq:LongWord=0):SmallInt;stdcall;
Function GT_Override(value:Double):SmallInt;stdcall;
Function GT_OverrideG0(value:Double):SmallInt;stdcall;
Function GT_Reset():SmallInt;stdcall;
Function GT_RestoreMtn():SmallInt;stdcall;
Function GT_RstSts(Axis:SmallInt;value:Word):SmallInt;stdcall;
Function GT_SetAtlPos(AxisNum:Word;pos:Double):SmallInt;stdcall;
Function GT_SetDccFlag():SmallInt;stdcall;
Function GT_SetDccVel(vel:Double):SmallInt;stdcall;
Function GT_SetMaxVel(value:Double):SmallInt;stdcall;
Function GT_SetStpAcc(value:Double):SmallInt;stdcall;
Function GT_SetStrtVel(value:Double):SmallInt;stdcall;
Function GT_SetSynAcc(accel:Double):SmallInt;stdcall;
Function GT_SetSynVel(vel:Double):SmallInt;stdcall;
Function GT_StepDir(axis:Word):SmallInt;stdcall;
Function GT_StepPulse(axis:Word):SmallInt;stdcall;
Function GT_StpMtn():SmallInt;stdcall;
Function GT_StrtList():SmallInt;stdcall;
Function GT_StrtMtn():SmallInt;stdcall;
Function GT_Update(axis:SmallInt):SmallInt;stdcall;
Function GT_ZeroPos(AxisNum:Word):SmallInt;stdcall;
Function GT_SwitchtoCardNo(card_no:Integer):SmallInt;stdcall;
Function GT_GetCurrentCardNo():SmallInt;stdcall;
/////*************Base GE Command End**************/

/////************* Optional GE Command Start*************/
Function GT_CaptIndex(axis:Word):SmallInt;stdcall;
Function GT_GetEncPos(axis:Word;Actl_pos:PLongInt):SmallInt;stdcall;
Function GT_MapCnt(axis:SmallInt;Count:Double):SmallInt;stdcall;
////************* Optional GE Command End**************/

implementation

Function GT_AddList():SmallInt;External GTDLL;
Function GT_AlarmOff(axis:Word):SmallInt;External GTDLL;
Function GT_AlarmOn(axis:Word):SmallInt;External GTDLL;
Function GT_ArcXY(x_center,y_center,angle:Double):SmallInt;External GTDLL;
Function GT_ArcXYP(x_end,y_end,r:Double;dir:SmallInt):SmallInt;External GTDLL;
Function GT_ArcYZ(y_center,z_center,angle:Double):SmallInt;External GTDLL;
Function GT_ArcYZP(y_end,z_end,r:Double;dir:SmallInt):SmallInt;External GTDLL;
Function GT_ArcZX(z_center,x_center,angle:Double):SmallInt;External GTDLL;
Function GT_ArcZXP(z_end,x_end,r:Double;dir:SmallInt):SmallInt;External GTDLL;
Function GT_AxisOff(axis:Word):SmallInt;External GTDLL;
Function GT_AxisOn(axis:Word):SmallInt;External GTDLL;
Function GT_CaptHome(axis:Word):SmallInt;External GTDLL;
Function GT_Close():SmallInt;External GTDLL;
Function GT_ClrSts(axis:Word):SmallInt;External GTDLL;
Function GT_DrvRst(axis:Word):SmallInt;External GTDLL;
Function GT_EndList():SmallInt;External GTDLL;
Function GT_EStpMtn():SmallInt;External GTDLL;
Function GT_ExInpt(value:PWord):SmallInt;External GTDLL;
Function GT_ExOpt(value:Word):SmallInt;External GTDLL;
Function GT_GetAtlPos(axis:SmallInt;pos:PLongInt):SmallInt;External GTDLL;
Function GT_GetBrkPnt(pnt:PDouble):SmallInt;External GTDLL;
Function GT_GetCapt(axis:Word;value:PDouble):SmallInt;External GTDLL;
Function GT_GetCmdSts(value:PWord):SmallInt;External GTDLL;
Function GT_GetCrdSts(coord_status:PWord):SmallInt;External GTDLL;
Function GT_GetLmtSwt(value:PWord):SmallInt;External GTDLL;
Function GT_GetMtnNm(motion_linenum:PWord):SmallInt;External GTDLL;
Function GT_GetPrfPnt(pnt:PDouble):SmallInt;External GTDLL;
Function GT_GetPrfVel(vel:PDouble):SmallInt;External GTDLL;
Function GT_GetSegPnt(pnt:PDouble):SmallInt;External GTDLL;
Function GT_GetSts(axis:Word; value:PWord):SmallInt;External GTDLL;
Function GT_HardRst():SmallInt;External GTDLL;
Function GT_LmtSns(value:Word):SmallInt;External GTDLL;
Function GT_LmtsOff(axis:SmallInt):SmallInt;External GTDLL;
Function GT_LmtsOn(axis:SmallInt):SmallInt;External GTDLL;
Function GT_LnXY(x,y:Double):SmallInt;External GTDLL;
Function GT_LnXYZ(x,y,z:Double):SmallInt;External GTDLL;
Function GT_LnXYZA(x,y,z,A:Double):SmallInt;External GTDLL;
Function GT_LnXYG0(x,y:Double):SmallInt;External GTDLL;
Function GT_LnXYZG0(x,y,z:Double):SmallInt;External GTDLL;
Function GT_LnXYZAG0(x,y,z,A:Double):SmallInt;External GTDLL;
Function GT_MvXY(x,y,vel,accel:Double):SmallInt;External GTDLL;
Function GT_MvXYZ(x,y,z,vel,accel:Double):SmallInt;External GTDLL;
Function GT_MvXYZA(x,y,z,A,vel,accel:Double):SmallInt;External GTDLL;
Function GT_Open(PortBase:LongWord;irq:LongWord):SmallInt;External GTDLL;
Function GT_Override(value:Double):SmallInt;External GTDLL;
Function GT_OverrideG0(value:Double):SmallInt;External GTDLL;
Function GT_Reset():SmallInt;External GTDLL;
Function GT_RestoreMtn():SmallInt;External GTDLL;
Function GT_RstSts(Axis:SmallInt;value:Word):SmallInt;External GTDLL;
Function GT_SetAtlPos(AxisNum:Word;pos:Double):SmallInt;External GTDLL;
Function GT_SetDccFlag():SmallInt;External GTDLL;
Function GT_SetDccVel(vel:Double):SmallInt;External GTDLL;
Function GT_SetMaxVel(value:Double):SmallInt;External GTDLL;
Function GT_SetStpAcc(value:Double):SmallInt;External GTDLL;
Function GT_SetStrtVel(value:Double):SmallInt;External GTDLL;
Function GT_SetSynAcc(accel:Double):SmallInt;External GTDLL;
Function GT_SetSynVel(vel:Double):SmallInt;External GTDLL;
Function GT_StepDir(axis:Word):SmallInt;External GTDLL;
Function GT_StepPulse(axis:Word):SmallInt;External GTDLL;
Function GT_StpMtn():SmallInt;External GTDLL;
Function GT_StrtList():SmallInt;External GTDLL;
Function GT_StrtMtn():SmallInt;External GTDLL;
Function GT_Update(axis:SmallInt):SmallInt;External GTDLL;
Function GT_ZeroPos(AxisNum:Word):SmallInt;External GTDLL;
Function GT_SwitchtoCardNo(card_no:Integer):SmallInt;External GTDLL;
Function GT_GetCurrentCardNo():SmallInt;External GTDLL;

Function GT_CaptIndex(axis:Word):SmallInt;External GTDLL;
Function GT_GetEncPos(axis:Word;Actl_pos:PLongInt):SmallInt;External GTDLL;
Function GT_MapCnt(axis:SmallInt;Count:Double):SmallInt;External GTDLL;

end.