MC_ReadStopInfo

MC_ReadStopInfo 1:

The MC_ReadStopInfo function block can be used to calculate the distance and time to a complete stop of the axis, based on the specified dynamics.

It should be noted that while the calculated values provide an estimate, the actual distance and time to a standstill may differ from these values due to ADS runtimes, depending on the prevailing dynamics.

MC_ReadStopInfo 2: Inputs

VAR_INPUT
    Execute           : BOOL;
    Deceleration      : LREAL;
    Jerk              : LREAL;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

Deceleration

LREAL

Deceleration (≥0)

If the value is 0, the default deceleration from the axis configuration is applied.

Jerk

LREAL

Jerk (≥0)

If the value is 0, the default jerk from the axis configuration is applied.

MC_ReadStopInfo 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.

MC_ReadStopInfo 4: Outputs

VAR_OUTPUT
    BitValues         : DWORD;
    Done              : BOOL;
    Busy              : BOOL;
    Error             : BOOL;
    ErrorID           : UDINT;
END_VAR

Name

Type

Description

BitValues

DWORD

Values of the corresponding read bits.

Done

BOOL

TRUE if the command was executed without errors.

Busy

BOOL

TRUE as soon as the command is started with Execute and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

StopDistance

LREAL

Distance until the axle comes to a stop

StopTime

LREAL

Time to axle stop [s]

Requirements

Development environment

Target platform

PLC library to include

TwinCAT v3.1.4024.79

TwinCAT v3.1.4026

TF5000.NCPTP.XAE 1.0.11

PC oder CX (x86)

Tc2_MC2 v3.3.75