MC_LoadControl

MC_LoadControl 1:

This function block continuously exerts a torque, force or pressure of the specified value.
Positive torque, force and differential pressure is in the positive direction of velocity, pressure is physically unsigned. LoadUnit must match the unit of the value measured by the corresponding sensor.

Syntax

Definition:

FUNCTION_BLOCK MC_LoadControl
VAR_IN_OUT
    Axis               : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Execute            : BOOL;
    Load               : LREAL;
    LoadRamp           : LREAL;
    LoadRampDerivative : LREAL;
    BufferMode         : EBufferMode;
END_VAR
VAR_OUTPUT
    InLoad             : BOOL;
    Busy               : BOOL;
    Active             : BOOL;
    CommandAborted     : BOOL;
    Error              : BOOL;
    ErrorId            : UDINT;
END_VAR

MC_LoadControl 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Start the motion at rising edge.

Load

LREAL

#Invalid

Commanded load value ([LoadUnit]). It is approached using a defined ramp (LoadRamp).

LoadRamp

LREAL

#Invalid

Maximum load derivative ([LoadUnit/s], positive)

LoadRampDerivative

LREAL

#Ignore

Maximum load ramp derivative ([LoadUnit/s^2], positive). It can be left as 'Ignore' if no ramp derivative limit is desired.

BufferMode

EBufferMode

Aborting

Chronological sequence of the command

MC_LoadControl 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_LoadControl 4: Outputs

Name

Type

Description

InLoad

BOOL

Commanded load value reached

Busy

BOOL

Function block is not finished and new output values are to be expected.

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Mögliche Fehlercodes

Für diesen Funktionsbaustein sind unter anderem die folgenden Werte für den Ausgang ErrorId möglich:

Fehler(Hex)

Fehler(Dez)

Fehlertyp

Beschreibung

0x813c

33084

Parameter

Der Buffer-Modus ist ungültig. Der am Funktionsbaustein angegebene BufferMode ist unbekannt oder wird vom Kommando nicht unterstützt (einige Kommandos akzeptieren z.B. nur Aborting, andere nur Buffered).

0x8145

33093

Funktionsbaustein

Die Verknüpfung des zyklischen Interfaces zwischen NC und SPS fehlt (z.B. AXIS_REF, AXES_GROUP_REF, ...). Eine vom Funktionsbaustein verwendete Referenz (z.B. auf eine Achse, Gruppe, einen Mover oder ein anderes Motion-Objekt) ist nicht mit dem zugehörigen NC-Objekt verknüpft oder die zyklische Verknüpfung ist unvollständig.

0x81ac

33196

Parameter

Ungültiger Last-Wert. Der für einen Druck- oder Kraft-Befehl angegebene Last-Wert ist ungültig (z.B. NaN oder außerhalb des erlaubten Bereichs).

0x81ad

33197

Parameter

Ungültiger Last-Rampen-Wert. Der Wert der Last-Rampe (Geschwindigkeit des Last-Aufbaus) ist ungültig (z.B. kleiner oder gleich Null oder NaN).

0x81ae

33198

Parameter

Ungültiger Last-Rampen-Änderungs-Wert. Die Ableitung der Last-Rampe (Änderungs-Rate des Last-Aufbaus) ist ungültig (z.B. kleiner oder gleich Null oder NaN). Der Wert ist optional und kann ungenutzt bleiben.

Eine Übersicht aller NC-Fehlercodes finden Sie hier:

Versionsinformation

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6