Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
mlpiEthercatLib.h
Go to the documentation of this file.
1 #ifndef __MLPIETHERCATLIB_H__
2 #define __MLPIETHERCATLIB_H__
3 
4 // -----------------------------------------------------------------------
5 // MLPI - <mlpiEthercatLib.h>
6 // -----------------------------------------------------------------------
7 // Copyright (c) 2017 Bosch Rexroth. All rights reserved.
8 // Redistribution and use in source and binary forms of this MLPI software
9 // (SW) provided to you, with or without modification, are permitted
10 // without prior approval provided that the following conditions are met:
11 //
12 // 1. Redistributions of source code of SW must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // 2. Redistributions in binary form of SW must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 //
19 // 3. User recognizes and acknowledges that it acquires no right,
20 // title or interest in or to any of the names or trademarks used in
21 // connection with the SW ("names") by virtue of this License and waives
22 // any right to or interest in the names. User recognizes and acknowledges
23 // that names of companies or names or products of companies displayed
24 // in the documentation of SW to indicate the interoperability of products
25 // with the SW are the names of their respective owners. The use of such
26 // names in the documentation of SW does not imply any sponsorship,
27 // approval, or endorsement by such companies of this product.
28 //
29 // 4. Modified code versions, i.e. any addition to or deletion from
30 // the substance or structure of the original code of the SW running
31 // the MLPI must be plainly marked as such and must not be misrepresented
32 // as being original SW.
33 //
34 // 5. The SW may only be used in connection with a Bosch Rexroth product.
35 //
36 // THIS INFORMATION IS PROVIDED BY BOSCH REXROTH CORPORATION "AS IS"
37 // AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING
38 // (BUT NOTLIMITED TO) ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
39 // FITNESS FOR ANY PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WHILE THE
40 // INFORMATION PROVIDED IS BELIEVED TO BE ACCURATE, IT MAY INCLUDE
41 // ERRORS OR INACCURACIES.
42 // SUBJECT TO COMPULSORY STATUTORY PROVISIONS OF THE GERMAN LAW AS
43 // THE APPLICABLE LAW FOR THIS LICENSE BOSCH REXROTH CORPORATION WILL
44 // NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF
45 // THE SOFTWARE DISTRIBUTED HEREUNDER, INCLUDING BUT NOT LIMITED TO
46 // DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES.
47 // -----------------------------------------------------------------------
48 //
58 //
59 // -----------------------------------------------------------------------
60 
61 
121 
122 
128 
134 
140 
146 
152 
317 
322 
323 
324 
325 
326 // -----------------------------------------------------------------------
327 // GLOBAL INCLUDES
328 // -----------------------------------------------------------------------
329 #include "mlpiGlobal.h"
330 
331 
332 
333 // -----------------------------------------------------------------------
334 // GLOBAL CONSTANTS
335 // -----------------------------------------------------------------------
337 #define MLPI_ETHERCAT_MAX_ESC_PORTS ( 4 )
338 
340 #define MLPI_ETHERCAT_MAX_SLAVE_NAME_LEN ( 128 )
341 
343 #define MLPI_ETHERCAT_MAX_VENDOR_DATA_STRING_LEN ( 128 )
344 
346 #define MLPI_ETHERCAT_MAX_PROCESS_DATA_SECTIONS ( 4 )
347 
348 
349 // -----------------------------------------------------------------------
350 // GLOBAL ENUMERATIONS
351 // -----------------------------------------------------------------------
352 
356 {
360 
364 {
369 
372 typedef enum MlpiEthercatState
373 {
381 
385 {
393 
397 {
401 
402 
403 
404 // -----------------------------------------------------------------------
405 // GLOBAL TYPEDEFS
406 // -----------------------------------------------------------------------
407 
408 // message packing follows 8 byte natural alignment
409 #if !defined(TARGET_OS_VXWORKS)
410 #pragma pack(push,8)
411 #endif
412 
423 typedef struct MlpiEthercatIdentityInfo
424 {
425  ULONG vendorId;
426  ULONG productCode;
427  ULONG revisionNumber;
428  ULONG serialNumber;
430 
439 typedef struct MlpiEthercatMailboxInfo
440 {
441  ULONG sizeIn;
442  ULONG sizeOut;
444 
453 typedef struct MlpiEthercatMemoryInfo
454 {
455  ULONG offset;
456  ULONG size;
458 
492 typedef struct MlpiEthercatSlaveOnlineInfo
493 {
494  USHORT autoIncAddr;
495  USHORT ethercatAddr;
496  USHORT stationAlias;
497  USHORT identifyValue;
498  ULONG slaveHandle;
499  ULONG portSlaveHandles[MLPI_ETHERCAT_MAX_ESC_PORTS];
500  MlpiEthercatIdentityInfo slaveIdentity;
501  UCHAR escType;
502  UCHAR escRevision;
503  USHORT escBuild;
504  USHORT escFeatures;
505  UCHAR portDescriptor;
506  UCHAR reserved01;
507  USHORT alStatus;
508  USHORT alStatusCode;
509  USHORT mbxProtocols;
510  USHORT dlStatus;
511  USHORT portState;
512  USHORT previousPort;
513  ULONG systemTimeDifference;
514  ULONG slaveDelay;
515  ULONG propagationDelay;
516  ULONG reserved02[4];
517  BOOL8 dcSupport;
518  BOOL8 dc64Support;
519  BOOL8 isRefClock;
520  BOOL8 lineCrossed;
522 
554 typedef struct MlpiEthercatSlaveConfigInfo
555 {
556  USHORT autoIncAddr;
557  USHORT ethercatAddr;
558  USHORT identifyAdo;
559  USHORT identifyValue;
560  ULONG slaveHandle;
561  ULONG hcGroupIdx;
562  USHORT previousEthercatAddr;
563  USHORT previousPort;
564  MlpiEthercatIdentityInfo slaveIdentity;
566  ULONG mbxProtocols;
567  MlpiEthercatMailboxInfo mbxStandard;
568  MlpiEthercatMailboxInfo mbxBootstrap;
571  USHORT numProcessVarsIn;
572  USHORT numProcessVarsOut;
573  UCHAR portDescriptor;
574  UCHAR reserved01[3];
575  USHORT wkcStateDiagOffsIn[MLPI_ETHERCAT_MAX_PROCESS_DATA_SECTIONS];
576  USHORT wkcStateDiagOffsOut[MLPI_ETHERCAT_MAX_PROCESS_DATA_SECTIONS];
577  ULONG reserved02[3];
578  BOOL8 isPresent;
579  BOOL8 isHcGroupPresent;
580  BOOL8 dcSupport;
582 
598 typedef struct MlpiEthercatSoeElementFlags
599 {
600  BOOL8 dataState;
601  BOOL8 name;
602  BOOL8 attribute;
603  BOOL8 unit;
604  BOOL8 minValue;
605  BOOL8 maxValue;
606  BOOL8 value;
607  BOOL8 defaultValue;
609 
619 typedef struct MlpiEthercatVendorData
620 {
625 
634 typedef struct MlpiEthercatVendorInfo
635 {
636  MlpiEthercatVendorData member;
637  MlpiEthercatVendorData predecessor;
639 
652 typedef struct MlpiEthercatSlaveStatistics
653 {
654  USHORT rxErrorCounter[MLPI_ETHERCAT_MAX_ESC_PORTS];
655  UCHAR fwdRxErrorCounter[MLPI_ETHERCAT_MAX_ESC_PORTS];
656  UCHAR ecatProcUnitErrorCounter;
657  UCHAR pdiErrorCounter;
658  USHORT alStatusCode;
659  UCHAR lostLinkCounter[MLPI_ETHERCAT_MAX_ESC_PORTS];
661 
670 typedef struct MlpiEthercatSlaveBusScanInfo
671 {
672  ULONG busScanStatus;
673  MlpiEthercatIdentityInfo slaveIdentity;
675 
676 
677 #if !defined(TARGET_OS_VXWORKS)
678 #pragma pack(pop)
679 #endif
680 
682 
683 
684 
685 // -----------------------------------------------------------------------
686 // GLOBAL EXPORTS
687 // -----------------------------------------------------------------------
688 #ifdef MLPI_API
689  #undef MLPI_API
690 #endif
691 
692 #if defined(TARGET_OS_WINNT)
693  #if defined(MLPI_EXPORTS)
694  #define MLPI_API __declspec(dllexport)
695  #elif defined(MLPI_IMPORTS)
696  #define MLPI_API __declspec(dllimport)
697  #else
698  #define MLPI_API
699  #endif
700 #else
701  #if defined(MLPI_EXPORTS)
702  #define MLPI_API __attribute__ ((visibility("default")))
703  #elif defined(MLPI_IMPORTS)
704  #define MLPI_API
705  #else
706  #define MLPI_API
707  #endif
708 #endif
709 
710 
711 #ifdef __cplusplus
712 extern "C" {
713 #endif
714 
732  MLPI_API MLPIRESULT mlpiEthercatGetTopologyStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatTopologyStatus *topologyStatus, ULONG *numChanges);
733 
751 MLPI_API MLPIRESULT mlpiEthercatGetConfigFiles(const MLPIHANDLE connection, const ULONG interfaceNumber, const WCHAR16 *iniPathFileName, const WCHAR16 *eniPathFileName);
752 
770 MLPI_API MLPIRESULT mlpiEthercatSetConfigFiles(const MLPIHANDLE connection, const ULONG interfaceNumber, const WCHAR16 *iniPathFileName, const WCHAR16 *eniPathFileName);
771 
792 MLPI_API MLPIRESULT mlpiEthercatControl(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG command, UCHAR *dataIn, const ULONG dataSizeIn, UCHAR *dataOut, const ULONG dataSizeOut, ULONG *dataSizeOutRet);
793 
809 MLPI_API MLPIRESULT mlpiEthercatGetMasterState(const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatState *state);
810 
826 MLPI_API MLPIRESULT mlpiEthercatSetMasterState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatState state);
827 
843 MLPI_API MLPIRESULT mlpiEthercatGetMasterStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *status);
844 
860 MLPI_API MLPIRESULT mlpiEthercatGetNumConfiguredSlaves(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves);
861 
877 MLPI_API MLPIRESULT mlpiEthercatGetNumConnectedSlaves(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves);
878 
900 MLPI_API MLPIRESULT mlpiEthercatGetSlaveState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, USHORT *currentState, USHORT *requestedState);
901 
921 MLPI_API MLPIRESULT mlpiEthercatSetSlaveState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const MlpiEthercatState slaveState);
922 
942 MLPI_API MLPIRESULT mlpiEthercatGetSlaveStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, ULONG *status);
943 
964 MLPI_API MLPIRESULT mlpiEthercatGetSlaveOnlineInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveOnlineInfo *slaveOnlineInfo);
965 
986 MLPI_API MLPIRESULT mlpiEthercatGetSlaveConfigInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveConfigInfo *slaveConfigInfo);
987 
1020 MLPI_API MLPIRESULT mlpiEthercatGetSlavePortState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, USHORT *portState);
1021 
1047 MLPI_API MLPIRESULT mlpiEthercatReadSlaveRegister(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT registerOffset, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1048 
1074 MLPI_API MLPIRESULT mlpiEthercatWriteSlaveRegister(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT registerOffset, UCHAR *data, const ULONG dataSize);
1075 
1095 MLPI_API MLPIRESULT mlpiEthercatResetSlaveController(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address);
1096 
1122 MLPI_API MLPIRESULT mlpiEthercatReadSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT eepromOffset, USHORT *data, const ULONG numElements, ULONG *numElementsRet);
1123 
1147 MLPI_API MLPIRESULT mlpiEthercatWriteSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT eepromOffset, USHORT *data, const ULONG numElements);
1148 
1168 MLPI_API MLPIRESULT mlpiEthercatReloadSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address);
1169 
1191 MLPI_API MLPIRESULT mlpiEthercatAssignSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const BOOL8 slavePdiAccessEnable, const BOOL8 forceAssign);
1192 
1212 MLPI_API MLPIRESULT mlpiEthercatCheckSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, BOOL8 *slavePdiAccessActive);
1213 
1235 MLPI_API MLPIRESULT mlpiEthercatReadSlaveIdentification(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT ado, USHORT *value);
1236 
1257 MLPI_API MLPIRESULT mlpiEthercatGetSlaveStatistics(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveStatistics *slaveStatistics);
1258 
1272 MLPI_API MLPIRESULT mlpiEthercatResetSlaveStatistics(const MLPIHANDLE connection, const ULONG interfaceNumber);
1273 
1289 MLPI_API MLPIRESULT mlpiEthercatSetSlaveStatisticsPeriod(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG periodMs);
1290 
1306 MLPI_API MLPIRESULT mlpiEthercatGetSlaveStatisticsPeriod(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *periodMs);
1307 
1333 MLPI_API MLPIRESULT mlpiEthercatCoeGetOdList(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const MlpiEthercatOdListType listType, USHORT *indicies, const ULONG numElements, ULONG *numElementsRet);
1334 
1360 MLPI_API MLPIRESULT mlpiEthercatCoeGetObjectDescription(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1361 
1391 MLPI_API MLPIRESULT mlpiEthercatCoeGetEntryDescription(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const UCHAR valueInfo, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1392 
1425 MLPI_API MLPIRESULT mlpiEthercatCoeSdoUpload(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const ULONG flags, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1426 
1454 MLPI_API MLPIRESULT mlpiEthercatCoeSdoDownload(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const ULONG flags, UCHAR *data, const ULONG dataSize);
1455 
1494 MLPI_API MLPIRESULT mlpiEthercatSoeRead(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const UCHAR driveNumber, MlpiEthercatSoeElementFlags *elementFlags, const USHORT idn, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1495 
1532 MLPI_API MLPIRESULT mlpiEthercatSoeWrite(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const UCHAR driveNumber, MlpiEthercatSoeElementFlags *elementFlags, const USHORT idn, UCHAR *data, const ULONG dataSize);
1533 
1549 MLPI_API MLPIRESULT mlpiEthercatGetVendorInfo(const MLPIHANDLE connection, const ULONG vendorId, MlpiEthercatVendorInfo *vendorInfo);
1550 
1568 MLPI_API MLPIRESULT mlpiEthercatGenerateEsi(const MLPIHANDLE connection, const WCHAR16 *eepromPathFileName, const WCHAR16 *esiPathFileName, const ULONG flags);
1569 
1585 MLPI_API MLPIRESULT mlpiEthercatStartBusScan(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG flags);
1586 
1604 MLPI_API MLPIRESULT mlpiEthercatGetBusScanStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, MLPIRESULT *status, ULONG *slaveCount);
1605 
1627 MLPI_API MLPIRESULT mlpiEthercatGetBusScanSlaveInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const USHORT autoIncAddr, MlpiEthercatSlaveBusScanInfo *slaveBusScanInfo, const ULONG numElements, ULONG *numElementsRet);
1628 
1652 MLPI_API MLPIRESULT mlpiEthercatGetProcessData(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatProcessDataType pdType, const ULONG offset, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet);
1653 
1675 MLPI_API MLPIRESULT mlpiEthercatSetProcessData(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatProcessDataType pdType, const ULONG offset, UCHAR *data, const ULONG dataSize);
1676 
1694 MLPI_API MLPIRESULT mlpiEthercatGetProcessDataSize(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numOutputBytes, ULONG *numInputBytes);
1695 
1696 
1697 #ifdef __cplusplus
1698 }
1699 #endif
1700 
1701 
1702 
1703 #endif // endof: #ifndef __MLPIETHERCATLIB_H__
Physical addressing.
struct MlpiEthercatIdentityInfo MlpiEthercatIdentityInfo
This structure containing slave information.
MLPIRESULT mlpiEthercatGetTopologyStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatTopologyStatus *topologyStatus, ULONG *numChanges)
This function returns the status of topology detection.
unsigned char UCHAR
1 byte unsigned integer
Definition: mlpiGlobal.h:160
struct MlpiEthercatSlaveStatistics MlpiEthercatSlaveStatistics
This structure defines the statistic information of an EtherCAT slave.
MLPIRESULT mlpiEthercatGetSlaveStatisticsPeriod(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *periodMs)
This function returns the update period of internal slave statistics collection.
MLPIRESULT mlpiEthercatSetConfigFiles(const MLPIHANDLE connection, const ULONG interfaceNumber, const WCHAR16 *iniPathFileName, const WCHAR16 *eniPathFileName)
This function sets the master configuration (files will be loaded from local drive of control)...
MLPIRESULT mlpiEthercatSetSlaveStatisticsPeriod(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG periodMs)
This function sets the update period of internal slave statistics collection.
MLPIRESULT mlpiEthercatGetConfigFiles(const MLPIHANDLE connection, const ULONG interfaceNumber, const WCHAR16 *iniPathFileName, const WCHAR16 *eniPathFileName)
This function returns the master configuration (files will be stored on local drive of control)...
MLPIRESULT mlpiEthercatGetProcessData(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatProcessDataType pdType, const ULONG offset, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function reads process data (consistent) and returns them as byte stream.
MLPIRESULT mlpiEthercatReadSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT eepromOffset, USHORT *data, const ULONG numElements, ULONG *numElementsRet)
This function reads data from the EEPROM of a specific device.
#define MLPI_ETHERCAT_MAX_VENDOR_DATA_STRING_LEN
Maximum number of slave ports.
MlpiEthercatState
This enumeration represents the specific states of the EtherCAT State Machine.
signed char BOOL8
1 byte boolean
Definition: mlpiGlobal.h:158
unsigned short USHORT
2 byte unsigned integer
Definition: mlpiGlobal.h:162
MLPIRESULT mlpiEthercatWriteSlaveRegister(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT registerOffset, UCHAR *data, const ULONG dataSize)
This function writes data into the EtherCAT Slave Controller memory of a specific device...
MLPIRESULT mlpiEthercatGetBusScanStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, MLPIRESULT *status, ULONG *slaveCount)
This function returns the status of the bus scan.
Only startup parameter objects.
Only stored for a device replacement objects.
MlpiEthercatTopologyStatus
This enumeration indicates the status of topology detection.
MLPIRESULT mlpiEthercatGetNumConfiguredSlaves(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves)
This function returns the number of configured slaves.
MLPIRESULT mlpiEthercatSetProcessData(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatProcessDataType pdType, const ULONG offset, UCHAR *data, const ULONG dataSize)
This function writes byte stream to process data (consistent).
wchar_t WCHAR16
UTF16 string.
Definition: mlpiGlobal.h:193
unsigned int ULONG
4 byte unsigned integer
Definition: mlpiGlobal.h:165
struct MlpiEthercatSoeElementFlags MlpiEthercatSoeElementFlags
With this structure each element of an IDN can be addressed. The ElementFlags indicating which elemen...
MLPIRESULT mlpiEthercatGetBusScanSlaveInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const USHORT autoIncAddr, MlpiEthercatSlaveBusScanInfo *slaveBusScanInfo, const ULONG numElements, ULONG *numElementsRet)
This function returns the slave information collected during bus scan.
Topology detection still pending / in progress.
MLPIRESULT mlpiEthercatCoeGetOdList(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const MlpiEthercatOdListType listType, USHORT *indicies, const ULONG numElements, ULONG *numElementsRet)
This function gets a list of object indices which are available in a EtherCAT CoE device...
Only pdo mappable objects.
struct MlpiEthercatSlaveOnlineInfo MlpiEthercatSlaveOnlineInfo
This structure defines the slave online info and is used in mlpiEthercatGetSlaveOnlineInfo.
MLPIRESULT mlpiEthercatCoeSdoDownload(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const ULONG flags, UCHAR *data, const ULONG dataSize)
This function performs a CoE SDO download from the master to an EtherCAT slave device.
MLPIRESULT mlpiEthercatWriteSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT eepromOffset, USHORT *data, const ULONG numElements)
This function writes data into the EEPROM of a specific device.
MLPIRESULT mlpiEthercatGetSlaveOnlineInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveOnlineInfo *slaveOnlineInfo)
This function returns information about a slave connected to the EtherCAT bus.
MLPIRESULT mlpiEthercatGetProcessDataSize(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numOutputBytes, ULONG *numInputBytes)
This function returns the size of the current process data image, e.g. use for diagnosis purpose...
MLPIRESULT mlpiEthercatGenerateEsi(const MLPIHANDLE connection, const WCHAR16 *eepromPathFileName, const WCHAR16 *esiPathFileName, const ULONG flags)
This function generates an EtherCAT Slave Information (Device Description) from an EEPROM image...
MLPIRESULT mlpiEthercatSoeRead(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const UCHAR driveNumber, MlpiEthercatSoeElementFlags *elementFlags, const USHORT idn, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function reads Sercos parameters.
#define MLPI_ETHERCAT_MAX_ESC_PORTS
Maximum number of slave ports.
MLPIRESULT mlpiEthercatGetSlaveStatistics(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveStatistics *slaveStatistics)
This function returns the slave&#39;s statistics counter. Counter can be used to detect errors on Etherne...
MLPIRESULT mlpiEthercatGetMasterStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *status)
This function returns the master status.
Topology verified and valid (e.g. elements of MlpiEthercatSlaveOnlineInfo can be used for drawing bus...
Lengths of each list type.
MLPIRESULT mlpiEthercatGetSlaveState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, USHORT *currentState, USHORT *requestedState)
This function returns the current and requested slave state.
MLPIRESULT mlpiEthercatGetMasterState(const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatState *state)
This function returns the current master state.
MLPIRESULT mlpiEthercatControl(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG command, UCHAR *dataIn, const ULONG dataSizeIn, UCHAR *dataOut, const ULONG dataSizeOut, ULONG *dataSizeOutRet)
This function enables raw data exchange with the EtherCAT master stack.
MLPIRESULT mlpiEthercatStartBusScan(const MLPIHANDLE connection, const ULONG interfaceNumber, const ULONG flags)
This function starts the bus scan procedure of the master.
MLPIRESULT mlpiEthercatReloadSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address)
This function causes a specific slave to reload its EEPROM values to ESC registers.
#define MLPI_ETHERCAT_MAX_SLAVE_NAME_LEN
Maximum number of slave ports.
MLPIRESULT mlpiEthercatSoeWrite(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const UCHAR driveNumber, MlpiEthercatSoeElementFlags *elementFlags, const USHORT idn, UCHAR *data, const ULONG dataSize)
This function writes Sercos parameters.
struct MlpiEthercatVendorData MlpiEthercatVendorData
This structure defines the information of the vendor of the EtherCAT master.
Only pdo mappable objects that can be changed.
MLPIRESULT mlpiEthercatGetVendorInfo(const MLPIHANDLE connection, const ULONG vendorId, MlpiEthercatVendorInfo *vendorInfo)
This function returns the vendor information which is connected to a specific vendor id...
MLPIRESULT mlpiEthercatAssignSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const BOOL8 slavePdiAccessEnable, const BOOL8 forceAssign)
This function assigns the slave EEPROM either to Slave PDI or EtherCAT Master.
MlpiEthercatAddressType
This enumeration specifies the mode of addressing.
MlpiEthercatProcessDataType
This enumeration specifies the type of process data.
MLPIRESULT mlpiEthercatGetSlavePortState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, USHORT *portState)
This function returns the state of the slave ports.
struct MlpiEthercatMailboxInfo MlpiEthercatMailboxInfo
This structure containing mailbox information.
MLPIRESULT mlpiEthercatCheckSlaveEeprom(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, BOOL8 *slavePdiAccessActive)
This function checks if the slave EEPROM is marked for slave PDI access or not.
MLPIRESULT mlpiEthercatResetSlaveStatistics(const MLPIHANDLE connection, const ULONG interfaceNumber)
This function clears all error registers (statistics counter) in all slaves.
Incremental addressing.
MLPIRESULT mlpiEthercatGetSlaveConfigInfo(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveConfigInfo *slaveConfigInfo)
This function returns information about a slave configured within the ENI file.
MLPIRESULT mlpiEthercatReadSlaveIdentification(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT ado, USHORT *value)
This function reads the identification value from a slave.
#define MLPI_ETHERCAT_MAX_PROCESS_DATA_SECTIONS
Maximum number of supported process data sections.
struct MlpiEthercatSlaveConfigInfo MlpiEthercatSlaveConfigInfo
This structure defines the the slave config info and is used in mlpiEthercatGetSlaveConfigInfo.
MLPIRESULT mlpiEthercatCoeGetObjectDescription(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function gets the object description for a specific object (SDO) in EtherCAT CoE device...
unsigned long MLPIHANDLE
common MLPI-API handle value
Definition: mlpiGlobal.h:206
MLPIRESULT mlpiEthercatGetNumConnectedSlaves(const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves)
This function returns the number of connected slaves.
MLPIRESULT mlpiEthercatReadSlaveRegister(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT registerOffset, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function reads data from the EtherCAT Slave Controller memory of a specific device.
MLPIRESULT mlpiEthercatSetMasterState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatState state)
This function sets the a new master state.
struct MlpiEthercatVendorInfo MlpiEthercatVendorInfo
This structure defines the member and predecessor of the vendor.
MLPIRESULT mlpiEthercatCoeGetEntryDescription(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const UCHAR valueInfo, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function gets the object entry description for a specific object (SDO) in EtherCAT CoE device...
MLPIRESULT mlpiEthercatGetSlaveStatus(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, ULONG *status)
This function returns the slave status.
MLPIRESULT mlpiEthercatSetSlaveState(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const MlpiEthercatState slaveState)
This function sets a new slave state.
struct MlpiEthercatSlaveBusScanInfo MlpiEthercatSlaveBusScanInfo
This structure containing information (retrieved while bus scan) about a slave connected to the Ether...
struct MlpiEthercatMemoryInfo MlpiEthercatMemoryInfo
This structure describing a specific memory area.
int MLPIRESULT
common MLPI-API return value
Definition: mlpiGlobal.h:198
MLPIRESULT mlpiEthercatResetSlaveController(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address)
This function resets a ESC (e.g., ET1100, ET1200, and IP Core) if it is capable of issuing a hardware...
MlpiEthercatOdListType
This enumeration specifies the type of object dictionary list.
MLPIRESULT mlpiEthercatCoeSdoUpload(const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, const USHORT objectIndex, const UCHAR subIndex, const ULONG flags, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet)
This function performs a CoE SDO upload from an EtherCAT slave device to the master.