I want to find...

Search

Shares

Table of Content

EthercatDevice.readSII16()

[Ethercat Device]

Description

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

Syntax

uint16_t readSII16(uint32_t offset, uint32_t timeout_ms = 500);

Parameters

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

Return Value

Return the 16-bit data of SII EEPROM.

Comment

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

Example

#include "Ethercat.h"

EthercatMaster master;
EthercatDevice_Generic slave;

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

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

void loop() {
  Serial.print("Value: ");
  Serial.println(slave.readSII16(0), HEX);
  delay(1000);
}

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

Leave a Comment

Scroll to Top