ECATDevReadParam
This function block returns the EtherCAT ***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.
|
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 |
Data type | INT | |
Value | Description | Value of the parameter |
Data type | LREAL |
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
|
||||||||||||||||||
DEVICE_PARAM_DRIVE_FAMILY | 2 | Drive Family | Read Only |
EtherCAT device drive family details.
|
||||||||||||||||||
DEVICE_PARAM_DRIVE_GEN | 3 | Drive Generation | Read Only |
EtherCAT drive generation details.
|
Example
Structured Text
(* ECATDevReadParam ST "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;