我想找...

搜尋

分享

目錄

EthercatDevice.getSoEChannels()

[Ethercat Device]

描述

Get the number of Servo Drive Profile over EtherCAT (SoE) channels supported by the EtherCAT slave device.

語法

int getSoEChannels();

回傳值

Return the number of SoE channels supported by the EtherCAT slave device. 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.println(slave.getSoEChannels());
}

void loop() {
  // put your main code here, to run repeatedly:

}

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

返回頂端