ECATMasterStatus

PLCopen motion icon Pipe Network motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Reads the EtherCATClosed Ethernet ofr Control Automation Technology. EtherCAT® is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT is 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 frameClosed In networking dialect, a message is called a frame. counter to determine if EtherCAT is running normally.

Inputs

Input

Data Type

Range

Unit

Default

Description

EnableClosed Enable signal for the drive, Hardware-Enable with 24V signal to X8, Software-Enable command by setup Software, fieldbus or permanently set. Both are required for enabling the drive.

BOOL

FALSE, TRUE

N/A

No default

Request to read the EtherCAT master state and the lost frame countClosed Internal count pulses, 1 pulse = 1/2^20turn..

Continuously reads the master state and the lost frame count as long as the Enable remains high.

Outputs

Output

Data Type

Range

Unit

Description

Valid

BOOL

FALSE, TRUE

N/A

Indicates the values at the State and LostFrameCount outputs are valid.

Error

BOOL

FALSE, TRUE

N/A

Indicates whether this functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. block has completed with error.

ErrorID

DINT

No range

N/A

Error code when the function block failed due to error.

State

UINT

No range

N/A

Indicates the EtherCAT state of the Master.

See State Defines for more information.

LostFrameCount

UDINT

No range

N/A

Total cumulative number of cyclic frames sent with no-response since the EtherCAT started by calling the MLMoitonStart.

Remarks

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 *)

Figure 1: ECATMasterStatus

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

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

See Also