CDRFLEx.move_periodic
Features
This command performs a cyclic motion based on the sine function of each axis (parallel and rotation) of the reference coordinate (eMoveReference) input as a relative motion that begins at the current position. The attributes of the motion on each axis are determined by fAmplitude and fPeriodic, and the acceleration/deceleration time and the total motion time are set by the interval and repetition count.
Parameter
Parameter Name | Data Type | Default Value | Range | Description |
fAmplitude | float[6] | - | >=0 | Amplitude (motion between -amp and +amp) [mm] or [deg] |
fPeriodic | float[6] | - | >=0 | period(time for one cycle)[sec] |
fAccelTime | float | - | >=0 | Acc-, dec- time [sec] |
nRepeat | unsigned char | - | > 0 | Repetition count |
eMoveReference | enum | MOVE_REFERENCE_TOOL | Refer to the Definition of Constant and Enumeration Type |
Note
- fAmplitude refers to the amplitude. The input is a list of six elements that are the amp values for the axes (x, y, z, rx, ry, and rz). The amp input on the axis that does not have a motion must be 0.
- fPeriodic refers to the time needed to complete a motion in the direction, the amplitude. The input is a list of six elements that are the periods for the axes (x, y, z, rx, ry, and rz) or representative value.
- fAccelTime Atime refers to the acceleration and deceleration time at the beginning and end of the periodic motion. The largest of the inputted acceleration/deceleration times and maximum period*1/4 is applied. An error is generated when the inputted acceleration/deceleration time exceeds 1/2 of the total motion time.
- nRepeat refers to the number of repetitions of the axis (reference axis) that has the largest period value and determines the total motion time. The number of repetitions for each of the remaining axes is determined automatically according to the motion time. If the motion terminates normally, the motions for the remaining axes can be terminated before the reference axis's motion terminates so that the end position matches the starting position. If the motions of all axes are not terminated at the same time, the deceleration section will deviate from the previous path. Refer to the following image for more information.


- eMoveReference refers to the reference coordinate system of the repeated motion.
- If a maximum velocity error is generated during a motion, adjust the amplification and period using the following formula.
velocity=Amplification (amp)*2*pi(3.14)/Period(period)
(i.e., Max. velocity=62.83 mm/sec if amp=10 mm and Period=1 sec) - This function does not support online blending of previous and subsequent motions.
Return
Value | Description |
0 | Error |
1 | Success |
Example
<#1>
float fAmplitude[NUM_TASK] = {10,0,0,0,30,0};
float fPeriod[NUM_TASK] = { 1, 1, 1, 1, 1, 1};
drfl.amove_periodic(fAmplitude, fPeriod, 0.2, 5, MOVE_REFERENCE_TOOL);
# Repeats the x-axis (10 mm amp and 1 sec. period) motion and y rotating axis (30 deg amp and 1 sec. period) motion in the tool coordinate system
# five times.
<#2>
float fAmplitude[NUM_TASK] = {10,0,20,0,0.5,0};
float fPeriod[NUM_TASK] = { 1,0,1.5,0,0,0};
drfl.amove_periodic(fAmplitude, fPeriod, 0.5, 3, MOVE_REFERENCE_BASE);
# Repeats the x-axis (10 mm amp and 1 sec. period) motion and z axis (20 mm amp and 1.5 sec. period) motion in the base coordinate system
# three times. The y rotating motion is not executed, as the period is “zero(0).”
# As the z-axis period is large, the total motion time is about 5.5 sec. (1.5 sec.*3 times + acceleration/deceleration 1 sec.)
#, x-axis motion repeats 4.5 times