<< Click to Display Table of Contents >> Navigation: NmxDLL Referenz > API (programming interface) > Static Measurement (Non-Realtime) > NMX_StaticGet32_1 |
This function is used to get a snapshot of:
•Current measurement values
•Current hardware status of the measurement channels
•Current digital input status
•Current status of the measurement boxes ("Box event")
See also the HowTo-Guide.
Definition
NMX_STATUS NMX_StaticGet32_1(
NMX_PHANDLE pHandle,
signed long aslValues[], unsigned long ulValuesNElements,
unsigned char aucHardwareStatus[], unsigned long ulSizeofHardwareStatus,
unsigned char aucDigiIn[], unsigned long ulSizeofDigiIn,
unsigned char aucBoxStatus[], unsigned long ulSizeofBoxStatus,
unsigned long* pulUpdateCtr);
Parameter
pHandle
aslValues
Array, in which the measurement values shall be stored.
The data type of the array is "signed 32 Bit". See chapter "Data Types" for more information.
The array must be provided by your application.
Technically, this parameter is the same as a pointer to the array. Its type is: signed long*
ulValuesNElements
Number of elements of the array aslValues.
Example: aslValues points to an array with 64 elements, each with 32 Bit (Total size = 256 Bytes). Then: ulValuesNElements = 64;
aucHardwareStatus
Array, in which the hardware status for the measurement channels shall be stored.
The data type of the array is "unsigned 8 Bit".
The array must be provided by your application.
Technically, this parameter is the same as a pointer to the array. Its type is: unsigned char*
ulSizeofHardwareStatus
Size of the array aucHardwareStatus in Bytes.
aucDigiIn
Array, in which the digital input bytes shall be stored.
The data type of the array is "unsigned 8 Bit".
The array must be provided by your application.
Technically, this parameter is the same as a pointer to the array. Its type is: unsigned char*
ulSizeofDigiIn
Size of the array aucDigiIn in Bytes.
aucBoxStatus
Array, in which the status information for each box shall be stored.
The data type of the array is "unsigned 8 Bit".
The array must be provided by your application.
Technically, this parameter is the same as a pointer to the array. Its type is: unsigned char*
ulSizeofBoxStatus
Size of the array aucBoxStatus in Bytes.
pulUpdateCtr
A DLL-internal counter is updated each time new static data has been received from the device. This counter can be read-out here.
Typical function call (C example)
NMX_StaticGet32_1(pHandle, aslMeasVal, sizeof(aslMeasVal)/4, aucHardStat, sizeof(aucHardStat), aucDigiIn, sizeof(aucDigiIn), aucBoxStatus, sizeof(aucBoxStatus), &ulNUpdates);
.Net DLL specific implementation
NMX_MSTATUS StaticGet32_1(
System::IntPtr pHandle,
array<System::Int32>^aslValues,
array<System::Byte>^aucHardwareStatus,
array<System::Byte>^aucDigiIn,
array<System::Byte>^aucBoxStatus,
System::UInt32 %pulUpdateCtr);
No Length/Sizeof-Parameters are required for the arrays, since this information automatically available in a .Net environment.
The arrays will not be resized within the function call for performance reasons. This means they should be large enough to store all the data.
Example: in a system with 24 measurement channels, the arrays aslValues and aucHardwareStatus should have a minimum size of 24 array elements.
If the array is shorter, not all data will be available for your application. (The size is checked -> no risk for crash.)
Comments
The notification NMXNOTIFY_NEW_STATIC32 can be used to get informed about new data.
Never use digital in-/outputs for emergency critical applications. If required, use an external emergency circuit. See the users manual of your measurement system for more information.
Status-Byte for measurement channels for 1Vpp incremental encoders (INC)
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
---|---|---|---|---|---|---|---|
PwrOvld |
|
Refmark |
Vector |
GComp |
OComp |
AmpErr |
Fast |
PwrOvld
Error: A power supply overload of the incremental encoder(s) has been detected.
Refmark
The reference index has been crossed.
Vector
Error: The signal vector, which has been calculated from the cosine- and sine-signal, is too small. (Can only occur with 1Vpp incremental encoders.)
GComp
Error: The gain-control has reached its limit. (Can only occur with 1Vpp incremental encoders.)
OComp
Error: The offset-control has reached its limit. (Can only occur with 1Vpp incremental encoders.)
AmpErr
Error: One or both AD-converters for the measurement of the sine-/cosine-signal is/are overdriven. (Can only occur with 1Vpp incremental encoders.)
Fast
Error: The input frequency is too high.
Status-Byte for inductive probes (TFV)
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
---|---|---|---|---|---|---|---|
LinActive |
IdentActive |
|
LinFailure |
|
|
|
ShortCirc |
ShortCirc
Error: Short circuit of the sine-oscillator
LinFailure
Failed reading / applying the linearisation data.
This bit is only available, if the measurement hardware and the probe support linearisation.
IdentActive
Reading the probe identification and linearisation data is active.
This bit is only available, if the measurement hardware and the probe support linearisation.
LinActive
Probe linearisation is active.
This bit is only available, if the measurement hardware and the probe support linearisation.
Status-Byte for analogue inputs (AIN)
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
---|---|---|---|---|---|---|---|
24VOvld |
VRefOvld |
|
|
|
|
|
|
24VOvld
Error: Overload of the 24V output supply.
VRefOvld
Error: Overload of the reference voltage output.
Status-Byte for temperature measurement (TEMP)
Bit 7 |
Bit 6 |
Bit 5 |
Bit 4 |
Bit 3 |
Bit 2 |
Bit 1 |
Bit 0 |
---|---|---|---|---|---|---|---|
TempInvalid |
SenseFailure |
ADError |
ColdJunctionErrorHw |
ColdJunctionErrorSw |
SenseVoltHigh |
SenseVoltLow |
OutOfRange |
OutOfRange
Sensor input voltage is out of range
SenseVoltLow
Sensor reading is below normal range.
SenseVoltHigh
Sensor reading is above normal range.
ColdJunctionErrorSw
Cold junction sensor result is beyond normal range.
ColdJunctionErrorHw
Cold junction sensor has a hardware fault error.
ADError
Bad ADC reading. Could be large external noise event.
SenseFailure
Bad sensor reading.
TempInvalid
Temperature value may be invalid.