MC_WriteHardwareParameter

MC_WriteHardwareParameter 1:

This function block allows to write parameters to the hardware drive asynchronously via ADS. It supports CoE and SoE drives.

Syntax

Definition:

FUNCTION_BLOCK MC_WriteHardwareParameter
VAR_IN_OUT
    Axis          : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Execute       : BOOL;
    Index         : UINT;
    SubIndex      : USINT;
    SourceAddress : PVOID;
    DataSize      : UDINT;
END_VAR
VAR_OUTPUT
    Done          : BOOL;
    Busy          : BOOL;
    Active        : BOOL;
    Error         : BOOL;
    ErrorId       : UDINT;
END_VAR

MC_WriteHardwareParameter 2: Inputs

Name

Type

Default

Description

Execute

BOOL

 

Rising edge triggers the write operation.

Index

UINT

0

CoE object index or SoE IDN

SubIndex

USINT

0

CoE sub index or SoE element

SourceAddress

PVOID

0

Contains the address of the data.

DataSize

UDINT

0

Contains the size of the data.

MC_WriteHardwareParameter 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_WriteHardwareParameter 4: Outputs

Name

Type

Description

Done

BOOL

Value is successfully sent to the target.

Busy

BOOL

Function block is not finished.

Active

BOOL

Function block is active.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Versionsinformation

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