我想找...

搜尋

分享

目錄

EthercatDevice.getCoEDetails()

[Ethercat Device]

描述

Get the details about the CAN application protocol over EtherCAT (CoE) supported by the EtherCAT slave device.

語法

int getCoEDetails();

回傳值

Return the details about CoE supported of the EtherCAT slave device.

  • Bit 0: Enable SDO.
  • Bit 1: Enable SDO Info.
  • Bit 2: Enable PDO Assign.
  • Bit 3: Enable PDO Configuration.
  • Bit 4: Enable PDO Upload at startup.
  • Bit 5: Enable SDO complete access.

If the return value is less than 0, it indicates an 錯誤代碼.

備註

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.

範例

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_Generic slave;

void setup() {
  Serial.begin(115200);
  
  master.begin();
  slave.attach(0, master);

  Serial.print("CoE Details: ");
  Serial.println(slave.getCoEDetails());
}

void loop() {
  // ...

}

Please see the EtherCAT Library User Manual for more QEC EtherCAT instructions and API usage.

返回頂端