ECATDevReadParam

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. - Returns 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. device-specific information.

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

Requests to read the EtherCAT device-specifc parameter.

DeviceAddress

INT

-32768 to +32767

N/A

No default

The address of the device data is read from.

  • The first node usually has the value 1001.
  • The second node usually has the value 1002.

  • Use the members of the EtherCAT structure to specify a device's address to Create Variables.
       

ParameterNumber

INT

-32768 to +32767

N/A

No default

Parameter number.

See EtherCAT Device Parameters.

Outputs

Output

Data Type

Range

Unit

Description

Done

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 without error.

Error

BOOL

FALSE, TRUE

N/A

Indicates an invalid input was specified.

ErrorID

INT

-32768 to +32767

N/A

Indicates the error if Error output is TRUE.

See Error Codes.

Value

LREAL

No range

N/A

Value of the parameter.

Remarks

See EtherCAT Function Blocks that Work with Drive Parameters about function blocks not supported by ML and MC function blocks.

Error Codes

EtherCAT Device Parameters

This is a list of supported parameters read by ECATDevReadParam.

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_S700Closed Servostar 700 drive

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

Figure 1: ECATDevReadParam

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* 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;