Dies ist eine alte Version des Dokuments!


EtherCATInterfaceBase

Summary

Provides set/get methodes for 8, 16 and 32 bit long words.

config

EtherCATInterfaceBase_config.hpp

The following variables need to be adjustet for each new network.

  • numberOfDrives: total number of drives in the Network
  • bytesPerPDOFrameTX: number of bytes used per drive for the tx frame
  • bytesPerPDOFrameRX: number of bytes used per drive for the rx frame

set methodes

The set mthodes check if the given offset is in range and writes the data to the ecmasterlib tx buffer.

void set8bit(uint32_t offsetInByte, uint32_t driveNumber, int8_t payload)

  • offsetInByte: offset within a PDO frame
  • driveNumber: additional offset for all drives with index > 0. (i. e. drive 3 will add an offset off 3*bytesPerPDOFrameTx)
  • payload: the data which is written to the buffer

get methodes

The get methodes check if the given offset is in range and read from the ecmasterlib rx buffer.

uint8_t get8bit(uint32_t offsetInByte, uint32_t driveNumber)

  • offsetInByte: offset within a PDO frame
  • driveNumber: additional offset for all drives with index > 0. (i. e. drive 3 will add an offset off 3*bytesPerPDOFrameRx)