NI-Digital Pattern Driver .NET Class Library

Table of Contents

DigitalCaptureWaveforms.Fetch Method

  • Updated2023-11-24
  • 2 minute(s) read
DigitalCaptureWaveforms.Fetch Method

DigitalCaptureWaveformsFetch Method

Fetches a defined number of samples for a specified list of sites.

Namespace:  NationalInstruments.ModularInstruments.NIDigital
Assembly:  NationalInstruments.ModularInstruments.NIDigital.Fx40 (in NationalInstruments.ModularInstruments.NIDigital.Fx40.dll) Version: 2021

Syntax

public uint[][] Fetch(
	string siteList,
	string waveformName,
	int samplesToRead,
	TimeSpan maxTime,
	ref uint[][] data
)
Public Function Fetch ( 
	siteList As String,
	waveformName As String,
	samplesToRead As Integer,
	maxTime As TimeSpan,
	ByRef data As UInteger()()
) As UInteger()()

Parameters

siteList
Type: SystemString
The comma-delimited list of sites on which to burst the pattern (for example, "site0,site1"). Sites that are not on this list are disabled. All sites are enabled for pattern bursting if the string is empty.
waveformName
Type: SystemString
The name of the waveform to fetch. Use the waveformName with the capture_start opcode in your pattern.
samplesToRead
Type: SystemInt32
The number of samples to fetch. Use -1 to fetch all samples after the pattern is finished bursting.
maxTime
Type: SystemTimeSpan
The maximum amount of time allowed for this method to complete in seconds. An exception is thrown if the method does not complete within this time span.
data
Type: SystemUInt32
The samples fetched from the capture waveform data for specified sites. The size of this array can be less than or equal to the number of sites specified in the siteList parameter, depending on whether sites are disabled.

Return Value

Type: UInt32
The captured data for each site specified. If a site is disabled, not enabled for burst, or the current instrument does not include any capture pins, the method does not return data for that site. Use SortSiteResultsBySite(NIDigital, String, SiteResultType, UInt32, Int32) to order and combine the data to match the siteList. You can also use GetSiteResultsSiteNumbers(String, SiteResultType) to obtain a sorted list of returned sites.

Exceptions

ExceptionCondition
IviCDriverExceptionThe NI-Digital Pattern Driver returned an error.
SelectorNameExceptionThe value for siteList contains an invalid site.
ArgumentExceptionThe waveform name specified by waveformName does not exist.
InvalidOperationExceptionFetch(String, String, Int32, TimeSpan, UInt32) is called before bursting a pattern.

Remarks

In order to get best performance, consider fetching fewer samples multiple times rather than fetching large samples at once. This method only returns data from sites that are enabled when fetch is called.

See Also

Log in to get a better experience