OPC UA Server
The EtherCAT Master includes an embedded OPC UA Server running on port 4840 (default). It exposes the EtherCAT process image, master/slave status, and administrative commands.
Information Model
The server exposes the following nodes under the Objects folder:
Master
This object represents the EtherCAT Master itself.
State (Variable, Read-Only): Current state of the master (INIT, PREOP, SAFEOP, OP).
requestState (Method): Request a state transition for the master.
Arguments:
targetState(UInt32)
Slaves
Contains a list of all configured EtherCAT slaves. Each slave is represented as an object with:
State (Variable, Read-Only): Current state of the slave.
VendorId, ProductCode, SerialNumber, SlaveId (Properties): Identity information.
ProcessImage
Access to the cyclic process data (PDOs).
Inputs: Folder containing all input variables read from slaves.
Outputs: Folder containing all output variables written to slaves.
Variables are organized by their names as defined in the ENI file or configuration.
System
System-level information and control.
SystemInfo (Variable): Struct containing current state and error information.
Version (Property): Application version string.
RunsInDummyMode (Variable): True if running without real hardware (‘dummy mode’).
Restart (Method): Restart the EtherCAT master in case of an error.
ContinueWithError (Method): Acknowledge error and try to recover without restart.
Events: The server emits events for log messages (Info, Warning, Error).
CoE (CanOpen over EtherCAT)
Methods for acyclic communication (SDO).
StartSdoWrite (Method): Start an SDO download.
Arguments:
slaveIndex,index,subIndex,data(ByteString),timeoutMs.Returns:
requestId(UInt64).
PollSdoWrite (Method): Poll a started SDO download.
Arguments:
requestId.Returns:
done(Boolean),success(Boolean),abortCode(UInt32).
StartSdoRead (Method): Start an SDO upload.
Arguments:
slaveIndex,index,subIndex,size,timeoutMs.Returns:
requestId(UInt64).
PollSdoRead (Method): Poll a started SDO upload.
Arguments:
requestId.Returns:
done(Boolean),success(Boolean),data(ByteString),abortCode(UInt32).
Note: the data byte strings are in little-endian byte order.