|
MLPIRESULT | mlpiIoReadFieldbusMasterList (const MLPIHANDLE connection, WCHAR16 *masterList, const ULONG numElements, ULONG *countOfMaster) |
|
MLPIRESULT | mlpiIoReadFieldbusMasterInfo (const MLPIHANDLE connection, const WCHAR16 *masterName, MlpiIoFieldbusMasterInfo *masterInfo) |
|
MLPIRESULT | mlpiIoReadFieldbusSlaveList (const MLPIHANDLE connection, const WCHAR16 *masterName, WCHAR16 *slaveList, const ULONG numElements, ULONG *countOfSlave) |
|
MLPIRESULT | mlpiIoReadFieldbusSlaveInfo (const MLPIHANDLE connection, const WCHAR16 *masterName, const WCHAR16 *slaveAddress, MlpiIoFieldbusSlaveInfo *slaveInfo) |
|
MLPIRESULT | mlpiIoReadFieldbusSlaveInfos (const MLPIHANDLE connection, const WCHAR16 *masterName, MlpiIoFieldbusSlaveInfo *slaveInfo, const ULONG numElements, ULONG *numElementsRet) |
|
MLPIRESULT | mlpiIoUpdateFieldbusIo (const MLPIHANDLE connection, const WCHAR16 *masterName) |
|
This library contains functions to control and manage fieldbus I/Os.
This function reads the name list of the available fieldbus masters on the target.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[out] | masterList | Name list of fieldbus master. The names of the masters are separated by a semicolon(;). |
[in] | numElements | Number of elements in masterList available to read. |
[out] | countOfMaster | Returns number of returned fieldbus master names in parameter masterList . |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Read the name list of fieldbus master.
2 WCHAR16 masterList[1024] = L"";
3 ULONG countOfMaster = 0;
4 MLPIRESULT result = mlpiIoReadFieldbusMasterList(connection, masterList, _countof(masterList), &countOfMaster);
This function reads the information about a fieldbus master.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | masterName | Name of fieldbus master. The name of the fieldbus master is the name of the regarding master node in your IndraWorks project. You can also retrieve the list of configured master names by using the function mlpiIoReadFieldbusMasterList. |
[out] | masterInfo | Information about the fieldbus master. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Read the information about the fieldbus master.
2 WCHAR16 masterName[] = L"Profibus_DP_Master";
3 MlpiIoFieldbusMasterInfo masterInfo;
4 memset(&masterInfo, 0, sizeof(masterInfo));
5 MLPIRESULT result = mlpiIoReadFieldbusMasterInfo(connection, masterName, &masterInfo);
This function reads the name list of fieldbus slaves.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | masterName | Name of fieldbus master. The name of the fieldbus master is the name of the regarding master node in your IndraWorks project. You can also retrieve the list of configured master names by using the function mlpiIoReadFieldbusMasterList. |
[out] | slaveList | Name list of fieldbus slaves. The names of the slaves are separated by a semicolon(;). |
[in] | numElements | Number of elements in slaveList available to read. |
[out] | countOfSlave | Count of fieldbus slaves. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Read the name list of fieldbus slaves.
2 WCHAR16 masterName[] = L"Profibus_DP_Master";
3 WCHAR16 slaveList[4096] = L"";
4 ULONG countOfSlave = 0;
5 MLPIRESULT result = mlpiIoReadFieldbusSlaveList(connection, masterName, slaveList, _countof(slaveList), &countOfSlave);
This function reads the information about a fieldbus slave of a fieldbus master.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | masterName | Name of fieldbus master. The name of the fieldbus master is the name of the regarding master node in your IndraWorks project. You can also retrieve the list of configured master names by using the function mlpiIoReadFieldbusMasterList. |
[in] | slaveAddress | Address of fieldbus slave. |
[out] | slaveInfo | Information about the fieldbus slave. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Read the information about the fieldbus master.
2 WCHAR16 masterName[] = L"Profibus_DP_Master";
3 WCHAR16 slaveAddress[] = L"3";
4 MlpiIoFieldbusSlaveInfo slaveInfo;
5 memset(&slaveInfo, 0, sizeof(slaveInfo));
6 MLPIRESULT result = mlpiIoReadFieldbusSlaveInfo(connection, masterName, slaveAddress, &slaveInfo);
This function reads the information about the fieldbus slaves of a fieldbus master.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | masterName | Name of fieldbus master. The name of the fieldbus master is the name of the regarding master node in your IndraWorks project. You can also retrieve the list of configured master names by using the function mlpiIoReadFieldbusMasterList. |
[out] | slaveInfo | Information about the fieldbus slaves. |
[in] | numElements | Number of elements in numElements available to read. |
[out] | numElementsRet | Pointer to data where the number of elements in complete data will be stored. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Read the information about the fieldbus master.
2 WCHAR16 masterName[] = L"Profibus_DP_Master";
3 MlpiIoFieldbusSlaveInfo slaveInfo[16];
4 ULONG numElementsRet = 0;
5 memset(&slaveInfo, 0, sizeof(slaveInfo));
6 MLPIRESULT result = mlpiIoReadFieldbusSlaveInfos(connection, masterName, slaveInfo, _countof(slaveInfo), &numElementsRet);
This function performs a bus cycle to update the fieldbus I/Os of all attached slaves of a master.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | masterName | Name of fieldbus master. The name of the fieldbus master is the name of the regarding master node in your IndraWorks project. You can also retrieve the list of configured master names by using the function mlpiIoReadFieldbusMasterList. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example
1 // Perform a bus cycle of the Profibus DP.
2 WCHAR16 masterName[] = L"Profibus_DP_Master";
3 MLPIRESULT result = mlpiIoUpdateFieldbusIo(connection, masterName);