Control commands of a drive

Read/write drive data cyclically

Description

Four elements are available and these can be written by the PLC in each interpolation cycle and transferred to the drives via the subordinate drive protocol.

The content and action are application-specific (dependent on the drives)

Data type

MCControlUNS32Unit

Characteristics

Data transfer can currently be used only in the case of SERCOS drives.

For this purpose, transfer of the value to the drive must be enabled in the axis parameter list, e.g.:

# Cyclic writing of the 4 byte PLC value uns32_1 at S-0-0815
antr_digital.typ.sercos.mdt[1].ident_nr 0815
antr_digital.typ.sercos.mdt[1].ident_len 4
antr_digital.typ.sercos.mdt[1].nc_ref LR_VAR1_OUT
# Cyclic reading of the 4 byte PLC value uns32_3 at S-0-0819
antr_digital.typ.sercos.at[1].ident_nr 0819
antr_digital.typ.sercos.at[1].ident_len 4
antr_digital.typ.sercos.at[1].nc_ref LR_VAR3_IN

Access

PLC reads Request + State and writes Command + Enable

ST path

pAC[axis_idx]^.addr^.McControlLr_Data.MCControlUNS32Unit_D<i>

where i [1; 4]

Commanded and requested value

ST element

.D_Command

.D_Request

Data type

UDINT

Return value

ST path

.D_State

Data type

UDINT

Characteristics

These values are also provided at the position controller interface. See read drive data cyclically (pAC[axis_idx]^.addr^.StateLR_Data.D_Word1)

Redirection

ST path

.X_Enable

Operating mode

Description

Various drive operating modes can be commanded via these elements by the PLC (or operation).

SERCOS-Antriebe:

In the case of SERCOS drives, this information is derived from bit 8 and bit 9 of the control word. This allows switchovers between main and ancillary operating modes of the drive.

Mode0 corresponds to the lowest operating mode control bit of the drive.

Currently, Mode0 and Mode1 are used only for SERCOS drives.

PROFIDRIVE-Antriebe:

MCControlBoolUnit_Mode0

With this control, unit drive functionality ‚parking axis’ is selected by setting bit 7 of drive control word 2 (STW2).

The state element indicates if the functionality is active in the drive (value of bit 7 in drive status word 2 (ZSW2)).

For a parked axis follow up operation mode is selected internally.

MCControlBoolUnit_Mode1 :

With this control unit drive functionality ‚parking encoder’ is selected by setting bit 14 of the encoder control (GX_STW).

The state element indicates if the functionality is active in the drive (value of bit 14 in encoder status word (GX_STW)).

For a parked encoder follow up operation mode is selected internally.

MCControlBoolUnit_Mode2 :

Is not used now.

Data type

MCControlBoolUnit

Characteristics

Elements MCControlBoolUnit_Mode3 … MCControlBoolUnit_Mode6 are currently not used.

Access

PLC reads Request + State and writes Command + Enable

ST path

pAC[axis_idx]^.addr^.McControlLr_Data.MCControlBoolUnit_Mode<i>

where i from [0; 6]

Commanded, requested and return value

ST element

.X_Command

.X_Request

.X_State

Data type

BOOL

Value range

[TRUE = Bit set, FALSE]

Redirection

ST element

. X_Enable