ECATDevReadParam

PLCopen motion icon Pipe Network motion icon

 Function Block - Returns the EtherCAT device-specific information.

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

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Enable

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.
       

ParameterNumber

INT

-32768 to +32767

N/A

No default

Parameter number.

See EtherCAT Device Parameters.

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates whether this function 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.

Error Codes

EtherCAT Device Parameters

This is a list of supported parameters read by ECATDevReadParam.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

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