MC_ExtSetPointGenFeedWithTorque

MC_ExtSetPointGenFeedWithTorque 1:

The MC_ExtSetPointGenFeedWithTorque function is used to feed set values from an external setpoint generator to an axis. Compared to the MC_ExtSetPointGenFeed function, this function is extended by the transfer of a TorqueOffset. To ensure that the TorqueOffset is also transferred cyclically from the NC to the drive, this must be activated explicitly when the FB_ExtSetPointGenEnable is called via Options.UseTorqueOffset. The function copies the data to the cyclic axis interface instantaneously (ExtSetPos, ExtSetVelo, ExtSetAcc, ExtSetDirection, and ExtTorque) of the axis. The MC_ExtSetPointGenFeedWithTorque function result is unused and therefore always FALSE.

An external setpoint generator is usually a PLC function block that calculates cyclic set values for an axis and can therefore substitute the internal setpoint generator in an NC axis.

Additional information can be found under MC_ExtSetPointGenEnable and MC_ExtSetPointGenDisable.

MC_ExtSetPointGenFeedWithTorque 2: Inputs

VAR_INPUT
    Position     : LREAL;
    Velocity     : LREAL;
    Acceleration : LREAL;
    TorqueOffset : LREAL;
    Direction    : DINT;
END_VAR

Name

Type

Description

Position

LREAL

Set position from an external setpoint generator

Velocity

LREAL

Set velocity from an external setpoint generator

Acceleration

LREAL

Set acceleration from an external setpoint generator

TorqueOffset

LREAL

TorqueOffset from an external setpoint generator

Direction

DINT

Set direction from an external setpoint generator. ( -1 = negative direction, 0 = standstill, 1 = positive direction)

MC_ExtSetPointGenFeedWithTorque 3: Inputs/outputs

VAR_IN_OUT
    Axis : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024

PC or CX (x86 or x64)

Tc2_MC2 (from v3.3.68.0)