Data Types

<< Click to Display Table of Contents >>

Navigation:  NmxDLL Reference Guide > Nmx DLL Overview >

Data Types

The NMX DLL provides all

measurement values as signed 32 bit values ("signed long") and all

digital in-/outputs as unsigned 8 bit values ("unsigned char").

 

The native format of the measurement values can be different. For inductive probes the native format is for example signed 16 bit ("signed short"). To simplify the DLL interface, this native format is converted / "casted" to the common 32 Bit format within the DLL.

Example: An inductive probe has the value -9152, which is 0xDC40. This 16 Bit value is then converted to the 32 Bit value 0xFFFFDC40, which is also -9152.

If required, the native data type of a measurement channel can be retrieved from the NMX DLL using the function NMX_GetChannelInfo_1. However, in most cases the conversion factor to a physical unit is of interest and not the data type.

 

Digital in-/outputs are always transferred byte-wise, which means that each 8 in-/outputs are represented by 1 byte.

Example: A system has 32 digital inputs. These are represented by 32 / 8 = 4 input bytes, whereas

Byte 0 contains the inputs 1..8

Byte 1 contains the inputs 9..16

etc.