[EthercatDevice_XXX]
Description
Get EtherCAT Slave Number on the EtherCAT bus.
Format
int getSlaveNo();
Syntax
EthercatDevice_XXX slave;
slave.getSlaveNo();
Returns
Int: the sequential ID of the specified slave.
Example
#include "Ethercat.h" EthercatMaster master; EthercatDevice_QECR11DF0S slave; void setup(void) { int getSlaveNo; Serial.begin(115200); while (!Serial); master.begin(); slave.attach(0, master); master.start(); getSlaveNo = slave.getSlaveNo(); Serial.println(getSlaveNo); } void loop() {}
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.