Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

triggered analog voltage acquisition using DAQmxReadAnalogF64

I need to trigger a task to read continuously an analog voltage signal, on an external sample clock signal from PFI1. Can I use the DAQmxReadAnalogF64 command  if I need to trigger the start of the acquisition from a digital rising edge signal on PFI0, or do I have to choose another command? I am writing in Visual Basic 6.0, using a PCI-6259 board.
0 Kudos
Message 1 of 4
(2,766 Views)
Hi cadillac_man,

You need to use the DAQmxCfgDigEdgeStartTrig function to configure the trigger with the analog start. Please look at the help file located at C:\Program Files\National Instruments\NI-DAQ\Docs\cdaqmx.chm for more information.

To configure the clock to use an external source, you can configure it using DAQmxCfgSampClkTiming and specify the source to be PFI1.

The two functions above can be added to a basic example program which is located at C:\Program Files\National Instruments\NI-DAQ\Examples on your hard drive.

Please let us know if you have any further questions.

Best regards,

Nathan Yang

0 Kudos
Message 2 of 4
(2,749 Views)
Nathan,
Thanks for the advice. I got the program running great. I did have one question though; when I am using an external clock signal, how come I have to enter a rate into the syntax:

DAQmxCfgSampClkTiming(taskHandle As Long, source As String, rate As Double, activeEdge As DAQmxEdge, sampleMode As DAQmxAcquisitionType, sampsPerChan As Long)

What role does this frequency rate play in how my samples are taken, when using an external source. Is this the rate at which the hardware reads the value from the input?

Nathan
0 Kudos
Message 3 of 4
(2,741 Views)
Hi,

The rate is so that the software knows approximately the rate at which you're acquiring data. It uses this information plot the data, or fill in timing information when saving into a waveform.

Please let us know if you have any more questions.

Best regards,

Nathan Yang
Applications Engineer
National Instruments


0 Kudos
Message 4 of 4
(2,737 Views)