I would like to know the timing when the DAQ starts sampling. Thanks in advance for your valuable input.
I am using PCI-6281 board to measure the analog voltage input.
I think that the event "Timing.ConfigureSampleClock" starts the sampling.
But, there is possibility that the event "Task.Verify" starts sampling.
I would like to set delay time corresponding to the sampleperChan times the clock frequency.
But, I wonder what kind of timing is appropriate for this insertion.
~~~
myTask = New Task()
' Initialize local variables
Dim sampleRate As Double = 1000
' Create a virtual channel
myAIChannel = myTask.AIChannels.CreateVoltageChannel("Dev1/ai0", "", AITerminalConfiguration.Nrse, rangeMin, rangeMax, AIVoltageUnits.Volts)
' Configure timing specs
myTask.Timing.ConfigureSampleClock("/Dev1/PFI7", sampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, samplesPerChan)
' Configure Start Triggers (here?)
myTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/Dev1/PFI0", startEdge)
' Verify the task (here?)
myTask.Control(TaskAction.Verify)
reader = New AnalogMultiChannelReader(myTask.Stream)
reader.SynchronizeCallbacks = True
reader.BeginReadWaveform(samplesPerChan, AddressOf myCallback, Nothing)
' Prepare the table for data
InitializeDataTable(myTask.AIChannels, dataTable)
' Read the data
Dim data() As AnalogWaveform(Of Double) = reader.ReadWaveform(samplesperchan)
dataToDataTable(data, dataTable)
~~~