分享

MC_ReadStatus

 大傻子的文渊阁 2020-05-08

MC_ReadStatus

MC_ReadStatus determines the current operating state of an axis and signals it at the block outputs.

The updated operating state is additionally stored in the Status output data structure and in the Axis.Status axis data structure. This means the operating state only has to be read once at the start of each PLC cycle and can then be accessed via Axis.Status.

Notice: The Axis variable (type AXIS_REF) already includes an instance of the function block MC_ReadStatus. This means that the operating state of an axis can be updated at the start of a PLC cycle by calling up Axis.ReadStatus.

Example:


PROGRAM MAIN
VAR
   Axis1   : AXIS_REF
END_VAR
 
(* call the read status function *)
Axis1.ReadStatus;
 

Inputs


VAR_INPUT
   Enable  : BOOL;
END_VAR
 

Enable

The operating state of the axis is updated with each call of the block, as long as Enable is TRUE.

General rules for MC function blocks

Outputs


VAR_OUTPUT
   Valid               : BOOL;
   Busy                : BOOL;
   Error               : BOOL;
   ErrorId             : UDINT;
   (* motion control statemachine states: *)
   ErrorStop           : BOOL;
   Disabled            : BOOL;
   Stopping            : BOOL;
   StandStill          : BOOL;
   DiscreteMotion      : BOOL;
   ContinuousMotion    : BOOL;
   SynchronizedMotion  : BOOL;
   Homing              : BOOL;
   (* additional status *)
   ConstantVelocity    : BOOL;
   Accelerating        : BOOL;
   Decelerating        : BOOL;
   (* status data structure *)
   Status              : ST_AxisStatus;
END_VAR
 

Valid

Indicates that the axis operating state indicated at the other outputs is valid.

Busy

Indicates that the function block is active.

Error

Becomes TRUE if an error occurs.

ErrorID

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

ErrorStop

Axis status according to the PlcOpen state diagram

Disabled

Axis status according to the PlcOpen state diagram

Stopping

Axis status according to the PlcOpen state diagram

StandStill

Axis status according to the PlcOpen state diagram

DiscreteMotion

Axis status according to the PlcOpen state diagram

ContinousMotion

Axis status according to the PlcOpen state diagram

SynchronizedMotion

Axis status according to the PlcOpen state diagram

Homing

Axis status according to the PlcOpen state diagram

ConstantVelocity

The axis is moving with constant velocity

Acceleration

The axis accelerates.

Decelerating

The axis decelerates.

Status

Extended status data structure with additional status information.

General rules for MC function blocks

Inputs/outputs


VAR_IN_OUT
   Axis    : AXIS_REF;
END_VAR
 

Axis

Axis data structure

The axis data structure of type AXIS_REF addresses an axis uniquely within the system. Among other parameters it contains the current axis status, including position, velocity or error status.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约