ECATDeviceAction
Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. - Performs an action on an EtherCAT 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.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
Execute |
BOOL |
FALSE, TRUE |
N/A |
No default |
When Execute is set to TRUE, an action is performed. |
DeviceAddress |
INT |
-32768 to +32767 |
N/A |
No default |
The address of the device to perform an action on.
|
Action |
INT |
-32768 to +32767 |
N/A |
No default |
The action to be performed. Action can be one of these values:
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Done |
BOOL |
FALSE, TRUE |
N/A |
Indicates whether this function 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 whether this function block has completed with error. |
ErrorID |
DINT |
No range |
N/A |
The ECATDeviceAction error result if Error is TRUE.
|
Remarks
- This function returns immediately.
- It can be called multiple times in one cycle.
Supported Actions
DEVICE_ACTION_DISCONNECT
- The EtherCAT master is notified to expect the node to be removed from the EtherCAT when ECATDeviceAction is called with DEVICE_ACTION_DISCONNECT.
- Any Axis/Axes mapped to a drive In electrical engineering, a drive is an electronic device to provide power to a motor or servo. Control device for regulating the speed, torque and position of a motor. A unit controlling a motor using the current and timing in its coils. node is automatically simulated.
- The last position Position means a point in space which is described by different coordinates. Depending on the used system and transformation it can consist of a maximum of six dimensions (coordinates).This means three Cartesian coordinates in space and coordinates for the orientation. In ACS there can be even more than six coordinates. If the same position is described in different coordinate systems the values of the coordinates are different. from the physical drive is carried over to the simulation when the EtherCAT restarts.
DEVICE_ACTION_CONNECT
- This action connects the already disconnected node to the EtherCAT Network.
- The axis (or axes) that was acting as simulated axis becomes a normal axis when the drive node is connected.
- The axis/axes position comes directly The orientation components of a vector in space. from the configured drive feedback.
- The position is not automatically transferred from the simulated axis.
Usage
The EtherCAT network needs to be stopped to use this function block.
- This is achieved by either:
- Calling ECATDeviceAction prior to calling MLMotionStart.
- First calling MLMotionStop to stop the network.
- See Modular EtherCAT Concept for more information on modular machine The complete assembly of all connected parts or devices, of which at least one is movable. design.
Error Codes
Value Dec (hex) |
Error Code |
Description |
---|---|---|
0 |
ECERR_OK |
The SDO call succeeded. |
1000 (0x3E8) |
ECERR_DEVICE_ACTION_IS_INVALID |
The requested Device Action is invalid. |
1003 (0x3EB) |
ECERR_DEVICE_ACTION_MINIMUM_ONE_NODE_REQD |
A minimum of one device must be present in the EtherCAT network. |
1004 (0x3EC) |
ECERR_DEVICE_ACTION_MINIMUM_ONE_DC_NODE_REQD |
A minimum of one Distributed clock Clock signal. capable device must be present in the EtherCAT network. |
107 = 0x6B |
The size of the connections is too small.
|
|
1792 (0x700) |
ECERR_DEVICE_ERROR |
EtherCAT device is not accessible. |
1794 (0x702) |
ECERR_DEVICE_INVALIDCMD |
Invalid mailbox command. |
1795 (0x703) |
ECERR_DEVICE_INVALIDINDEX |
An invalid value for the Index Zero pulse (zero signal) of a hardware pin such as digital input or feedback pin. input was specified. |
1796 (0x704) |
ECERR_DEVICE_INVALIDACCESS |
Reading of the variable is not permitted. |
1797 (0x705) |
ECERR_DEVICE_INVALIDSIZE |
An invalid size for the parameter was specified. |
1798 (0x706) |
ECERR_DEVICE_INVALIDDATA |
Invalid parameter value(s) in SDO index and/or sub-index. |
1799 (0x707) |
ECERR_DEVICE_NOTREADY |
Device is not in a ready state. The network is not in operational. |
1800 (0x708) |
ECERR_DEVICE_BUSY |
Device is not available to respond. |
1801 (0x709) |
ECERR_DEVICE_INVALIDCONTEXT |
Device responded with an illegal error code, indicating the command is not allowed under the present conditions. |
1802 (0x70A) |
ECERR_DEVICE_NOMEMORY |
EtherCAT mailbox is out of memory or device is out of disk space. |
1803 (0x70B) |
ECERR_DEVICE_INVALIDPARM |
EtherCAT mailbox request was not valid. |
1804 (0x70C) |
ECERR_DEVICE_NOTFOUND |
EtherCAT device not found. |
1805 (0x70D) |
ECERR_DEVICE_SYNTAX |
An unexpected error occurred. |
1810 (0x712) |
ECERR_DEVICE_INVALIDSTATE |
The EtherCAT device is in an invalid state. |
1817 (0x719) |
ECERR_DEVICE_TIMEOUT |
|
1826 (0x722) |
ECERR_DEVICE_INSERTMAILBOX |
Error while inserting the mailbox command into internal FIFO. |
1827 (0x723) |
ECERR_DEVICE_INVALIDOFFSET |
An invalid value for the SubIndex input was specified. |
1828 (0x724) |
ECERR_DEVICE_UNKNOWNMAILBOXCMD |
The master sent an unknown mailbox command to the slave. |
1829 (0x725) |
ECERR_DEVICE_ACCESSDENIED |
Device responded with an invalid access error code, indicating the command is not allowed. |
1832 (0x728) |
ECERR_DEVICE_INVALIDADDR |
The specified EtherCAT node address is invalid. |
1836 (0x72c) |
ECERR_DEVICE_NOT_A_FSOE_MASTER |
Device is not a FSoE master. |
1837 (0x072D) |
ECERR_DEVICE_DISCONNECTED |
The EtherCAT device is disconnected. |
1920 (0x780) |
ECERR_DEVICE_PARAM_ACCESS_ERROR |
Unknown error occurred while accessing parameter. |
1921 (0x781) |
ECERR_DEVICE_PARAM_NOT_FOUND |
Parameter was not found. |
1922 (0x782) |
ECERR_DEVICE_PARAM_NOT_INTEGER |
Parameter is a floating-point value. Integer value required. |
1923 (0x783) |
ECERR_DEVICE_VALUE_IS_NEGATIVE |
No negative values allowed. Value specified was negative. |
1924 (0x784) |
ECERR_DEVICE_VALUE_OUT_OF_RANGE |
Value is out of data-range. |
1925 (0x785) |
ECERR_DEVICE_VALUE_GREATER_THAN_MAX |
Value bigger than maximum. |
1926 (0x786) |
ECERR_DEVICE_VALUE_LOWER_THAN_MIN |
Value lower than minimum. |
2048 (0x800) |
ECERR_CLIENT_ERROR |
Error in Mailbox response to a previously sent mailbox command. |
2049 (0x801) |
ECERR_CLIENT_TIMEOUT |
The SDO command timed out. |
2050 (0x802) |
ECERR_CLIENT_ INVALIDPARM |
An invalid value was specified. |
2051 (0x803) |
ECERR_CLIENT_ INVALIDSIZE |
An invalid value for the size input was specified. |
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
MLMotionStop(); MotionEngineStatus := MLMotionStatus(); On MotionEngineStatus = MLSTATUS_STOPPED Do Inst_ECATDeviceAction(True, EtherCAT.AKD_3, DEVICE_ACTION_DISCONNECT); If Inst_ECATDeviceAction.Error Then // Handle Error // Error ID value is in Inst_ECATDeviceAction.ErrorEnd_If; End_Do;
See Also