VECTOR (178)


VECTOR (178)

ID                          178

 

 

Application:

PLC

 

Group: MOTION

 

Short description:

Function that performs a motion with linear interpolation between 2 or 3 axes.

 

Inputs (12):

no.

type

impulse

mark

notes

1

B

yes ( 0->1 )

start

Start the positioning

2

B

yes ( 0->1 )

stop

Stop the motion

3

R

-

x

Target position X

4

R

-

y

Target position Y

5

R

-

z

Target position Z

6

R

-

vel

Resultant movement speed

7

R

-

vel_begin

Initial movement speed

8

R

-

vel_end

End movement speed

9

R

-

acc

Acceleration

10

R

-

dec

Braking

11

R

-

acc_jerk

Acceleration jerk

12

R

-

dec_jerk

Braking jerk

 

Notes: input parameters: vel, acc, dec, acc_jerk, dec_jerk must be non-zero otherwise the block will not move. 

Values

Outputs (3):

no.

type

impulse

mark

notes

1

B

no

In_motion

=1 when motion is in progress

2 B no error =0 when there is no errors
3 B nit err_id error IS = 0 when the error does not occur

 

Settings:

no.

type

mark

notes

1

I

X_axis

Number of the axis assigned to axis X

2

I

Y_axis

Number of the axis assigned to axis Y

3

I

Z_axis

Number of the axis assigned to axis Z

4 I Iter The accuracy of the block calculation. Allowed values 1-50

 

Description:

After receiving the signal at the 'start' input, the block generates the trajectory of movement in each subsequent cycle. The speed, position and acceleration of each axis are transferred to the appropriate registers assigned to the virtual axis data. The movement takes place in a straight line with the resultant speed set at the block input. The resultant initial speed of the movement is vel_begin, the final speed is vel_end.

A signal at the stop input causes the speed to decelerate to zero.
 

Selection of motion parameters:

Figure B.178.1 shows the movement of the X, Y, Z axes with linear interpolation in absolute coordinates from the current position P1 = (X1, Y1, Z1) to the absolute position P2 = (X2, Y2, Z2).

 

 

 

Fig. B.178.1. Illustration of the movement from point P1 to P2 of the X, Y, Z axis with linear interpolation.

Fig. B.178.2. Waveforms of speed, acceleration and jerk while moving.

 

 

In figure B.178.2. graphs of velocity, acceleration and jerks during motion are presented. The following designations have been adopted:

 

vmax – speed [uu/s]

aacc – acceleration [uu/s2]

adec – deceleration [uu/s2]

j1 – acceleration jerk [uu/s3]

j2 – deceleration jerk [uu/s3]

tacc – acceleration time [s]

tdec – deceleration time [s]

tj1 – jerk time at acceleration [s]

tj2 – jerk time at acceleration [s]

 

The relationships between the given quantities used to calculate them are given below. The resulting values are in pulses, therefore the formulas take into account the pos_scale_factor coefficient entered into the STEP_DIR function block (No. 150) in order to convert the values into engineering units marked in the formulas as [uu] (user units), (e.g. [mm], [cm], [m] etc.). The following example of calculating the values of motion parameters is given for custom units in [mm].

 

1. Calculation of the scaling factor pos_scale_factor for a given axis.

The value of the factor is entered as a parameter in the properties of the STEP_DIR block (for a description of the calculations, see the description of function block No. 150).

 

eg: pos_scale_factor = 100

 

2. Adopting the maximum speed of movement of the axis

The maximum speed of the axis usually results from the maximum speed that the motor can achieve or from the maximum speed vmax that we want the moving element to obtain.

 

vmax = _MaxSpeed_1 [pps] = vmax [mm/s] * pos_scale_factor

 

Data:

Max speed: vmax = 100 [mm/s],

 

Calculations:

vmax = 100 * 100 = 10000 [pps]

 

3. Calculation of the maximum acceleration and deceleration for an axis

 

Data:

drive torque of a rotary motor: Ms [Nm] = 0,25 [Nm]

driven mass: m [kg] = 0,1 [kg]

 

Calculations:

aacc = _MaxAcceleration_1 [pps2] = aacc [uu/s2] * pos_scale_factor  = aacc [pps2] = n * ( 103 * Ms [Nm] * pos_scale_factor [-] ) / m [kg]

adcc = _MaxDeceleration_1 [pps2] = adec [uu/s2] * pos_scale_factor  = adec [pps2] = n * ( 103 * Ms [Nm] * pos_scale_factor [-] ) / m [kg]

 

aacc = 0,5 * ( 103 * 0,25 [Nm] * 100 ) / 0,1 [kg] = 125 000 [pps2]

adcc = 125 000 [pps2]


Factor 103 results from the units adopted in the example. The formula uses the n factor and its value was assumed to be 0.5. It takes into account the moment of inertia of the motor, gears and other drive components. Their moment of inertia reduced to the moment of inertia on the motor can be calculated using the appropriate formulas. In addition, the motor should be selected with a torque reserve of at least 30%.

 

4. The value of jerks when accelerating j1 and when braking j2.

 

Data:

j1 = j2 = 20 000 [mm/s3]

 

Calculations:

j1 = _AccelJERK_1 [pps3] = j1 [uu/s3] * pos_scale_factor = 20 000 [mm/s3] * 100 = 2 000 000 [pps3]

j2 = _DecelJERK_1 [pps3] = j2 [uu/s3] * pos_scale_factor = 20 000 [mm/s3] * 100 = 2 000 000 [pps3]

 

The jerk value is taken experimentally. The jerk is the rate at which acceleration builds up to its maximum speed. A jerk of 1 [mm / s3] means that the acceleration will increase by 1 [mm / s2] within one second. The greater the stiffness of the machine, the greater the jerk can be. The greater the jerk, the greater the vibration caused by the jerk of the driveline during acceleration and braking. The jerk affects the acceleration and deceleration time. These times can be calculated using the formulas below.

 

tj1 [s] = _MaxAcceleration_1 [pps2] / j1 [pps3] = R3107 / R3109 = 125 000 / 2 000 000 = 62,5 [ms]

tj2 [s] = _MaxDeceleration_1 [pps2] / j2 [pps3] = R3108 / R3110 = 125 000 / 2 000 000 = 62,5 [ms]

tacc [s] =  ( _MaxSpeed_1 [pps] – ( _MaxAcceleration_1 [pps2] / j1 [pps3]) ) / _MaxAcceleration_1 [pps2] = ( R3106 – ( R3107 / R3109 ) ) / R3107 = (10 000 – ( 125 000 / 2 000 000 ) ) / 125 000 = 80 [ms]

tdec [s] =  ( _MaxSpeed_1 [pps] – ( _MaxDeceleration_1 [pps2] / j1 [pps3]) ) / _MaxDeceleration_1 [pps2] = ( R3108 – ( R3108 / R3110 ) ) / R3108 = (10 000 – ( 125 000 / 2 000 000 ) ) / 125 000 = 80 [ms]