Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
LogicLib
Collaboration diagram for LogicLib:

Modules

 Application, symbols
 
 Extension of PLC functions by C/C++ implementation
 
 Read variable using symbols
 
 Write variable using symbols
 
 Read memory area
 
 Write memory area
 
 Version and Permission
 
 Structs, Types, ...
 

Detailed Description

This library contains functions to control and manage the logic runtime system on the target device. Furthermore, this library provides the symbolic read and write access to logic variables and the possibility to read and write memory areas such as the input area (like "%IB0" or "%QB0").

Attention
The addresses of the variables of the symbolic access might change on every download, reset origin or online change of the PLC application, so you have to stop each variable access before you load or change the PLC application!
Note
The LogicLib functions trace their debug information mainly into module the MLPI_LOGIC_LIB and in addition into the modules CMP_OPENCTRL, CMP_MLPI and MLPI_BASE_MODULES. For further information, see also the detailed description of the library TraceLib and the notes about Using the Trace for debugging.

The table shows the PLC data types within the IEC61131 environment 'IndraLogic' and the corresponding data types within the C/C++ environment (e.g. 'Workbench OEM') of the MLPI. On reading or writing variables by symbols or memory areas, on default, you use the functions below named after the MLPI data type like mlpiLogicWriteVariableBySymbolUshort. If you include the header mlpiLogicHelper.h, you can also use the equivalent functions named after the IEC61131 data types like mlpiLogicWriteVariableBySymbolWord or like mlpiLogicWriteVariableBySymbolUint.

Number of Bits Data types of PLC Data types of MLPI
8 BOOL BOOL8
8 SINT CHAR
16 INT SHORT
32 DINT LONG
64 LINT LLONG
8 USINT UCHAR
16 UINT USHORT
32 UDINT ULONG
64 ULINT ULLONG
8 BYTE UCHAR
16 WORD USHORT
32 DWORD ULONG
64 LWORD ULLONG
32 REAL FLOAT
64 LREAL DOUBLE
8n STRING WCHAR16
16n WSTRING WCHAR16
16 TIME ULONG
16 DATE ULONG
16 DATE_AND_TIME ULONG
16 TIME_OF_DAY ULONG
8 Enumerator SHORT