The results with a numerical data type are returned as a tuple. The number and type of the elements in the tuple correspond to the MVApp results output as produced by the execution of the MERLIC Vision App referenced in the recipe. The resulting tuple elements contain single (scalar) result values. The results themselves are sorted with respect to their data types.
The following table shows the order in which results are returned by the process integration mode of MERLIC, i.e., MERLIC RTE. Additionally, the corresponding Communicator data types are shown:
| MERLIC RTE | Communicator |
|---|---|
BOOL | Bool |
BYTE | UInt8 |
WORD | UInt16 |
DWORD | UInt32 |
LWORD | UInt64 |
SINT | Int8 |
USINT | UInt8 |
INT | Int16 |
UINT | UInt16 |
DINT | Int32 |
UDINT | UInt32 |
LINT | Int64 |
ULINT | UInt64 |
REAL | Float |
LREAL | Double |
TIME | UInt32 |
TIME_OF_DAY | UInt32 |
LTIME | UInt64 |
DATE | UInt32 |
DATE_AND_TIME | UInt32 |
STRING_80 | String |
MERLIC RTE also returns image results, i.e., images that have been specified as an "MVApp result" in the MERLIC Creator. However, they are returned separately from the results of other data types. See the topic Getting Image Results for more information.
The MVApp returns the following MVApp results:
| Result | MERLIC RTE data type | Communicator data type |
|---|---|---|
| true | BOOL | BOOL |
| 11 | LINT | Int64 |
| 8 | LINT | Int64 |
| 2020 | LINT | Int64 |
| 3141 | REAL | Float |
When using MERLIC RTE with your plug-ins, the results are sent to your plug-ins via the ResultReady event as a tuple.
The following code snippet demonstrates how to use the API functions in mv_value.h and mv_tuple.h to unpack the result contents such that the "assert`s" hold: