LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DC offset problems with ContAcq&SelectableSave VI

I am using the ContAcq&SelectableSave VI from the ni.com examples page to acquire and save a continuous analog signal.  I want to sample the channel every second, however, when I run the VI the waveform chart displays the signal between 0.2 and 4 volts when it should be -2 to 2 volts. 
 
I am using LabView 7 Express with a PCI-6034E card.
 
I have set the signal generator to 1Hz and set the VI as follows:
 
scan rate: 1Hz
scans to read at a time: 10
buffer: 20
 
Is there a reason for this? Because when I sample a 40Hz signal at 200 Hz it seems to work as expected.
 
I am intending to use this VI to continuously save analog data over a long period of time such as a number of weeks is this a suitable vi for this task?   
 
cheers
 
Pauldoc
0 Kudos
Message 1 of 5
(2,739 Views)
Pauldoc,

i better first of all write what i understood from your post:
you want to acquire analog data with a PCI-6034E continuously. the signal you want to acquire is a periodically signal with no offset and a voltage between -2 and 2 Volts (e.g sine, triangular). one period takes 1s, the frequency is 1Hz.
you use the correct VI, but your setup for the VI is scan rate 1Hz. it is configured to be buffered (hardware timed, 10 samples at a time) which is correct so you should get one array of samples every 10s.
now the problem is that you mess up with a fundamental for analog input: NYQUIST. please refer to the following link .
therefore NI suggests to sample analog signals with 10 times the frequency you want to acquire at maximum, so for your application it would be 10Hz.

Norbert B.
NI Germany

Message Edited by Norbert B on 10-11-2005 03:52 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,719 Views)

Nobert B

Thanks for the information and the link it was very useful and solved the problem for acquiring a 1Hz signal, however, I am now having other problems that I would appreciate you helping me with.  I am still using the "ContAcq&SelectableSave" VI but this time I want to acquire a slowly changing DC signal (output of a thermocouple). 

I only want to sample the signal once every 5 seconds to reduce the memory size of the saved data.  Is this possible with this VI because the "AI Start" Sub VI's scan rate is in scans/sec?

Before trying to sample every 5 seconds I tried sampling at 1Hz but this too gave me problems as the DC signal I acquired was displayed as 3.8 Volts when the supply was displaying 2 Volts. 

cheers 

Paul    

0 Kudos
Message 3 of 5
(2,706 Views)
Paul,

The sampling rate should have nothing to do with the value of the voltage measured (assuming that you are satisfying the Nyquist criterion, of course). What is the source impedance of your signal? Are you sampling more than one channel? Have you properly terminated all unused channels? Does your system provide for the DC bias currents of the inputs?

I ask these questions because the multiplexer inputs on multichannel data acquisition boards can produce strange effects if not configured properly.

Lynn
0 Kudos
Message 4 of 5
(2,701 Views)
Paul,

another very important point you have to check is known as "grounding issue". it describes how you connect severals signals to your DAQ-device and how you acquire them.
for the signals, there are two possibilities: grounded (any source connected to ground like signalgenerators)  and ungrounded signals (e.g. battery).
for the DAQ-setup, there are in general three possibilities: differential, referenced single-ended (rse) and non-referenced single-ended (nrse). please refer to the DAQ-manual (in the NI-DAQ-folder in docs, there is the daqhelp.chm-file) for further infos about the combinations of the signals and the DAQ-setups.
i asume that either you have the wrong setup in regard to your connected signals (setup e.g. differential which is the default, but you connected the signal as rse) or you created a ground loop.

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 5
(2,690 Views)