サイト内検索

検索

Shares

Table of Content

EthercatDevice.isSupportDC()

[Ethercat Device]

説明

EtherCATスレーブデバイスが分散クロック(DC)をサポートするかどうかを決定します。

構文

int isSupportDC();

媒介変数

なし

戻り値

EtherCATスレーブデバイスが DCをサポートしているかどうかを返します。正の値はサポートを示し、0 はサポートなしを示し、負の値は error codeを示します。.

備考

この関数は、 EthercatMaster::begin()が正常に実行された後に呼び出す必要があります。この関数はブロッキングされていないため、循環コールバック内で呼び出すことができます。

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_Generic slave;

void setup() {
  Serial.begin(115200);

  master.begin();
  slave.attach(0, master);

  Serial.println(slave.isSupportDC());
}

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

}

詳細は EtherCAT Library User Manual QEC EtherCAT命令とAPI使用法参照

上部へスクロール