Task Members

NI-DAQmx 17.1 .NET Class Library Help

Edition Date: June 2017

Part Number: 370473J-01

»View Product Info
Download Help (Windows Only)

Task Class Constructors Methods Properties Events See Also


The Task type exposes the following members.

Constructors

NameDescription
Task

Overloaded. Initializes a new instance of the Task class with a unique name.

Methods

NameDescription
AddGlobalChannelAdds a preconfigured, global channel to the task.
ConfigureLogging

Overloaded. Configures logging to a .tdms file when the acquisition starts.

ControlAlters the state of the task according to the mode you specify.
CreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose

Overloaded. Releases all resources used by Task.

EqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
GetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetTypeGets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone

Overloaded. Creates a shallow copy of the current Object.

OnCounterOutputRaises the CounterOutput event.
OnDigitalChangeDetectionRaises the DigitalChangeDetection event.
OnDoneRaises the Done event.
OnEveryNSamplesReadRaises the EveryNSamplesRead event.
OnEveryNSamplesWrittenRaises the EveryNSamplesWritten event.
OnSampleClockRaises the SampleClock event.
OnSampleCompleteRaises the SampleComplete event.
StartTransitions the task to the running state, which begins the measurement or generation.
StartNewFileStarts a new TDMS file the next time data is written to disk.
StopTransitions the task from the running to the committed state, which ends the measurement or generation.
ToStringReturns a string representation of the object. (Overrides Object.ToString()()().)
WaitForValidTimestamp

Overloaded. Waits indefinitely until the specified timestampEvent has a value.

WaitUntilDone

Overloaded. Waits for the measurement or generation to complete, regardless of the amount of time needed, and returns if it has completed execution.

Properties

NameDescription
AccessoryInsertionOrRemovalDetectedIndicates if any devices in the task detected the insertion or removal of an accessory since the task started. Reading this property clears the accessory change status for all channels in the task. You must read this property before you read DevicesWithInsertedOrRemovedAccessories. Otherwise, you will receive an error.
AIChannelsGets the collection of analog input channels in the task.
AOChannelsGets the collection of analog output channels in the task.
CIChannelsGets the collection of counter input channels in the task.
COChannelsGets the collection of counter output channels in the task.
DevicesIndicates an array containing the names of all devices in the task.
DevicesWithInsertedOrRemovedAccessoriesIndicates the names of any devices that detected the insertion or removal of an accessory since the task started. You must read AccessoryInsertionOrRemovalDetected before you read this property. Otherwise, you will receive an error.
DIChannelsGets the collection of digital input channels in the task.
DOChannelsGets the collection of digital output channels in the task.
EveryNSamplesReadEventInterval Gets or sets the interval, in number of samples per channel, at which EveryNSamplesRead is called.
EveryNSamplesWrittenEventInterval Gets or sets the interval, in number of samples per channel, at which EveryNSamplesWritten is called.
ExportSignalsGets the exported signal configuration for the task.
IsDoneIndicates whether the task completed execution.
StreamGets the stream for the task.
SwitchScanGets the switch scan configuration for the task.
SynchronizeCallbacksSpecifies how events and callback delegates are invoked.
SynchronizingObject Obsolete. Gets or sets the object that marshals event-handler and callback calls.
TimingGets the timing configurations for the task.
TriggersGets the triggers for the task.
WatchdogGets the watchdog configuration and control object for the task.

Events

NameDescription
CounterOutputOccurs when any of the counters used in the task reaches its terminal count.
DigitalChangeDetectionOccurs when a digital change is detected on any of the digital lines used in the task.
DoneOccurs when the task completes.
EveryNSamplesReadOccurs when N number of samples per channel, as defined by EveryNSamplesReadEventInterval, is written from the device to the PC buffer.
EveryNSamplesWrittenOccurs when N number of samples per channel, as defined by EveryNSamplesWrittenEventInterval, have been written from the PC buffer to the device.
SampleClockOccurs on each pulse of the task's sample clock.
SampleCompleteOccurs when each sample is acquired into the NI-DAQmx driver buffer and is ready for reading.

See Also

Reference

Task Class

NationalInstruments.DAQmx Namespace

WAS THIS ARTICLE HELPFUL?

Not Helpful