FC_SetMasterEncoder - General Information

Overview

Type:

Function

Available as of:

SystemInterface_1.32.6.0

Versions:

Current version

Task

Pass the velocity signal of a master encoder to a Logical encoder or an encoder output (Incremental encoder output on the bus terminal BT-4/ENC1 or synchronized encoder output on the encoder network).

Description

The "logical encoder" or the encoder output with the logical address i_stLEncId is connected to the master encoder (velocity source) with the logical address i_stMasterId. With this connection, the velocity signal (Velocity, RefVelocity) of the master encoder is passed on.

For an axis, RefVelocity is used which normally leads to smoother system performance than if the actual velocity were used.

The name of the current master encoder is displayed in the parameter InObject in the logical encoder or incremental encoder output.

 

Master encoder

Parameter "Direction" of the master encoder

Lexium LXM62 Drive (LXM62DxS)

Lexium LXM52 Drive (LXM52)

Lexium ILM62 Drive Module (ILM62)

This does NOT affect the velocity signal which is passed on from the master encoder. That is, in the case of the direction of rotation "left", the velocity signal is NOT multiplied by -1.

Physical SinCos encoder (P_ENC)

This affects the velocity signal which is passed on from the master encoder. That is, in the case of the direction of rotation "left", the velocity signal is multiplied by -1.

Incremental encoder input (INC_IN)

This affects the velocity signal which is passed on from the master encoder. That is, in the case of the direction of rotation "left", the velocity signal is multiplied by -1.

Virtual encoder (V_ENC)

Parameter does not exist.

Sum master encoder (SMENC)

Parameter does not exist.

Connection "DRIVE" - "Logical Encoder":

G-SE-0068230.1.gif-high.gif

 

 

Connection "Master Encoder" (P_ENC, INC_IN) - "Logical Encoder":

G-SE-0068229.1.gif-high.gif

 

 

NOTE: The function FC_GetPacDriveBootState() should be used to ensure that the boot procedure for the PacDrive controller is completed and the physical encoder is initialized.

Interface

Input

Data type

Description

i_stLEncId

ST_LogicalAddress

Logical address of the logical encoder or incremental encoder output or synchronized encoder output

i_stMasterId

ST_LogicalAddress

Logical address of the master encoder whose velocity signal is passed on.

If i_stMasterId = Gc_stLogAddrAllTypes is transferred, then the master encoder is decoupled by the "Logical encoder" or the encoder output.

Return Value

Data type

Description

DINT

0: OK

-1: No address of a logical encoder

-2: No address of a master encoder

Examples

IF FC_GetPacDriveBootState() = 1 THEN
   FC_SetMasterEncoder( VirtuellerGeber.stLogicalAddress, Leitgeber.stLogicalAddress );
END_IF;  

NOTE: If axis encoders are cascaded, then the reference position of the last Sercos cycle is used. A delay of a Sercos cycle occurs.