Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

daq card 6062e problems with acquiring analog signal

Dear Friends,
I am using DAQ card-6062E with DAQmx version 7,2. I am trying to acquire an ECG data (analog data at one channel) for 8 seconds (and/or for 1 second) with a sampling rate of 250 sample\sec. I have a lot of porblems because I am not able to configure my card. I do not know how to use the DAQmx Timing (Sample Clock).vi or DAQmx Read.vi and I do not know how to configure them to achieve the task I need.
please help me, i am still beginer in labview programing.

thanks in advance.
0 Kudos
Message 1 of 8
(4,404 Views)
 
 

Use an example vi from Examples shipped with LabVIEW. Read its documentation to understand how to use it

LabVIEW>>Find Examples>>Hardware input and output>>DAQmx>>Analog Measurement>> 'Voltage' folder will contain the example vi's

You could start with  "Cont Acq&Graph Voltage-Int Clk.vi' for your application

You could also use DAQ assistant to begin with

For further reading on DAQmx functions, see this link

Any doubts, do ask

Regards,

Dev

 

Message Edited by devchander on 05-31-2007 01:44 AM

Message 2 of 8
(4,391 Views)
Dear friend,
thanks a lot, I read the document and I start with the exapmles you said about. they are very helpfull. I know able to acquire some analog signals and it looks good, but I still have a problem which I could not find a solution for it. I am taking 8 seconds data (ECG) and then doing some processing and calculation (which take up to 0,5 seconds) and then returning back to acquire the data. During this process, I am lossing some data which passed during the calculation time. So, can I run for example a buffer in the background to collect this data and then use them afterwards without loosing any part of data.
thanks in advance.
0 Kudos
Message 3 of 8
(4,385 Views)
For such an application, I would suggest the Producer-Consumer Design Pattern
 
Read this link to understand the concept
 
Hope this helps,
 
Regards,
Dev
Message 4 of 8
(4,382 Views)
thanks a lot again. but i spend the last hours learning this method and testing producer/consumer loop, but i could not successed. Actually the processing take a lot of time about 0,5 seconds and when i am coming back to acquire the data and add it to previous ones, I found that there is discontinuity in the signal. i mean the signal appear as if i connect two parts together (and not continous). Please if you have a different method, show me how to do it.
thanks a lot.
0 Kudos
Message 5 of 8
(4,375 Views)

Hi,

 

 

If the producer-consumer programming is giving you trouble, I would suggest doing a finite acquisition (acquiring samples for all 8 seconds at once) and then doing post processing afterwards. The example ‘Acq&Graph Voltage-Int Clk.vi’ will work for this purpose, and you can have it return an array of doubles instead of a waveform if you would like.

The reason this solution will work for you is because the DAQcard-6062 has a buffer of 8,192 samples (6062 Specifications , p.77), and you will only acquire a total of 2000 over 8 seconds. (250S/s * 8 seconds = 2000 samples total). Since the 2000 samples can fit in the buffer, than you can do a finite acquisition, where it will acquire all samples and return them when done. Please make sure the timeout of the DAQmx read is 10 seconds or more to allow for a bit of extra time.

 
David L.
Systems Engineering
National Instruments
0 Kudos
Message 6 of 8
(4,352 Views)
Dear Friend,

I test your method, it is working good, but I am still missing a part from the signal during the processing. I am monitoring the ECG signal and that means I can not miss any part and I have to let it acquire the signal continuously. So, can I run a buffer in the background to collect data continously with sampling rate of 250, and each time, I take out 1 sec (or 8 sec) of the data from the buffer and then make the processing.... By doing so, each time, I free the buffer to collect a new part from the signal and in the same time I am not losing any part.
I was trying to do that by taking a finit number of samples acordind to the program I attached here, but unfortunately , i falled. (I do not know how to make such a buffer and how to control it !!!)
thanks in advance.
0 Kudos
Message 7 of 8
(4,301 Views)

Hi,

Try using the Cont Acq&Chart Samples-Int Clk.vi from the example finder.  Set the rate to 250 and the samples to read at 2000.  This will then take 8 seconds of data, which not overflow your buffer as described from a previous reply.  Now try to incorporate Producer-Consumer architecture into this example.  This way you are continuously acquiring data without overflowing your buffer and manipulating the data without any discontinuity in data.

Respectfully,

Rob F
Test Engineer
Condition Measurements
National Instruments
0 Kudos
Message 8 of 8
(4,260 Views)