[Ethercat Master]
Description
Unregister Error Callback Function.
Syntax
void detachErrorCallback();
Parameters
None.
Returns
None.
Comment
This function must be called before EthercatMaster::begin()
or after EthercatMaster::end()
.
Example
#include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void ErrorCallback(uint32_t errorcode) { } void setup() { master.attachErrorCallback(ErrorCallback); // ErrorCallback Function. master.begin(); slave.attach(0, master); master.start(1000000, ECAT_SYNC); // 1000000 ns = 1 ms delay(5000); master.stop(); master.detachEventCallback(); master.end(); } void loop() { }
Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.