FunctionECATDevReadParamPLCopen motion iconPipe Network motion icon

Description

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 which work with drive parameters 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, you can use the members of the EtherCAT structure to specify a device's address when you create the variable.
  Data type INT
  Range -
  Unit N/A
  Default
ParameterNumber Description Parameter number, see 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 below)
  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

The table below 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 ValueNumerical ValueDescription
DEVICE_TYPE_OTHER0The EtherCAT device is not a drive.
DEVICE_TYPE_DRIVE1The EtherCAT device is a drive.
DEVICE_PARAM_DRIVE_FAMILY 2 Drive Family Read Only EtherCAT device drive family details. 
Output ValueNumerical ValueDescription
DEVICE_NOT_A_DRIVE-1The EtherCAT device is not a drive
DRIVE_FAMILY_OTHER0The drive family cannot be determined
DRIVE_FAMILY_S300Closed "Servostar 300 drive" See Servo Drive in Glossary_S700Closed "Servostar 700 drive" See Servo Drive in Glossary1The device is an S300/S700 family drive
DRIVE_FAMILY_AKD2The 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_STEPPER3The device is an AKT2G Stepper family drive
DEVICE_PARAM_DRIVE_GEN 3 Drive Generation Read Only EtherCAT drive generation details. 
Output ValueNumerical ValueDescription
DEVICE_NOT_A_DRIVE-1The EtherCAT device is not a drive.
DRIVE_GEN_UNKNOWN0The drive generation cannot be determined.
DRIVE_GEN_11The device is a 1st generation drive, e.g. AKD, AKD-N, S300, S700, AKT2G-SM-L15, AKT2G-SM-L50.
DRIVE_GEN_22The 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