Skip to content

NI DIGITAL PATTERN DRIVER Sort Results Functions

Shantanu Shinde edited this page May 21, 2021 · 3 revisions

Sort Results Functions

niDigital_GetPinResultsPinInformation

Sort Results Group

Returns the pin names, site numbers, and channel names that correspond to per-pin data read from the digital pattern instrument.

The function returns pin information in the same order as values read using the niDigital_ReadStatic function, niDigital_PPMU_Measure function, and niDigital_GetFailCount function. Use this function to match values the previously listed functions return with pins, sites, and instrument channels.

C Function Prototype: ViStatus niDigital_GetPinResultsPinInformation (ViSession vi, ViConstString channelList, ViInt32 bufferSize, ViInt32[] pinIndexes, ViInt32[] siteNumbers, ViInt32[] channelIndexes, ViInt32* actualNumValues)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
channelList

List of channel names or list of pins. Do not pass a mix of channel names and pin names. An empty string denotes all digital pattern instrument channels.

Pin names and pin groups apply to all enabled sites, unless the pin name explicitly specifies the site. You can specify a pin in a specific site using the form siteN/pinName, where N is the site number. This function ignores pins that are not mapped to the digital pattern instrument.

Specify channel names using the form PXI1Slot3/0,2-3 or PXI1Slot3/0,PXI1Slot3/2-3, where PXI1Slot3 is the instrument resource name and 0, 2, 3 are channel names. To specify channels from multiple instruments, use the form PXI1Slot3/0,PXI1Slot3/2-3,PXI1Slot4/2-3. The instruments must be in the same chassis.

bufferSize The number of elements in the arrays you specify for pinIndexes, siteNumbers, and channelIndexes, if they are not NULL. To determine the size of the buffer to allocate for the arrays, pass a value of 0 to the bufferSize parameter and a value of VI_NULL to the array parameters. In this case, the value returned by the actualNumValues parameter is the size of the arrays necessary to hold the output values.
pinIndexes

The returned index of the pins corresponding to data read from the digital pattern instrument using the specified channelList. If you do not want to use this parameter, pass VI_NULL.

Call niDigital_GetPinName to get the name of the pin associated with an index.

siteNumbers The returned site numbers that correspond to data read from the digital pattern instrument using the specified channelList. If you do not want to use this parameter, pass VI_NULL.
channelIndexes

The returned index of channels corresponding to data read from the digital pattern instrument using the specified channelList. If you do not want to use this parameter, pass VI_NULL.

Call niDigital_GetChannelName to get the name of the channel associated with an index. Channel indexes are one-based.

actualNumValues The number of values written to the output arrays. This function always writes the same number of values to all output arrays, if they are not set to VI_NULL.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_GetSiteResultsSiteNumbers

Sort Results Group

Returns the site numbers that correspond to per-site data read from the digital pattern instrument.

The function returns site numbers in the same order as values read using the niDigital_GetSitePassFail and niDigital_FetchCaptureWaveformU32 functions. Use this function to match values the previously listed functions return with site numbers.

C Function Prototype: ViStatus niDigital_GetSiteResultsSiteNumbers (ViSession vi, ViConstString siteList, ViInt32 siteResultType, ViInt32 siteNumbersBufferSize, ViInt32[] siteNumbers, ViInt32* actualNumSiteNumbers)

Parameter Description
vi The specified instrument session the niDigital_init or niDigital_InitWithOptions function returns.
siteList Site numbers listed as a comma-delimited list of strings of form siteN, where N is the site number.
siteResultType

The type of data specified in the results array.

- NIDIGITAL_VAL_PASS_FAIL (3300): Get site numbers for pass/fail data.

- NIDIGITAL_VAL_CAPTURE_WAVEFORM (3301): Get site numbers for capture waveforms.

siteNumbersBufferSize The number of elements in the ViInt32 array you specify for siteNumbers. To determine the size of the buffer to allocate for the siteNumbers array, pass a value of 0 to the siteNumbersBufferSize parameter and a value of VI_NULL to the siteNumbers parameter. In this case, the value returned by the actualNumSiteNumbers parameter is the size of the array necessary to hold the site numbers.
siteNumbers The returned array of site numbers that correspond to the values specified by siteResultType.
actualNumSiteNumbers Number of sites written in the siteNumbers array.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_SortPinResultsBySiteViReal64

Sort Results Group

Organizes data read from multiple digital pattern instruments by grouping the data by site number.

To use this function, allocate an array large enough to hold the data to read from all instruments. Read data from each instrument using the same list of pins and pin groups for the channelList parameter, appending each instrument's data in the allocated array. Each instrument returns data only for the pins that are mapped to its channels. Pass the data array and the same channelList as parameters to this function.

C Function Prototype: ViStatus niDigital_SortPinResultsBySiteViReal64 (ViInt32 sessionCount, ViSession sessions, ViConstString channelList, ViInt32 numResults, ViReal64[] results, ViInt32[] pinIndexes, ViInt32[] siteNumbers)

Parameter Description
sessionCount Number of sessions in the sessions array.
sessions Instrument sessions obtained from the niDigital_InitWithOptions function.
channelList The specified channelList you use to read data in the results array. This function requires that the channelList contain only pin and pin group names.
numResults Number of values in the results array.
results The specified data read from the digital pattern instruments, appended into an array. This function sorts the results in-place in the results array so that they are ordered according to the specified channelList and in increasing site order.
pinIndexes The returned pin indexes corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.
siteNumbers The returned site numbers corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_SortPinResultsBySiteViInt64

Sort Results Group

Organizes data read from multiple digital pattern instruments by grouping the data by site number.

To use this function, read data from each instrument using the same list of pins and pin groups for the channelList parameter, and combine the data in a two-dimensional array. Each instrument returns data only for the pins that are mapped to its channels. Pass the data array and the same channelList as parameters to this function.

C Function Prototype: ViStatus niDigital_SortPinResultsBySiteViInt64 (ViInt32 sessionCount, ViSession sessions, ViConstString channelList, ViInt32 numResults, ViInt64[] results, ViInt32[] pinIndexes, ViInt32[] siteNumbers)

Parameter Description
sessionCount Number of sessions in the sessions array.
sessions Instrument sessions obtained from the niDigital_InitWithOptions function.
channelList The specified channelList you use to read data in the results array. This function requires that the channelList contain only pin and pin group names.
numResults Number of values in the results array.
results The data read from the digital pattern instruments, combined into a two-dimensional array.
pinIndexes The returned pin indexes corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.
siteNumbers The returned site numbers corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_SortPinResultsBySiteViUInt8

Sort Results Group

Organizes data read from multiple digital pattern instruments by grouping the data by site number.

To use this function, allocate an array large enough to hold the data to read from all instruments. Read data from each instrument using the same list of pins and pin groups for the channelList parameter, appending each instrument's data in the allocated array. Each instrument returns data only for the pins that are mapped to its channels. Pass the data array and the same channel list as parameters to this function.

C Function Prototype: ViStatus niDigital_SortPinResultsBySiteViUInt8 (ViInt32 sessionCount, ViSession sessions, ViConstString channelList, ViInt32 numResults, ViUInt8[] results, ViInt32[] pinIndexes, ViInt32[] siteNumbers)

Parameter Description
sessionCount Number of sessions in the sessions array.
sessions Instrument sessions obtained from the niDigital_InitWithOptions function.
channelList The specified channelList you use to read data in the results array. This function requires that the channelList contain only pin and pin group names.
numResults Number of values in the results array.
results The specified data read from the digital pattern instruments, appended into an array. This function sorts the results in-place in the results array so that they are ordered according to the specified channelList and in increasing site order.
pinIndexes The returned pin indexes corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.
siteNumbers The returned site numbers corresponding to the data returned in the results array. If non-NULL, this array must be of the same size as the results array.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_SortSiteResultsViBoolean

Sort Results Group

Orders site data read from multiple instruments to match the siteList you specify and combines data from instruments mapped to the same site.

To use this function, allocate an array large enough to hold the data to read from all instruments. Read data from each instrument using the same list of pins and pin groups for the siteList parameter, appending each instrument's data in the allocated array. Each instrument returns data only for the sites on which the instrument is configured to burst patterns. Pass the data array and the same siteList as parameters to this function.

C Function Prototype: ViStatus niDigital_SortSiteResultsViBoolean (ViInt32 sessionCount, ViSession sessions, ViConstString siteList, ViInt32 siteResultType, ViInt32 numResults, ViBoolean[] results, ViInt32[] siteNumbers, ViInt32* actualNumResults)

Parameter Description
sessionCount Number of sessions in the sessions array.
sessions Instrument sessions obtained from the niDigital_InitWithOptions function.
siteList A comma-delimited list of strings of form siteN, where N is the site number.
siteResultType

The type of data specified in the results array.

- NIDIGITAL_VAL_PASS_FAIL (3300): Results array contains site pass/fail data.

numResults Number of values in the results array.
results The specified data read from the digital pattern instruments, appended into an array. This function sorts the results in-place in the results array so that they are ordered according to the specified siteList. If multiple instruments returned data for the same site number, this function combines the corresponding data for those instruments into a single value.
siteNumbers The returned site numbers corresponding to the results.
actualNumResults The returned number of results in the results array after reordering and combining results.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

niDigital_SortSiteResultsViUInt32Waveform

Sort Results Group

Orders site data read from multiple instruments to match the siteList you specify and combines data from instruments mapped to the same site.

To use this function, allocate an array large enough to hold the data to fetch from all digital pattern instruments. Fetch data from each instrument using the same siteList parameter, appending each instrument's data in the allocated array. Each instrument returns data only for the sites on which the instrument is configured to capture waveforms. Pass the data array and the same siteList as parameters to this function.

C Function Prototype: ViStatus niDigital_SortSiteResultsViUInt32Waveform (ViInt32 sessionCount, ViSession sessions, ViConstString siteList, ViInt32 siteResultType, ViInt32 numWaveforms, ViInt32 numSamplesPerWaveform, ViUInt32[] waveforms, ViInt32[] siteNumbers, ViInt32* actualNumWaveforms)

Parameter Description
sessionCount Number of sessions in the sessions array.
sessions Instrument sessions obtained from the niDigital_InitWithOptions function.
siteList A comma-delimited list of strings of form siteN, where N is the site number.
siteResultType

The type of data specified in the waveforms array.

- NIDIGITAL_VAL_CAPTURE_WAVEFORM (3301): Waveforms array contains capture waveforms.

numWaveforms Number of waveforms in the waveforms array.
numSamplesPerWaveform Number of samples per waveform fetched.
waveforms Specifies waveform data read from the digital pattern instruments, appended into an array. This function sorts the waveforms in-place in the waveforms array so that they are ordered according to the specified siteList. If multiple instruments returned data for the same site number, this function combines the corresponding waveform data for those instruments into a single waveform.
siteNumbers The returned site numbers corresponding to the resulting waveforms.
actualNumWaveforms The returned number of waveforms in the waveforms array after reordering and combining waveforms.

Return value: Reports the status of the operation.

Parent topic: NI-Digital Pattern Driver C Function Reference

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

Getting started with moniker based streaming
C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally