Skip to content
This is the development version of the documentation. It may change before the next release. See 0.6.x for the latest release.

echocat

EchocatLink is a Link implementation using echocat, an EtherCAT main device written for AUTD3.

Because it handles an Ethernet raw socket, running it on Linux/macOS requires root privileges (or CAP_NET_RAW). On Windows, npcap must be installed in “WinPcap API-compatible mode”.

EchocatLinkOption {
iface,
sync0_period,
pdu_timeout,
state_transition_timeout,
dc_static_sync_iterations,
dc_start_delay,
sync_tolerance,
sync_timeout,
process_data_watchdog,
sleep_strategy,
};
Field Type Description
iface Interface network interface to use. Interface::Auto for automatic selection, Interface::Name(..) to specify by name
sync0_period Duration period of the SYNC0 signal (= the cyclic frame period)
pdu_timeout Duration timeout to wait for the response to a single PDU
state_transition_timeout Duration timeout to wait for an EtherCAT state transition (INIT → PRE-OP → SAFE-OP → OP)
dc_static_sync_iterations u32 number of frames used for DC static drift compensation
dc_start_delay Duration how far ahead of the current bus time the SYNC0 start time is placed
sync_tolerance Duration tolerance considered as synchronization complete
sync_timeout Duration timeout to wait for synchronization to complete
process_data_watchdog Duration time after which a subdevice detects that process data has stopped
sleep_strategy SleepStrategy how to wait for the next cycle

The default sync0_period is 2 ms on Windows and 1 ms elsewhere.

Selects how the RT thread waits for the next cycle.

SleepStrategy::Sleep;
SleepStrategy::Spin {
margin: Duration::from_micros(100),
};
Variant Description
Sleep waits with std::thread::sleep.
Spin { margin } sleeps until margin before the deadline, then spins

The default is Sleep.