NI DIGITAL PATTERN DRIVER Frequency Measurement Functions - ni/grpc-device GitHub Wiki

Frequency Measurement Functions

niDigital_FrequencyCounter_ConfigureMeasurementTime

Configures the measurement time for the frequency counter on the specified channel(s).

C Function Prototype: ViStatus niDigital_FrequencyCounter_ConfigureMeasurementTime (ViSession vi, ViConstString channelList, ViReal64 measurementTime)

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.

measurementTime Measurement time of the frequency counter, in seconds.

Return value: Reports the status of the operation.

niDigital_FrequencyCounter_MeasureFrequency

Measures the frequency on the specified channel(s) over the specified measurement time. All channels in the channelList should have the same measurement time.

C Function Prototype: ViStatus niDigital_FrequencyCounter_MeasureFrequency (ViSession vi, ViConstString channelList, ViInt32 frequenciesBufferSize, ViReal64[] frequencies, ViInt32* actualNumFrequencies)

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.

frequenciesBufferSize The specified number of elements in the ViReal64 array you specify for the frequency counter measurements.
Output
frequencies The returned frequency counter measurement, in Hz. This function returns -1 if the measurement is invalid for the channel.
actualNumFrequencies The returned number of frequency counter measurements written to the measurements array.

Return value: Reports the status of the operation.

⚠️ **GitHub.com Fallback** ⚠️