Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I read out my aquired samples

Hi,

I am using MS Visual C++ to programme my application. First I tested my devices (NI PCI 6250, NI SC-2345, SCC-SG24) in MAX. Everything is working well. I have created a task and I can receive samples from my device using the test panel.

I want to use the anolog input from channel 0 for example to measure strain. That's why I used the example VC_ContStrainSamples.c to get started.

First I modified the programme using the functions DAQmxErrChk (DAQmxLoadTask("",&taskHandle)) to get my task from MAX working. The problem now is, that I don't know where to read out the samples. I thought there must be an array or something else but I can't find one. Is that correct?

When I use the function DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"?????",10.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000)); I get an error message that says unknown source terminal. What is a source terminal? I am using a German version of Max. Can someone give me an example what to use instead of ?????

Thanks BJ



0 Kudos
Message 1 of 2
(2,548 Views)

1. You have to use a function to get the values (DAQmxReadAnalogF64) for example. This Function has a parameter readArray[] where the acquired data is stored.

2. DAQmxCfgSampClkTiming(taskHandle,"?????",10.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000) The second paarameter defines the source of the sampleclock, you can specify a external clock source (for example "PFI0") or the internal clock ("Onboard Clock").

 

All functions are described in detail in the help file by the way (Start-Menue-->programme-->national Instruments-->ni-daq-->ni-daqmx c reference help).

 

0 Kudos
Message 2 of 2
(2,532 Views)