GX5296
Returns an array of measurements with time stamp for each measurement of the specified channel’s signal.
GtDio6xMeasureArray (nHandle, nChannel, nSignal, nMode, dMeasurementRate, nTriggerLevelMode, nTriggerLevel, nTimeStampUnits, dTimeOut, pdwArraySize, padResults, padTimeStamp, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Session identifier:● Board handle is used when communicating with the hardware. The Board handle session identifier is returned by calling GtDio6xInitialize or GtDio6xSetupInitialization. |
nChannel |
SHORT |
Used to specify the channel to measure. This parameter is 0-based and refers to any channel in the Domain. Auxiliary channel numbers begin with 1000.GX5296: Each GX5296 board has 4 auxiliary channels that support all the Pin Electronics API functions.GX5961: Each GX5961 board has 4 fully programmable auxiliary channels, and 8 TTL I/O channels. First 4 auxiliary channels may use all the Pin Electronics API.GX5964: Does not have Auxiliary channels. |
nSignal |
SHORT |
Signal to measure:1. GTDIO6X_CH_TEMP: measures the specified channel junction temperature, units are specified by the nTimeStampUnits parameter. 2. GTDIO6X_CH_IO_VOLTAGE: measures the specified channel I/O voltage. 4. GTDIO6X_CH_PMU_CURRENT: measures the specified channel’s PMU current in mA. The channel mode needs to be set to PMU Force Current or PMU Force Voltage prior to measuring the PMU Current. 5. GTDIO6X_CH_PMU_VOLTAGE: measures the specified channel’s PMU voltage. The channel mode needs to be set to PMU Force Current or PMU Force Voltage prior to measuring the PMU Current. |
nMode |
SHORT |
Measurement mode can be: 0. GTDIO6X_MEASURE_MODE_SAMPLE_RATE: measurements will be taken according to the dMeasurementRate parameter, function will return for each measurement also the time stamp offset from T0. 1. GTDIO6X_MEASURE_MODE_MAX_RATE: measurements will be taken at the fastest rate possible, and dMeasurementRate parameter will be ignored, function will return for each measurement also the time stamp offset from T0. |
dMeasurementRate |
DOUBLE |
Sets the reading rate for the measurement in terms of readings per second. A slower rate provides more accurate measurements. Applicable only if measurement mode is set to GTDIO6X_MEASURE_MODE_SAMPLE_RATE. Measurement rate can 1-25000 measurements/sec.NOTE: Temperature measurements are limited to max 500 measurements/sec. Any rate higher than 500 will be set by the driver to 500. E.g. if the measurement rate was set to 1000 then each measurement will be sampled every 1ms. |
nTriggerLevelMode |
SHORT |
Sets the trigger level mode as follows: 0. GTDIO6X_MEASURE_TRIG_MODE_IMMEDIATE: Function disregard the dTriggerLevel parameter, and immediately takes the specified number of measurements. 1. GTDIO6X_MEASURE_TRIG_MODE_RISING_EDGE: Function will take measurements continuously until detected a value which is higher than dTriggerLevel. Once trigger level was detected the function immediately takes the specified number of measurements. 2. GTDIO6X_MEASURE_TRIG_MODE_FALLING_EDGE: Function will take measurements continuously until detected a value which is lower than dTriggerLevel. Once trigger level was detected the function immediately takes the specified number of measurements. NOTE: If dTimeOut paramer>0, the function will return if either timeout condition is met or specified number of samples, whichever condition is met first |
nTimeStampUnits |
SHORT |
Time stamp units will normalize the array in the paTimeStamp as follows:0. GTDIO6X_MEASURE_TIME_STAMP_MILLI_SEC: time stamps will be in milliseconds. 1. GTDIO6X_MEASURE_TIME_STAMP_MICRO_SEC: time stamps will be in microseconds. 2. GTDIO6X_MEASURE_TIME_STAMP_NANO_SEC: time stamps will be in nanoseconds. 3. GTDIO6X_MEASURE_TIME_STAMP_SEC: time stamps will be in seconds. |
dTimeOut |
DOUBLE |
Specify timeout in mSec. If dTimeOut parameter>=1, the function will return if either timeout condition is met or specified number of samples, whichever condition is met firstSetting dTimeOut to zero, the function will not check for timeout condition, and return only when all specified number of measurements are done. |
pdwArraySize |
PDWORD |
Array of type DWORD specifies number of elements in the paResults and paTimeStamp arrays. The return value is actual number of measurements. |
padResults |
PDOUBLE |
Array of type double that holds the measurements |
padTimeStamp |
PDOUBLE |
Array of type double that holds the measurements time stamp normalized according to nTimeStampUnits parameter. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative value on failure. |
The function returns an array of measurements with time stamp for each measurement of the specified channel’s signal.
NOTE: It is recommended to call the GtDio6xMeasureConnectChannel() API in user’s setup section of his code, prior to taking any array measurements. The GtDio6xMeasureConnectChannel() API function pre-set the channel's signal internal logic connection enabling zero delay when calling GtDio6xMeasureArray() API. Otherwise calling GtDio6xMeasureArray() API without pre-set the channel's signal internal logic connection, will result in a delay of about ~175uSec before measurements are taken.
The following example takes 100 measurements of the output I/O voltage of channel 0 at rate of 1000 measurements per sec (1 mSec per measurement). Each measurement has a its own time stamp in mSec. The function will not wait for any trigger condition and will start taking measurements immediately. The example also calls the GtDio6xMeasureConnectChannel() API in order to have minimum delay:
SHORT nStatus;
DWORD adwArraySize=100;
DOUBLE adResults[100];
DOUBLE adTimeStamp[100];
GtDio6xMeasureConnectChannel (nHandle, 0, GTDIO6X_CH_IO_VOLTAGE, &nStatus);
GtDio6xMeasureArray(nHandle, 0, GTDIO6X_CH_IO_VOLTAGE, GTDIO6X_MEASURE_MODE_SAMPLE_RATE, 1000, GTDIO6X_MEASURE_TRIG_MODE_IMMEDIATE, 0.0, GTDIO6X_MEASURE_TIME_STAMP_MILLI_SEC, 10000, &dwArraySize, adResults, adTimeStamp, &nStatus);
GtDio6xMeasureArrayConnectChannel, GtDio6xMeasure, GtDio6xGetErrorString,