User guide

94
VTB USER GUIDE
7) Write in TASK PLC the following CODE:
pp_step(0, PosAxis * RappX)
8) Write in MAIN TASK the test code to execute a movement (example):
if START_CONDITION
AxisX.Vel=1000
AxisX.quota=100000
AxisX.start=true
START_CONDITION=false ' To avoid recursive starts
endif
With this example the variable pos_asse will reach the value 100000 following the programmed RAMP in the object. In
TASK PLC the value is sent by the function PP_STEP to the STEP/DIR channal 0 obtaining a movement of the axis controlled
in position and velocity. The function pp_step generate the STEPS by the value difference of the position variable between
two sample. Then, according to the sampling time of TASK PLC, we have different speed. A typical sampling time for the
STEP/DIR axis can be from 2 milliseconds to 5 milliseconds.
EXAMPLE OF USING WITH THE OBJECT INTERPOLATOR
The object INTERPOLATOR generates trajectories on more AXIS at the same time according to the type of interpolation
executed. Similarly to the object MONAX, it works with a support variable which, opportunely sent to function pp_step,
will be able to execute interpolation on STEP/DIR axis.
Step to execute:
1) In the object NGM13_INIT enable the interpolation mode on the step/dir channel used
2) Load an object INTERPOLATORE from MOTORCONTROL--> COBJINTERPOLA in the MAIN
3) Name it for example INTERPOLA1