User guide
57
VTB USER GUIDE
Function muovi() as Void
Dim test as Char
Label Move
test=px_arcto(vel,2,VectAssi(), Cx, Cy)
if test = 0
goto Move
endif
EndFunction
SETCMD
This function allows the synchronization of commands with the axis movement. In fact because of BUFFER OF AXIS
MOVEMENT the interpolation functions don't wait the execution of the command but write it in the buffer. This implies
the impossibility to command, for example, the digital output in a precise point of the path if axis don't stop in each
position. This function enables the writing of a command value in the buffer when a interpolation function is called
(moveto, lineto, arcto), it will be written in cmd at the instant the movement starts.
Hardware All
Syntax
.SETCMD(Long CMD)
Parameters
CMD Value of the command
Example
muovi()
OBJ.setcmd(10)
muovi()
OBJ.setcmd (20)
‘Insert the following code in the TASK PLC
if OBJ.CMD=10
…
endif
if OBJ.CMD=20
…
endif
SETPIANO
Selects the current working plane on desired axis. By default the plane is set on the first two axis X, Y (ax1=0, ax2=1).
Ax1 can not be equal to ax2.
Hardware All
Syntax
.SETPIANO(Char Ax1, Char Ax2)
Parameters
Ax1 Index of the first axis of the plane
Ax2 Index of the second axis of the plane
Note
The WORKING PLANE selects the axis for the CIRCULAR interpolation, for calculation of the edge 2D (sglp) and for
calculation of the SPEED VECTOR in the function LINETO.
Example
Obj.setpiano(0,1) 'select the plane on axis X and Y
Obj.setpiano(1,2) 'select the plane on axis Y and Z