我想找...

搜尋

分享

目錄

EthercatDevice.readSII8()

[Ethercat Device]

描述

Read 8-bit data of SII EEPROM starting from the specified offset for the slave device.

語法

uint8_t readSII8(uint32_t offset, uint32_t timeout_ms = 500);

參數

  • [in] uint32_t offset
    The offset value of SII EEPROM for such EtherCAT slave device.
  • [in] uint32_t timeout_ms
    Timeout in milliseconds.

回傳值

Return the 8-bit data of SII EEPROM.

備註

This function must be called after a successful execution of EthercatMaster::begin(). This function is blocking and cannot be called within the Cyclic Callback.

範例

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_Generic slave;

void setup() {
    int readSII8;
  
    Serial.begin(115200);
    while (!Serial);
  
    master.begin();
    slave.attach(0, master);
    master.start();
  
    readSII8 = slave.readSII8(0);
    Serial.println(readSII8);
}

void loop() {
    // ...
}

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

返回頂端