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-188: 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]