[Ethercat Device]
Description
Determines whether the EtherCAT slave device supports Distributed Clocks (DC).
Syntax
int isSupportDC();
Parameters
None.
Return Value
Return whether the EtherCAT slave device supports DC. A positive value indicates support, 0 indicates no support, and a negative value indicates an error code.
Comment
This function must be called after a successful execution of EthercatMaster::begin()
. This function is non-blocking and can be called within the Cyclic Callback.
Example
#include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void setup() { Serial.begin(115200); master.begin(); slave.attach(0, master); Serial.println(slave.isSupportDC()); } void loop() { // put your main code here, to run repeatedly: }
Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.