[Ethercat Device]
Description
Read 64-bit input process data which starting from the specified offset for such EtherCAT slave device.
Syntax
uint64_t pdoRead64(uint32_t offset);
Parameters
[in] uint32_t offset
The offset value of input process data for such EtherCAT slave device.
Return Value
Return the 64-bit input process data.
Comment
This function must be called after a successful execution of EthercatMaster::start()
. 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); master.start(1000000); } void loop() { Serial.print("Value: "); uint64_t value = slave.pdoRead64(0); char buffer[21]; sprintf(buffer, "%llu", value); Serial.println(buffer); delay(1000); }
Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.