User guide
56
VTB USER GUIDE
‘ *********************************************************
‘ Movement function waiting if the buffer is full
‘ *********************************************************
Function muovi() as Void
Dim test as Char
Label Move
test=Obj.lineto(vel,VectAssi())
if test=0
goto Move
endif
EndFunction
ARCTO
Movement with CIRCULAR interpolation on the axes of the current WORKING PLANE. Two axes execute a CIRCULAR
interpolation while the others are interpolated in LINEAR mode. As function LINETO, the property sglp defines the edge
threshold for axis stopping. The direction of rotation is determined by the parameter mode.
Hardware All
Syntax
.ARCTO(Long Vel, Char mode, Long *PntAx, Long CX, Long CY) as char
Parameters
Vel Velocity of interpolation as unit/sample
mode Direction of rotation
mode=2 CW interpolation
mode=3 CCW interpolation
PntAx Pointer to the array of the axis position as unit
Cx,CY Coordinate X,Y (axis of the working plane) of the CENTER
Return value
Char 0 Command not written in the buffer (buffer full)
1 Command written in the buffer
-1 Radius error (dipends by sglr)
Note
Arcto executes a CIRCULAR interpolation ON WORKING PLANE while the other axis are interpolated in LINEAR MODE.
Example (object name = OBJ)
Used variables:
VectAssi(4) long
Cx long
Cy long
Vel long
'**********************************************************
'Circular interpolation CW on X,Y Z and A
'to realize the programmed arc the axis X and Y must be in precise positions, for Example at 0,2000
‘**********************************************************
vel=1000
VectAssi(4) long
VectAssi(0)=1000 ‘ final position X
VectAssi(1)=2000 ‘ final position Y
VectAssi(2)=5000 ‘ final position Z
VectAssi(3)=1000 ‘ final position A
Cx=500 ‘center X
Cy=500 ‘center Y
muovi()