Control and Status Ports
Control Port
The real-time port ecat-control-port provides control commands as RPC services.
The following services are available:
Service |
Request |
Response |
Description |
|---|---|---|---|
|
- |
Acknowledge the error and return to |
|
|
|
- |
Request an EtherCAT state ( |
The following response codes may be returned by the services:
Code |
Name |
Description |
|---|---|---|
0 |
|
The request was successful. |
100 |
|
The requested EtherCAT Master state is invalid. |
101 |
|
The request is not possible/allowed in the current state. |
202 |
|
An unexpected error occurred in the service implementation. |
1000 |
|
The reset was refused because the communication fault counter is not zero. |
See State Machine for more details about the commands.
EtherCAT States
Values of requestedState and of the status variable MasterState. NONE is only published, it cannot be requested. BOOT exists only for slaves, the master never reports or accepts it.
Value |
Name |
|---|---|
0 |
|
1 |
|
2 |
|
3 |
|
4 |
|
8 |
|
Status Port
The real-time port ecat-status-port provides current system and master status information as output variables. The following variables are available:
Name |
Type |
Description |
|---|---|---|
|
|
Current error number (0 = no error). |
|
|
Human-readable error message corresponding to |
|
|
Current EtherCAT master state, see EtherCAT States. |
|
|
Number of status port updates since startup. |
|
|
Cycle start timestamp in nanoseconds (since the voraus Real-Time Port timestamp clock epoch). |
|
|
Current system state. See State Machine for details. |
|
|
Indicator for cyclic communication faults, see Cyclic Communication Faults. |
Note: the status port will always be updated last (after all PDO ports were updated) and will emit a notification in each cycle. Therefore the status port’s notifications can be used to synchronize user applications to the EtherCAT cycle.
SDO Port
The real-time port ecat-sdo-port provides acyclic SDO read/write access as RPC services.
Multiple read/write request can be processed concurrently. The responses will be buffered until polled.
The following services are available:
Service |
Request |
Response |
Description |
|---|---|---|---|
|
|
|
Start an SDO download |
|
|
|
Poll SDO download status |
|
|
|
Start an SDO upload |
|
|
|
Poll SDO upload status |
Slave indices are 0-based. Start requests for a slaveIndex that is not part of the ENI configuration are rejected
with INVALID_REQUEST.
The request/response structs contain the following members:
StartSdoWriteRequest
Member |
Type |
Description |
|---|---|---|
|
|
Target slave index in the EtherCAT network. |
|
|
SDO object index. |
|
|
SDO object subindex. |
|
|
Request timeout in milliseconds. |
|
|
Number of payload bytes to write from |
|
|
Write payload buffer. |
StartSdoWriteResponse
Member |
Type |
Description |
|---|---|---|
|
|
Identifier of the started write request. |
PollSdoWriteRequest
Member |
Type |
Description |
|---|---|---|
|
|
Identifier returned by start call. |
PollSdoWriteResponse
Member |
Type |
Description |
|---|---|---|
|
|
True when the write request has finished. |
|
|
True when the write finished without SDO error. |
|
|
SDO abort code (valid when |
StartSdoReadRequest
Member |
Type |
Description |
|---|---|---|
|
|
Target slave index in the EtherCAT network. |
|
|
SDO object index. |
|
|
SDO object subindex. |
|
|
Maximum number of bytes to read. |
|
|
Request timeout in milliseconds. |
StartSdoReadResponse
Member |
Type |
Description |
|---|---|---|
|
|
Identifier of the started read request. |
PollSdoReadRequest
Member |
Type |
Description |
|---|---|---|
|
|
Identifier returned by start call. |
PollSdoReadResponse
Member |
Type |
Description |
|---|---|---|
|
|
True when the read request has finished. |
|
|
True when the read finished without SDO error. |
|
|
SDO abort code (valid when |
|
|
Number of valid bytes in |
|
|
Read payload buffer. |
The data array capacity is configured via the sdo-max-payload-size application option.
Note: the SDO port is updated from the acyclic EtherCAT thread (non-RT).