The MLPI (Motion Logic Programming Interface) is a programming interface used to write applications to configure and run a BoschRexroth device which supports the MLPI interface technology. One example is a IndraMotion MLC/XLC. It includes a set of headers, libraries and some sample code.
As you can use PLC Function Blocks to program a device using a PLC task, the MLPI allows you to program the device using a higher-level programming language and a third-party development environment, such as Lua Development Tools (LDT).
This section describes various pieces of information and notes about the installation of the MLPI. Please read this before using the MLPI for the first time.
To use the MLPI, you need to install the following packages:
Listed below are some directories you might want to know about.
<install>
= The directory where you installed the mlpiCore SDK.
<install>\bin
<install>\lib
<install>\doc
<install>\samples
The MLPI-API is separated into different libraries. To use these libraries in Lua you have to in require mlpi4lua. Each library is a own entry in returned table. For more information look at luadoc documentation in execution environment of Lua development tools (LDT).
Learn how to setup a simple application based on the platform and development environment where you want to run the executable of your application.
The user of the mlpi4Lua package needs to know some specifics of the mlpi4Lua:
The table shows the PLC data types within the IEC61131 environment 'IndraLogic', the corresponding data types within the C/C++ environment of the MLPI and the corresponding type within the Lua environment.
Number of Bits | Data types of PLC | Data types of MLPI | Data types of Lua |
---|---|---|---|
8 | BOOL | BOOL8 | Boolean |
8 | SINT | CHAR | Integer |
16 | INT | SHORT | Integer |
32 | DINT | LONG | Integer |
64 | LINT | LLONG | Integer |
8 | USINT | UCHAR | Integer |
16 | UINT | USHORT | Integer |
32 | UDINT | ULONG | Integer |
64 | ULINT | ULLONG | Integer |
8 | BYTE | UCHAR | Integer |
16 | WORD | USHORT | Integer |
32 | DWORD | ULONG | Integer |
64 | LWORD | ULLONG | Integer |
32 | REAL | FLOAT | Number |
64 | LREAL | DOUBLE | Number |
8n | STRING | WCHAR16 | String |