18#ifndef ECMC_ETHERCAT_H_
19#define ECMC_ETHERCAT_H_
89 uint32_t productCode);
94 uint8_t syncMangerIndex);
150 uint16_t slaveBusPosition,
152 uint32_t productCode,
154 uint8_t syncMangerIndex,
157 uint8_t entrySubIndex,
227 uint16_t slaveBusPosition,
229 uint32_t productCode,
231 uint8_t syncMangerIndex,
234 uint8_t entrySubIndex,
237 int updateInRealTime);
273 uint16_t slaveBusPosition,
275 uint8_t entrySubIndex,
318 char *memMapIDString);
348 uint16_t startEntryBusPosition,
349 char *startEntryIDString,
352 char *memMapIDString);
394 size_t entryByteOffset,
395 size_t entryBitOffset,
438 int slaveBusPosition,
439 uint16_t assignActivate,
443 int32_t sync1Shift );
459 int slaveBusPosition);
563 const char *valueBuffer,
595 const char *valueBuffer,
812 int watchdogIntervals);
1021 uint16_t slavePosition,
1022 char *entryIDString,
1023 int updateInRealtime);
1156 char *entryIDString);
1186 uint32_t productCode,
1187 uint32_t revisionNum );
int readEcEntryIDString(int slavePosition, char *entryIDString, uint64_t *value)
Read a value from an EtherCAT entry addressed by slaveBusPosition and entryIdString....
int ecResetError()
Reset error on all EtherCat objects. .
int writeEcEntry(int slaveIndex, int entryIndex, uint64_t value)
Writes a value to an EtherCAT entry. .
int readEcSlaveIndex(int slavePosition, int *value)
Read the object Index of an slave addressed by slaveBusPosition. .
int ecAddSdo(uint16_t slaveBusPosition, uint16_t sdoIndex, uint8_t sdoSubIndex, uint32_t value, int byteSize)
Adds a Service Data Object for writing.
int ecAddDataDT(char *ecPath, size_t entryByteOffset, size_t entryBitOffset, int direction, char *dataType, char *idString)
Adds a data item object to access data directly from EtherCAT domain. This object type only support s...
int ecSetDomAllowOffline(int allow)
Allow domain to be offline.
int ecResetMaster(int masterIndex)
Retry configuring slaves for an selected EtherCAT master. .
int ecAddSlave(uint16_t alias, uint16_t position, uint32_t vendorId, uint32_t productCode)
Adds an EtherCAT slave to the hardware configuration. .
int ecWriteSdo(uint16_t slavePosition, uint16_t sdoIndex, uint8_t sdoSubIndex, uint32_t value, int byteSize)
Write to a Service Data Object.
int ecUseClockRealtime(int useClkRT)
Use CLOCK_REALTIME.
int ecGetSlaveVendorId(uint16_t alias, uint16_t slavePos, uint32_t *result)
Read vendor id of selected ethercat slave.
int ecSlaveConfigWatchDog(int slaveBusPosition, int watchdogDivider, int watchdogIntervals)
Configure Slave watch dog. .
int ecSetDomainFailedCyclesLimit(int cycles)
Set allowed bus cycles in row of none complete domain data transfer. .
int readEcEntry(int slaveIndex, int entryIndex, uint64_t *value)
Read a value from an EtherCAT entry. .
int ecSetMaster(int masterIndex)
Selects EtherCAT master to use. .
int linkEcEntryToEcStatusOutput(int slaveIndex, char *entryIDString)
Links an EtherCAT entry to the ethecat master object for hardware status output .
int ecAddSyncManager(int slaveIndex, int direction, uint8_t syncMangerIndex)
obsolete command. Use ecAddEntryComplete() command instead.
int ecPrintAllHardware()
Prints all hardware connected to selected master. .
int ecWriteSoE(uint16_t slavePosition, uint8_t driveNo, uint16_t idn, size_t byteSize, uint8_t *value)
Write SoE .
int ecSetEcAllowOffline(int allow)
Allow master to be offline.
int ecApplyConfig(int masterIndex)
Apply hardware configuration to master. .
int ecPrintSlaveConfig(int slaveIndex)
Prints hardware configuration for a selected slave. .
int ecGetMemMapId(char *memMapIDString, int *id)
Get index of a memmap object based on its name id string.
int ecReadSdo(uint16_t slavePosition, uint16_t sdoIndex, uint8_t sdoSubIndex, int byteSize, uint32_t *value)
Write to a Service Data Object.
int ecVerifySlave(uint16_t alias, uint16_t slavePos, uint32_t vendorId, uint32_t productCode, uint32_t revisionNum)
Verfy slave at position.
int ecGetSlaveRevisionNum(uint16_t alias, uint16_t slavePos, uint32_t *result)
revision number id of selected ethercat slave
int ecGetSlaveSerialNum(uint16_t alias, uint16_t slavePos, uint32_t *result)
Read serial number of selected ethercat slave.
int ecAddMemMap(uint16_t startEntryBusPosition, char *startEntryIDString, size_t byteSize, int direction, char *memMapIDString)
Adds a memory map object to access data directly from EtherCAT domain. Support for this syntax might...
int readEcMemMap(const char *memMapIDString, uint8_t *data, size_t bytesToRead, size_t *bytesRead)
Read EtherCAT memory map object.
int ecSetDiagnostics(int enable)
Enable EtherCAT bus diagnostics. .
int ecAddEntry(uint16_t slaveBusPosition, uint32_t vendorId, uint32_t productCode, int direction, uint8_t syncMangerIndex, uint16_t pdoIndex, uint16_t entryIndex, uint8_t entrySubIndex, char *datatype, char *entryIDString, int updateInRealTime)
Adds an EtherCAT slave to the hardware configuration. .
int ecReadSoE(uint16_t slavePosition, uint8_t driveNo, uint16_t idn, size_t byteSize, uint8_t *value)
Read SoE .
int ecVerifySdo(uint16_t slavePosition, uint16_t sdoIndex, uint8_t sdoSubIndex, uint32_t verValue, int byteSize)
Verify a Service Data Object.
int readEcEntryIndexIDString(int slavePosition, char *entryIDString, int *value)
Read the object Index of an entry addressed by slaveBusPosition and entryIdString....
int writeEcEntryIDString(int slaveBusPosition, char *entryIdString, uint64_t value)
Writes a value to an EtherCAT entry addressed by slaveBusPosition and entryIdString....
int ecAddSdoComplete(uint16_t slaveBusPosition, uint16_t sdoIndex, const char *valueBuffer, int byteSize)
Adds a Service Data Object for writing.
int ecAddDomain(int rateCycles, int offsetCycles)
Add domain.
int ecGetSlaveProductCode(uint16_t alias, uint16_t slavePos, uint32_t *result)
Read product code of selected ethercat slave.
int ecAddPdo(int slaveIndex, int syncManager, uint16_t pdoIndex)
obsolete command. Use ecAddEntryComplete() command instead.
int ecEnablePrintouts(int value)
Enable diagnostic printouts from EtherCAT objects. .
int ecSelectReferenceDC(int masterIndex, int slaveBusPosition)
Select EtherCAT reference clock. .
int ecSetEntryUpdateInRealtime(uint16_t slavePosition, char *entryIDString, int updateInRealtime)
Set update in realtime bit for an entry.
int ecAddSdoDT(uint16_t slavePosition, uint16_t sdoIndex, uint8_t sdoSubIndex, char *valueString, char *datatype)
Adds a Service Data Object for writing.
int ecSlaveConfigDC(int slaveBusPosition, uint16_t assignActivate, uint32_t sync0Cycle, int32_t sync0Shift, uint32_t sync1Cycle, int32_t sync1Shift)
Configure slave DC clock. .
int ecAddSdoBuffer(uint16_t slavePosition, uint16_t sdoIndex, uint8_t sdoSubIndex, const char *valueBuffer, int byteSize)
Adds a Service Data Object for writing.
int ecSetDelayECOkAtStartup(int milliseconds)
Delay ethercat OK status for a time.
int ecAddEntryComplete(uint16_t slaveBusPosition, uint32_t vendorId, uint32_t productCode, int direction, uint8_t syncMangerIndex, uint16_t pdoIndex, uint16_t entryIndex, uint8_t entrySubIndex, uint8_t bits, char *entryIDString, int signedValue)
int ecAddSdoAsync(uint16_t slaveBusPosition, uint16_t entryIndex, uint8_t entrySubIndex, char *datatype, char *idString)
Adds an async SDO object. .
int ecAddMemMapDT(char *ecPath, size_t byteSize, int direction, char *dataType, char *memMapIDString)
Adds a memory map object to access data directly from EtherCAT domain. This is the preferred syntax....