ECATDevReadParam

PLCopen motion icon Pipe Network motion icon

This function block returns the EtherCATClosed ***EtherCAT 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 device-specific information.

See EtherCAT Function Blocks That Work With Drive Parameters for information about function blocks that are not supported by ML and MC function blocks.

Figure 7-193: ECATDevReadParam

Arguments

Input

Enable Description Requests to read the EtherCAT device-specifc parameter
  Data type BOOL
  Range 0, 1
  Unit N/A
  Default
DeviceAddress Description

The address of the device from which data is read.

  • The first node usually has the value '1001'.
  • The second node usually has the value '1002'.
  • Alternately, use the members of the EtherCAT structure to specify a device's address when the variable is created.
  Data type INT
  Range -
  Unit N/A
  Default
ParameterNumber Description

Parameter number

See the table in EtherCAT Device Parameters.

  Data type INT
  Range
  Unit N/A
  Default

Output

Done Description Indicates when the function is complete.
  Data type BOOL
Error Description Indicates an invalid input.
  Data type BOOL
ErrorID Description

Indicates the error if Error output is set to TRUE

See List of EtherCAT Error Messages.

  Data type INT
Value Description Value of the parameter
  Data type LREAL
List of EtherCAT Error Messages
Error Code Value dec (hex) Description
ECERR_OK 0 No Error
ECERR_DEVICE_ERROR 1792 (0x700)

EtherCAT device is not accessible.

ECERR_DEVICE_INVALIDADDR 1832 (0x728)

EtherCAT device address is invalid.

ECERR_DEVICE_PARAM_NOT_FOUND 1921 (0x781

Parameter was not found.

EtherCAT Device Parameters

This is a list of currently supported parameters read by ECATDevParamRead.

Parameter ID Name R/W Description
DEVICE_PARAM_DEVICE_TYPE 1 Device Type Read Only

EtherCAT Device Type

Output Value Numerical Value Description
DEVICE_TYPE_OTHER 0

The EtherCAT device is not a drive.

DEVICE_TYPE_DRIVE 1

The EtherCAT device is a drive.

DEVICE_PARAM_DRIVE_FAMILY 2 Drive Family Read Only

EtherCAT device drive family details.

Output Value Numerical Value Description
DEVICE_NOT_A_DRIVE -1

The EtherCAT device is not a drive.

DRIVE_FAMILY_OTHER 0

The drive family cannot be determined.

DRIVE_FAMILY_S300Closed "Servostar 300 drive" See Servo Drive in Glossary_S700Closed "Servostar 700 drive" See Servo Drive in Glossary 1

The device is an S300/S700 family drive.

DRIVE_FAMILY_AKD 2

The device is in the AKD2G, AKD-N, or AKD servo driveClosed A servo drive is a special electric amplifier used to power electric servo motors. It monitors feedback signals from the motor and continually adjusts for deviation from expected behavior family.

DRIVE_FAMILY_AKT2G_STEPPER 3

The device is an AKT2G Stepper family drive.

DEVICE_PARAM_DRIVE_GEN 3 Drive Generation Read Only

EtherCAT drive generation details.

 

Output Value Numerical Value Description
DEVICE_NOT_A_DRIVE -1

The EtherCAT device is not a drive.

DRIVE_GEN_UNKNOWN 0

The drive generation cannot be determined.

DRIVE_GEN_1 1

The device is a 1st generation drive (e.g., AKD, AKD-N, S300, S700, AKT2G-SM-L15, AKT2G-SM-L50).

DRIVE_GEN_2 2

The device is a 2nd generation drive (e.g., AKD2G).

Example

Structured Text

(* ECATDevReadParam STClosed "Structured text"
A high-level language that is block structured and syntactically resembles Pascal example *)
Inst_ECATDevReadParam( TRUE, EtherCAT.AKD_2, DEVICE_PARAM_DEVICE_TYPE );
DeviceType := Inst_ECATDevReadParam.Value;

Inst_ECATDevReadParam( TRUE, EtherCAT.AKD_2, DEVICE_PARAM_DRIVE_FAMILY );
DeviceFamily := Inst_ECATDevReadParam.Value;

Inst_ECATDevReadParam( TRUE, EtherCAT.AKD_2, DEVICE_PARAM_DRIVE_GEN );
DriveGen := Inst_ECATDevReadParam.Value;

Ladder Diagram

FBD