NMX_GetBoxInfo_1

<< Click to Display Table of Contents >>

Navigation:  NmxDLL Reference Guide > API (programming interface) > Get device information >

NMX_GetBoxInfo_1

This function is used to read information about a measurement box (digital type plate).

 

Definition


NMX_STATUS NMX_GetBoxInfo_1(

 NMX_PHANDLE pHandle,

 unsigned long ulBoxNo,

 unsigned long* pulInfoData, unsigned long ulInfoDataNElements,

 unsigned long long* pudMacAddress,

 char* pcSerNo, unsigned long ulSizeofSerNo,

 char* pcProdCode, unsigned long ulSizeofProdCode,

 char* pcOrderNo, unsigned long ulSizeofOrderNo,

 char* pcName, unsigned long ulSizeofName);

 

Parameter


pHandle

Connection Handle.

ulBoxNo

Number of the measurement box, for which the information shall be provided.
The first measurement box has the number 0.
In a system with 5 measurement boxes, these are numbered 0..4.

pulInfoData

Pointer to an array of unsigned 32 Bit values.
To avoid a large amount of function parameters, several information will be stored in this array.
See below for more information about the array content.
An array size of 32 elements is recommended. Initialize these with 0.

ulInfoDataNElements

Number of elements of the array, to which pulInfoData points.
Example: The array has 32 elements, its size is 128 Bytes. Then:
ulInfoDataNElements = 32;

pudMacAddress

MAC address of the box.

pcSerNo

ASCII based string with serial number of the box. The maximum string length is 17 characters (16 + Termination).

ulSizeofSerNo

Maximum size of pcSerNo in Bytes/Characters.

pcProdCode

ASCII based string with production code of the box. The maximum string length is 17 characters (16 + Termination).

ulSizeofProdCode

Maximum size of pcProdCode in Bytes/Characters.

pcOrderNo

ASCII based string with order number of the box. The maximum string length is 33 characters (32 + Termination).

ulSizeofOrderNo

Maximum size of pcOrderNo in Bytes/Characters.

pcName

ASCII based string with name of the box. The maximum string length is 129 characters (128 + Termination).

ulSizeofName

Maximum size of pcName in Bytes/Characters.

 

Typical function call (C example)


NMX_GetBoxInfo_1(pHandle, ulBoxNo, aulInfoData, sizeof(aulInfoData) / 4, &udMacAddress, acSerNo, sizeof(acSerNo), acProdCode, sizeof(acProdCode), acOrderNo, sizeof(acOrderNo), acName, sizeof(acName));

 

Content of the array pulInfoData


Element

Content

Description

0

Box number

Number of the box.

1

Hardware Version Major

Version of the electronics.

2

Hardware Version Minor

3

Hardware Revision

Compatibility code between the hardware and the firmware. It ensures that a firmware update is only allowed if the firmware version is compatible to the hardware revision.

4

Firmware Version Major

Firmware version of the box.

 

The first part of the firmware version is incremented in case of major changes.

The second part of the firmware version is incremented in case new functionality has been implemented.

The third part of the firmware version is incremented in case one or more bugs were fixes.

The fourth part of the firmware version is an internal counter.

5

Firmware Version Minor

6

Firmware Version Patch

7

Firmware Version Build

8

Number of measurement channels

Total number of measurement channels.

9

Number of 64 Bit measurement channels

Number of 64 Bit measurement channels, which the box has.

10

Number of 32 Bit measurement channels

Number of 32 Bit measurement channels, which the box has.

11

Number of 16 Bit measurement channels

Number of 16 Bit measurement channels, which the box has.

12

Number of 8 Bit measurement channels

Number of 8 Bit measurement channels, which the box has.

13

Number of digital inputs

Total number of digital input bits.
For data readout:

The number of digital inputs is always rounded up to a multiple of 8. If for example 2 digital inputs are available. These are rounded up to 8, whereas the inputs 3-8 are always low.

Each 8 Bits are combined in 1 Byte.

14

Number of digital outputs

Total number of digital output bits.
For writing data and for data readout:

The number of digital outputs is always rounded up to a multiple of 8. If for example 2 digital outputs are available. These are rounded up to 8.

Each 8 Bits are combined in 1 Byte.

15 .. 31

Reserved for future use


 

.Net DLL specific implementation


NMX_MSTATUS GetBoxInfo_1(

                 System::IntPtr pHandle,

                 System::UInt32 ulBoxNo,

                 array<System::UInt32>^aulInfoData,

                 System::UInt64 %pudMacAddress,

                 System::String ^%strSerial,

                 System::String ^%strProdCode,

                 System::String ^%strOrderNo,

                 System::String ^%strName);

No Length/Sizeof-Parameters are required for the array aulInfoData and the strings, since this information is not required in a .Net environment.

For aulInfoData a size of 32 elements is recommended. The strings strSerial, strProdCode, strOrderNo and strName are directly returned as Unicode-strings. Hence no additional conversion is required.

 

Comments


It is good practice reading the box count first. Then read the box information for each box.

The function only returns values, if the function return code is NST_SUCCESS. Otherwise the values remain unchanged.