|
MLPIRESULT | mlpiEthercatGetTopologyStatus (const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatTopologyStatus *topologyStatus, ULONG *numChanges) |
|
MLPIRESULT | mlpiEthercatGetConfigFiles (const MLPIHANDLE connection, const ULONG interfaceNumber, const WCHAR16 *iniPathFileName, const WCHAR16 *eniPathFileName) |
|
MLPIRESULT | mlpiEthercatGetMasterState (const MLPIHANDLE connection, const ULONG interfaceNumber, MlpiEthercatState *state) |
|
MLPIRESULT | mlpiEthercatGetMasterStatus (const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *status) |
|
MLPIRESULT | mlpiEthercatGetNumConfiguredSlaves (const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves) |
|
MLPIRESULT | mlpiEthercatGetNumConnectedSlaves (const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numSlaves) |
|
MLPIRESULT | mlpiEthercatGetSlaveState (const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, USHORT *currentState, USHORT *requestedState) |
|
MLPIRESULT | mlpiEthercatGetSlaveStatus (const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, ULONG *status) |
|
MLPIRESULT | mlpiEthercatGetSlaveOnlineInfo (const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveOnlineInfo *slaveOnlineInfo) |
|
MLPIRESULT | mlpiEthercatGetSlaveConfigInfo (const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatAddressType addressType, const USHORT address, MlpiEthercatSlaveConfigInfo *slaveConfigInfo) |
|
MLPIRESULT | mlpiEthercatGetVendorInfo (const MLPIHANDLE connection, const ULONG vendorId, MlpiEthercatVendorInfo *vendorInfo) |
|
MLPIRESULT | mlpiEthercatGetBusScanStatus (const MLPIHANDLE connection, const ULONG interfaceNumber, MLPIRESULT *status, ULONG *slaveCount) |
|
MLPIRESULT | mlpiEthercatGetBusScanSlaveInfo (const MLPIHANDLE connection, const ULONG interfaceNumber, const USHORT autoIncAddr, MlpiEthercatSlaveBusScanInfo *slaveBusScanInfo, const ULONG numElements, ULONG *numElementsRet) |
|
MLPIRESULT | mlpiEthercatGetProcessData (const MLPIHANDLE connection, const ULONG interfaceNumber, const MlpiEthercatProcessDataType pdType, const ULONG offset, UCHAR *data, const ULONG dataSize, ULONG *dataSizeRet) |
|
MLPIRESULT | mlpiEthercatGetProcessDataSize (const MLPIHANDLE connection, const ULONG interfaceNumber, ULONG *numOutputBytes, ULONG *numInputBytes) |
|
Contains functions to read information of the EtherCAT master and its slaves.
This function returns the status of topology detection.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | topologyStatus | Status of topology detection. |
[out] | numChanges | Number of topology changes (incremented each time a topology change event occurs). |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Return the status of topology detection.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatTopologyStatus topologyStatus = MLPI_ETHERCAT_TOPOLOGY_STATUS_UNKNOWN;
5 MLPIRESULT result = mlpiEthercatGetTopologyStatus(connection, interfaceNumber, &topologyStatus, &numChanges);
This function returns the master configuration (files will be stored on local drive of control).
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | iniPathFileName | Path and filename of master configuration file (Bosch Rexroth specific). |
[in] | eniPathFileName | Path and filename of EtherCAT network information file. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Return the master configuration (files will be stored on local drive of control).
2 ULONG interfaceNumber = 0;
3 WCHAR16 iniPathFileName[] = L"/USER/EtherCAT.ini";
4 WCHAR16 eniPathFileName[] = L"/USER/EtherCAT.xml";
5 MLPIRESULT result = mlpiEthercatGetConfigFiles(connection, interfaceNumber, iniPathFileName, eniPathFileName);
This function returns the current master state.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | state | Current master state. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the current master state.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatState state = MLPI_ETHERCAT_STATE_UNKNOWN;
4 MLPIRESULT result = mlpiEthercatGetMasterState(connection, interfaceNumber, &state);
This function returns the master status.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | status | Master status. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the master status.
2 ULONG interfaceNumber = 0;
4 MLPIRESULT result = mlpiEthercatGetMasterStatus(connection, interfaceNumber, &status);
This function returns the number of configured slaves.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | numSlaves | Number of configured slaves. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the number of configured slaves.
2 ULONG interfaceNumber = 0;
4 MLPIRESULT result = mlpiEthercatGetNumConfiguredSlaves(connection, interfaceNumber, &numSlaves);
This function returns the number of connected slaves.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | numSlaves | Number of connected slaves. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the number of connected slaves.
2 ULONG interfaceNumber = 0;
4 MLPIRESULT result = mlpiEthercatGetNumConnectedSlaves(connection, interfaceNumber, &numSlaves);
This function returns the current and requested slave state.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | addressType | Address type. |
[in] | address | Slave address (depending on addressType). |
[out] | currentState | Current slave state. |
[out] | requestedState | Requested slave state. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the current and requested slave state.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatAddressType addressType = MLPI_ETHERCAT_AUTO_INCREMENT;
5 USHORT currentState = 0;
6 USHORT requestedState = 0;
7 MLPIRESULT result = mlpiEthercatGetSlaveState(connection, interfaceNumber, addressType, address, ¤tState, &requestedState);
This function returns the slave status.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | addressType | Address type. |
[in] | address | Slave address (depending on addressType). |
[out] | status | Slave status. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the slave status.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatAddressType addressType = MLPI_ETHERCAT_AUTO_INCREMENT;
6 MLPIRESULT result = mlpiEthercatGetSlaveStatus(connection, interfaceNumber, addressType, address, &status);
This function returns information about a slave connected to the EtherCAT bus.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | addressType | Address type. |
[in] | address | Slave address (depending on addressType). |
[out] | slaveOnlineInfo | Slave online information. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get information about a slave connected to the EtherCAT bus.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatAddressType addressType = MLPI_ETHERCAT_AUTO_INCREMENT;
5 MlpiEthercatSlaveOnlineInfo slaveOnlineInfo;
6 memset (&slaveOnlineInfo, 0, sizeof(MlpiEthercatSlaveOnlineInfo));
7 MLPIRESULT result = mlpiEthercatGetSlaveOnlineInfo(connection, interfaceNumber, addressType, address, &slaveOnlineInfo);
This function returns information about a slave configured within the ENI file.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | addressType | Address type. |
[in] | address | Slave address (depending on addressType). |
[out] | slaveConfigInfo | Slave configuration information. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get information about a slave configured within the ENI file.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatAddressType addressType = MLPI_ETHERCAT_AUTO_INCREMENT;
5 MlpiEthercatSlaveConfigInfo slaveConfigInfo;
6 memset (&slaveConfigInfo, 0, sizeof(MlpiEthercatSlaveConfigInfo));
7 MLPIRESULT result = mlpiEthercatGetSlaveConfigInfo(connection, interfaceNumber, addressType, address, &slaveConfigInfo);
This function returns the vendor information which is connected to a specific vendor id.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | vendorId | EtherCAT vendor id. |
[out] | vendorInfo | Vendor information. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Get the vendor information which is connected to a specific vendor id.
3 MlpiEthercatVendorInfo vendorInfo;
4 MLPIRESULT result = mlpiEthercatGetVendorInfo(connection, vendorId, &vendorInfo);
This function returns the status of the bus scan.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | status | Status indicating if bus scan has been executed or not. |
[out] | slaveCount | Number of connected slaves (in case of executed bus scan). |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Return the status of the bus scan.
2 ULONG interfaceNumber = 0;
5 MLPIRESULT result = mlpiEthercatGetBusScanStatus(connection, interfaceNumber, &status, &slaveCount);
This function returns the slave information collected during bus scan.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | autoIncAddr | Auto increment address from which on slave infos should be returned. |
[out] | slaveBusScanInfo | Pointer to slave infos. |
[in] | numElements | Number of elements provided by slaveBusScanInfo. |
[out] | numElementsRet | Number of elements written to slaveBusScanInfo. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Return the slave information collected during bus scan.
2 ULONG interfaceNumber = 0;
3 USHORT autoIncAddr = 5;
4 ULONG numElements = 128;
5 MlpiEthercatSlaveBusScanInfo slaveBusScanInfo[numElements];
6 ULONG numElementsRet = 0;
7 MLPIRESULT result = mlpiEthercatGetBusScanSlaveInfo(connection, interfaceNumber, autoIncAddr, slaveBusScanInfo, numElements, &numElementsRet);
This function reads process data (consistent) and returns them as byte stream.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[in] | pdType | Process data type. |
[in] | offset | Byte offset inside process data (where reading starts). |
[out] | data | Pointer to data image where data will be copied to. pbyData has to provide at least ulNumBytes of space. |
[in] | dataSize | Number of bytes to be read. |
[out] | dataSizeRet | Number of bytes used. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Read process data (consistent) and returns them as byte stream.
2 ULONG interfaceNumber = 0;
3 MlpiEthercatProcessDataType pdType = MLPI_ETHERCAT_PD_TYPE_INPUTS;
6 ULONG dataSize = _countof(data);
8 MLPIRESULT result = mlpiEthercatGetProcessData(connection, interfaceNumber, pdType, offset, data, dataSize, &dataSizeRet);
This function returns the size of the current process data image, e.g. use for diagnosis purpose.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | interfaceNumber | Master interface number. |
[out] | numOutputBytes | Size of output image in bytes. |
[out] | numInputBytes | Size of image image in bytes. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Read the size of the current process data image, e.g. use for diagnosis purpose.
2 ULONG interfaceNumber = 0;
3 ULONG numOutputBytes = 0;
4 ULONG numInputBytes = 0;
5 MLPIRESULT result = mlpiEthercatGetProcessDataSize(connection, interfaceNumber, &numOutputBytes, &numInputBytes);