Inhaltsverzeichnis

EtherCATInterfaceBase

Summary

This interface provides the base class for all interface classes. It mainly provides set and get methods for 8, 16, and 32 bit long data. The get methods calculate the correct offset of the receive buffer of the „ecmasterlib“ and returns the data. The set methods also calculate the offset and write the data into the transmit buffer of „ecmasterlib“.

Configuration

EtherCATInterfaceBase_config.hpp

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

Set Methods

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)

Get Methods

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)