[Ethercat Master]
Description
Get the Global Shift Time for DC-Synchronous mode. For the definition of Global Shift Time, please refer to 1.5 Synchronization.
Syntax
int getShiftTime();
Parameters
None.
Returns
Return the Global Shift Time, in nanoseconds.
Comment
This function must be called after a successful execution of EthercatMaster::start()
and before EthercatMaster::stop()
. This function is non-blocking and can be called within the callback functions.
Example
#include "Ethercat.h" EthercatMaster master; EthercatDevice_Generic slave; void setup() { Serial.begin(115200); master.begin(); slave.attach(0, master); slave.setDc(1000000); master.start(1000000); Serial.print("Global Shift Time: "); Serial.println(master.getShiftTime()); } void loop() { // ... }
Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.