User guide
53
VTB USER GUIDE
Avalaible formats
###### Print a fixed number of characters 23456
###.### Force the print of decimal point 123.456
+#### Force the print of the sign +1234
#0.## Force the print of a ZERO 0.12
X#### Print in HEXADECIMAL format F1A3
B#### Print in BINARY format 1011
11.4 FUNCTIONS FOR AXES INTERPOLATION
The axis interpolation functions are contained in an OBJECT in the CLASS COBJINTERPOLA. In this chapter are descriped
this function with the primitive name. Remember to put the prefix of the OBJECT NAME. If, for example the object is
named obj the function moveto will must be called as obj.moveto.
PROPERTY
This is the list of the common properties of the OBJECT COBJINTERPOLA.
N.assi Number of axis to be interpolate. It can be changed only at VTB environment.
A DEFINE named Objname.Nassi is automatically generated with this value.
N.tratti Number of elements in the movement buffer. It can be changed only at VTB environment
and must have a value as power of 2 (4, 8, 16, etc.). A DEFINE named Objname.Ntratti is
automatically generated with this value.
.vper Value for the changing of the speed “on-fly”. Together Div.vper form a ratio: when it is 1 the
speed corresponds to the set one.
Div.vper Divisor of vper. It can be changed only at VTB environment.
Abilita arcto Usually it is set to 1, if 0 the circular interpolation functions will be not avalaible. It is used to
short the code size. It can be changed only at VTB environment.
.acc Acceleration and deceleration. During the execution of ramps, at each sample (TASK PLC) the speed,
as unit/sample is incremented (o decremented) of this value. Default value 10.
.sglr Threshold of the radius error. Default value 10.
.sglp Threshold edge 2D as tenth of degree. It is used by moveto and lineto to calculate the
presence of an edge on the working plane. Default value 10.(20 degrees).
.sgl3d(NASSI) Threshold edge 3D. Default value 0.2 (for all axis).
.pc(NASSI) Actual calculated value of the axis position.
.cmd Output of virtual axis managed by setcmd.
MOVETO
Movement with linear interpolation. The interpolation is executed at speed vel. The parameter mode defines if the
axis have to stop in the position or continue with the next movement. To do that there is a apposite BUFFER where
movement are latched.
Hardware All
Syntax
.MOVETO(Long Vel, Char mode, Long *PntAx) as char
Parameters
Vel Velocity of interpolation as unit/sample
mode Flag to control the stop before the next movement
mode=0 never stop
mode=1 always stop at the end of movement
mode=2 stop only on edge 3D (sgl3d)
mode=3 stop only on edge 3D (sglp)
PntAx Pointer to the array of the axis position as unit
Return value