Control commands of a drive

Reading/writing drive data cyclically

Description

4 elements are provided for writing by the PLC in each interpolation cycle. They can be transferred to the drives via the subordinate drive protocol.

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

Data type

MC_CONTROL_UNS32_UNIT

Special features

Currently, data transfer can only be used for SERCOS drives.

Therefore, enable transfer of the value in the axis parameter list to the drive, e.g.:

 

# write the 4 byte PLC value cyclically

# uns32_1 auf 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

# Cyclically read the 4 byte PLC value

# uns32_3 auf 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_r + state_r and writes command_w + enable_w

ST path

gpAx[axis_idx]^.lr_mc_control.uns32_<i>

where i = [1, 4]

Commanded and requested value

ST element

.command_w

.request_r

Data type

UDINT

Return value

ST path

.state_r

Data type

UDINT

Special features

These values are also provided at the position controller interface. Siehe Antriebsdaten zyklisch lesen (gpAx[axis_idx]^.lr_state.uns32_1)

Redirection

ST path

.enable_w

Operation mode

Description

Various drive operation modes can be commanded by the PLC (or operator):

SERCOS drives:

With SERCOS drives, this information is sent to bit 8 and bit 9 of the control word. This switches over between main and ancillary drive operation modes.

mode_0 corresponds to the lowest operation mode control bit of the drive.

Currently, variables mode_0 and mode_1 are used only for SERCOS drives.

PROFIDRIVE drives:

mode_0:

This control unit activates the drive function ‘parking axis’ by setting bit 7 in control word 2.

The control unit state_r element indicates whether the function is active in the drive (value of drive status word 2 bit 7).

Tracking mode is activated by the CNC internally for a parked axis.

mode_1:

This control unit activates the drive function ‘parking encoder’ by setting bit 14 of the encoder control word.

The control unit state_r element indicates whether the function is active in the drive (value of bit 14 in encoder status word).

Tracking mode is activated internally in the CNC for a parked encoder.

mode_2:

Currently not in use.

Data type

MC_CONTROL_BOOL_UNIT

Special features

The elements mode_3    mode_6 are currently not in use.

Access

PLC reads request_r + state_r and writes command_w + enable_w

ST path

gpAx[axis_idx]^.lr_mc_control.mode_<i>

where i = [0, 6]

Commanded, requested and return values

ST element

.command_w

.request_r

.state_r

Data type

BOOL

Value range

[TRUE = Bit set, FALSE]

Redirection

ST element

.enable_w