Function BlockECATMasterStatusPLCopen motion iconPipe Network motion icon

Description

This function block reads the EtherCATClosedEtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs master state and the lost frame counter, to determine if EtherCAT is running normally.

Figure 7-189: ECATMasterStatus function block

Arguments

Input

Enable Description Request to read the ECAT master state and the lost frame count.
Keeps continously reads the master state and the lost frame count as long as the Enable remains high.
  Data type BOOL
  Range 0,1
  Unit N/A
  Default

Output

Valid Description Indicates the values at the 'State' and LostFrameCount outputs are valid.
  Data type BOOL
  Unit N/A
Error Description Indicates error
  Data type BOOL
  Unit N/A
ErrorID Description Error code when when the function block failed due to error.
  Data type DINT
  Unit N/A
State Description Indicates the ECAT state of the Master. See State Defines for details
  Data type UINT
  Unit N/A
LostFrameCount Description Total cumulative number of cyclic frames sent with no-response since the ECAT started by calling the MLMoitonStart.
Missing return frames will generate an A38 alarm.
The Counter is reset to 0 when the MLMotionStart is called.
  Data type UDINT
  Unit N/A

State Defines

#define   EC_STATE_NO_COMMUNICATION   0   (* 0x00 = No Communication to device *)
#define EC_STATE_INIT 1 (* 0x01 = Device in Init state *)
#define EC_STATE_PREOP 2 (* 0x02 = Device in Pre-operational state *)
#define EC_STATE_BOOTSTRAP 3 (* 0x03 = Device in Bootstrap state *)
#define EC_STATE_SAFEOP 4 (* 0x04 = Device in Safe-Operational state *)
#define EC_STATE_OP 8 (* 0x08 = Device in Operational state *)

Related Functions

ECATWCStatus, ECATDeviceStatus.

Examples

Structured Text

//  ECATMasterStatus
Inst_ECATMasterStatus( True );
MasterSTate := Inst_ECATMasterStatus.State;
MasterLastFrameCount := Inst_ECATMasterStatus.LostFrameCount;

FBD

FFLD

Go back to the top of the page [Top]