MC_BR_MechPosDeviationComp

<< 点击显示目录 >>

主页  轴控开发使用手册 > ACP10/ARNC0帮助信息 > ACP10_MC运动库 > 分类的功能块 > 驱动器准备 >

MC_BR_MechPosDeviationComp

This function performs compensation for mechanically-based position deviations.

Examples of compensating for mechanically-based position deviations:

Spindle pitch error and backlash compensation

Encoder scale correction

Depending on whether the error to be compensated depends on the direction or not, one or two data sets with the measured deviations are necessary.

If a constant backlash should be compensated for, it is sufficient to specify the value of the backlash distance under "Parameters.DirectionDependent.ConstantBacklash".

Requirements for use

This function block can only be used with an axis reference for a real axis.

This function block performs extensive calculations that may cause cycle times to be exceeded in fast task classes on some target systems!

Before this function block is enabled, the axis must be referenced in the same way as with the measurements of the deviations.

It is not permitted to home the specified axis while the function block is active.

Each list passed to this function block is permitted to hold up to 1000 items.

PLCopen axis states in which the function block is permitted to be enabled

Disabled

Standstill

Function block

mc_br_mechposdeviationcomp

Parameter

I/O

Parameter

Data type

Description

IN

Axis

UDINT

Axis reference

IN

Enable

BOOL

The function block is active as long as this input is set.

IN

Parameters

MC_MPDC_PARAM_REF

Input parameters required for operation

IN

AdvancedParameters

MC_ADV_MPDC_REF

Additional input parameters for optional use with the function block.

OUT

Active

BOOL

Function block enabled, performing spindle pitch and backlash compensation

OUT

Busy

BOOL

The function block is active and must continue to be called.

OUT

Error

BOOL

Error during execution

OUT

ErrorID

UINT

Error numbers

OUT

AdvancedInfo

MC_ADV_INFO_MPDC_REF

Structure with extended output information

Table: Parameter MC_BR_MechPosDeviationComp

MC_MPDC_PARAM_REF data type

Parameter

Data type

Description

Mode

UINT

Compensation mode:

mcDIR_DEPENDENT

mcDIR_DEPENDENT_AX_POS (V5.040 and later)

mcDIR_DEPENDENT_BACKLASH

mcDIR_DEPENDENT_BACKLASH_AX_POS (V5.040 and later)

mcDIR_DEPENDENT_SET_POS_AX_POS (V5.040 and later)

mcDIR_DEPENDENT_SET_POSITION

mcDIR_INDEPENDENT

mcDIR_INDEPENDENT_AX_POS (V5.040 and later)

mcDIR_INDEPENDENT_SPEED

mcDIR_INDEPENDENT_SPEED_AX_POS (V5.040 and later)

PositionSource

UINT

Source of the position for the compensation calculation:

mcSET_POSITION

mcACTUAL_POSITION

mcENCODER_POSITION

DirectionIndependent

MC_MPDC_DIR_INDEPENDENT_REF

Parameter for direction-independent compensation

DirectionDependent

MC_MPDC_DIR_DEPENDENT_REF

Parameter for direction-dependent compensation

Periodic

BOOL

Compensation data is interpreted periodically:

mcNON_PERIODIC (default)

mcPERIODIC

MC_MPDC_COMP_DATA_REF data type

Parameter

Data type

Description

AdrPositions

UDINT

Address of the list with positions, array of REAL [PLCopen units]

AdrDeviations

UDINT

Address of the list with deviations, array of REAL [PLCopen units]

NumberOfPoints

UINT

Number of points in the lists

MC_MPDC_DIR_INDEPENDENT_REF data type

Parameter

Data type

Description

CompData

MC_MPDC_COMP_DATA_REF

Data for the compensation

FilterTime

REAL

Filter time constant for smoothing the speed correction value [s]

Note:

Only evaluated for "Mode" mcDIR_INDEPENDENT_SPEED

MC_MPDC_DIR_DEPENDENT_REF

Parameter

Data type

Description

ConstantBacklash

REAL

Constant mechanical backlash [PLCopen units]

Note:

If a value 0 is specified here, "CompDataPos" and "CompDataNeg" are ignored.

Only values >0 are permitted.

CompDataPos

MC_MPDC_COMP_DATA_REF

Data for compensation in the positive direction

CompDataNeg

MC_MPDC_COMP_DATA_REF

Data for compensation in the negative direction

StartFlank

UINT

Edge at which compensation is started:

mcSTART_P_FLANK

mcSTART_N_FLANK

MaxVelocity

REAL

Maximum velocity when changing edges [PLCopen units/s]

Note:

Only used with "Mode" mcDIR_DEPENDENT and mcDIR_DEPENDENT_SET_POSITION.

TimeConstant

REAL

Time constant of the exponential function for edge change [s]

Note:

Only used with "Mode" mcDIR_DEPENDENT_BACKLASH and mcDIR_DEPENDENT_SET_POSITION.

NoiseLimit

REAL

Noise limit [%]

Range of values: 0.0 … 1.0

Note:

Only needed for "Mode" mcDIR_DEPENDENT_BACKLASH and mcDIR_DEPENDENT_SET_POSITION.

Inertia

REAL

Moment of inertia in backlash [kgm2]

Note:

Only needed for "Mode" mcDIR_DEPENDENT_BACKLASH.

Note:

If 0.0 is specified, the default value MOTOR_INERTIA is used.

MC_ADV_MPDC_REF

Parameter

Data type

Description

DataObjectNamePos

STRING(12)

Name of the data object (cam) that is used as the data source in place of "CompData" or "CompDataPos".

If a data object with this name does not exist on the PLC, it will be generated; the cam data calculated from "CompData" or "CompDataPos" is then saved there.

DataObjectNameNeg

STRING(12)

Name of the data object (cam) that is used as the data source in place of "CompDataNeg".

If a data object with this name does not exist on the PLC, it will be generated; the cam data calculated from "CompDataNeg" is then saved there.

CamStartPosition

REAL

Axis position at which the cam begins [PLCopen units]

CamStartPositionNeg

REAL

Axis position at which the cam begins in the negative direction [PLCopen units]

CalcOnly

BOOL

FALSE:

Performs calculations of cam data, if required, and starts compensation.

TRUE:

Only performs the calculation of the cam data and generates the cam data object. Compensation is not started.

MC_ADV_INFO_MPDC_REF

Parameter

Data type

Description

DataObjectIdentPos

UDINT

Ident of the data object with the name "DataObjNamePos"

DataObjectIdentNeg

UDINT

Ident of the data object with the name "DataObjNameNeg"

CamStartPosition

REAL

Axis position at which the cam begins [PLCopen units]

CamStartPositionNeg

REAL

Axis position at which the cam begins in the negative direction [PLCopen units]

CalcDone

BOOL

TRUE:

The calculation of the cam data is completed.

Period

REAL

Period of the cam profiles [PLCopen units]

Topics in this section:

Description of function

Compensation data

"Parameters.Mode" input

"Parameters.PositionSource" input

"Parameters.DirectionDependent.StartFlank" input

Input "Parameters.DirectionDependent.ConstantBacklash"

Input "Parameters.Periodic"

Usage example

Usage example with "AdvancedParameters"

Required resources

Additional information

Error numbers