unit GTFunc;

interface

const  GTDll = 'GTdll.dll';

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

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_CaptIndex(axis:Word):SmallInt;stdcall;
function 	GT_Close():SmallInt;stdcall;
function 	GT_ClrSts(axis:Word):SmallInt;stdcall;
function 	GT_EndList():SmallInt;stdcall;
function 	GT_EStpMtn():SmallInt;stdcall;
function 	GT_DrvRst(axis:Word):SmallInt;stdcall;
function 	GT_ExInpt(value:PWord):SmallInt;stdcall;
function 	GT_ExOpt(value:Word):SmallInt;stdcall;
function 	GT_GetBrkPnt(pnt:PLongInt):SmallInt;stdcall;
function 	GT_GetCapt(axis:Word;value:PLongInt):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_GetPrfVel(vel:PDouble):SmallInt;stdcall;
function 	GT_GetPrfPnt(pnt:PLongInt):SmallInt;stdcall;
function        GT_GetSegPnt(pnt:PLongInt):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:Word):SmallInt;stdcall;
function 	GT_LmtsOn(axis:Word):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_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_RestoreMtn():SmallInt;stdcall;
function 	GT_Reset():SmallInt;stdcall;
function 	GT_RstSts(Axis,value:Word):SmallInt;stdcall;
function 	GT_SetAtlPos(AxisNum:Word ; pos:LongInt):SmallInt;stdcall;
function 	GT_SetDccFlag():SmallInt;stdcall;
function 	GT_SetMaxVel(value:Double):SmallInt;stdcall;
function 	GT_SetSynAcc(accel:Double):SmallInt;stdcall;
function 	GT_SetStrtVel(value:Double):SmallInt;stdcall;
function 	GT_SetSynVel(vel:Double):SmallInt;stdcall;
function 	GT_SetStpAcc(value:Double):SmallInt;stdcall;
function 	GT_StpMtn():SmallInt;stdcall;
function 	GT_StepDir(axis:Word):SmallInt;stdcall;
function 	GT_StepPulse(axis:Word):SmallInt;stdcall;
function 	GT_StrtList():SmallInt;stdcall;
function 	GT_StrtMtn():SmallInt;stdcall;
function 	GT_ZeroPos(AxisNum:Word):SmallInt;stdcall;

implementation

function 	GT_Open(PortBase:LongWord; irq:LongWord):SmallInt; External GTDLL;
function 	GT_Close():SmallInt;External GTDLL;
function 	GT_SetAtlPos(AxisNum:Word ; pos:LongInt):SmallInt;External GTDLL;
function 	GT_ZeroPos(AxisNum:Word):SmallInt;External GTDLL;
function 	GT_StrtMtn():SmallInt;External GTDLL;
function 	GT_LnXY(x,y:Double):SmallInt;External GTDLL;
function 	GT_LnXYZ(x,y,z:Double):SmallInt;External GTDLL;
function 	GT_ArcXY(x_center,y_center,angle:Double):SmallInt;External GTDLL;
function 	GT_ArcYZ(y_center,z_center,angle:Double):SmallInt;External GTDLL;
function 	GT_ArcZX(z_center,x_center,angle:Double):SmallInt;External GTDLL;
function 	GT_ArcXYP(x_end,y_end,r:Double;dir:SmallInt):SmallInt;External GTDLL;
function 	GT_ArcYZP(y_end,z_end,r:Double;dir:SmallInt):SmallInt;External GTDLL;
function 	GT_ArcZXP(z_end,x_end,r:Double;dir:SmallInt):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_Override(value:Double):SmallInt;External GTDLL;
function 	GT_SetStrtVel(value:Double):SmallInt;External GTDLL;
function 	GT_SetMaxVel(value:Double):SmallInt;External GTDLL;
function 	GT_SetStpAcc(value:Double):SmallInt;External GTDLL;
function 	GT_ClrSts(axis:Word):SmallInt;External GTDLL;
function 	GT_CaptHome(axis:Word):SmallInt;External GTDLL;
function 	GT_GetCapt(axis:Word;value:PLongInt):SmallInt;External GTDLL;
function 	GT_CaptIndex(axis:Word):SmallInt;External GTDLL;
function 	GT_AxisOn(axis:Word):SmallInt;External GTDLL;
function 	GT_AxisOff(axis:Word):SmallInt;External GTDLL;
function 	GT_LmtSns(value:Word):SmallInt;External GTDLL;
function 	GT_ExInpt(value:PWord):SmallInt;External GTDLL;
function 	GT_ExOpt(value:Word):SmallInt;External GTDLL;
function 	GT_Reset():SmallInt;External GTDLL;
function 	GT_HardRst():SmallInt;External GTDLL;
function 	GT_StrtList():SmallInt;External GTDLL;
function 	GT_AddList():SmallInt;External GTDLL;
function 	GT_EndList():SmallInt;External GTDLL;
function 	GT_GetCrdSts(coord_status:PWord):SmallInt;External GTDLL;
function 	GT_SetSynVel(vel:Double):SmallInt;External GTDLL;
function 	GT_SetSynAcc(accel:Double):SmallInt;External GTDLL;
function 	GT_StpMtn():SmallInt;External GTDLL;
function 	GT_EStpMtn():SmallInt;External GTDLL;
function 	GT_GetMtnNm(motion_linenum:PWord):SmallInt;External GTDLL;
function 	GT_GetSts(axis:Word;value:PWord):SmallInt;External GTDLL ;
function 	GT_GetPrfPnt(pnt:PLongInt):SmallInt;External GTDLL;
function 	GT_GetBrkPnt(pnt:PLongInt):SmallInt;External GTDLL;
function 	GT_RestoreMtn():SmallInt;External GTDLL;
function 	GT_LmtsOn(axis:Word):SmallInt;External GTDLL;
function 	GT_LmtsOff(axis:Word):SmallInt;External GTDLL;
function 	GT_GetLmtSwt(value:PWord):SmallInt;External GTDLL;
function 	GT_RstSts(Axis,value:Word):SmallInt;External GTDLL;
function 	GT_GetCmdSts(value:PWord):SmallInt;External GTDLL;
function 	GT_DrvRst(Axis:Word):SmallInt;External GTDLL;
function 	GT_SetDccFlag():SmallInt;External GTDLL;
function        GT_AlarmOn(axis:Word):SmallInt;External GTDLL;
function        GT_AlarmOff(axis:Word):SmallInt;External GTDLL;
function 	GT_LnXYG0(x,y:Double):SmallInt;External GTDLL;
function 	GT_LnXYZG0(x,y,z:Double):SmallInt;External GTDLL;
function        GT_GetPrfVel(vel:PDouble):SmallInt;External GTDLL;
function 	GT_OverrideG0(value:Double):SmallInt;External GTDLL;
function 	GT_StepDir(axis:Word):SmallInt;External GTDLL;
function 	GT_StepPulse(axis:Word):SmallInt;External GTDLL;
function        GT_GetSegPnt(pnt:PLongInt):SmallInt;External GTDLL;
function 	GT_LnXYZAG0(x,y,z,a:Double):SmallInt;External GTDLL;
function 	GT_LnXYZA(x,y,z,a:Double):SmallInt;External GTDLL;
end.
