LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data acquisition from an accelerometer

Hi,

I am trying to collect data from an accelerometer using Labview 8.5. I am trying to use one of the example VIs which seems to work but there are a few probems I'm running into. I am modifying and using an example VI called "Cont Acq&Graph Voltage" (attached), when I do continious acquisition it runs ok but when I change it to "finite samples" I get an error.

 

 

Error 200274 occurred at DAQmx Read (Analog 1DE DBL 1 Chan NSamp).vi:2

 

 

I have no idea what could be wrong. Any help would appreciated. Thanks in advance.

 

Mac

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

You need to make more modifcations in order to change this particular example from continuous to finite. I would recomend using an example made for a finite measurment to see these changes.

 

-200278 is the error I would expect you to get. This error indicates:

 

Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available.
Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.

 

Attempted to read a sample beyond the final sample acquired. The acquisition has stopped, therefore the sample specified by the combination of position and offset will never be available.
Specify a position and offset which selects a sample up to, but not beyond, the final sample acquired. The final sample acquired can be determined by querying the total samples acquired after an acquisition has stopped.

 

You should code your finite aquisition as shown below. The biggest changes come at the readVI inputs (for finite you no longer specify how many sample to read), in finite you set samples per channel at the timing vi,  and in finite notice absence of a loop around this read vi.

Here is  FINITE Aquisition

Finite.png

 

Here is a Continuous Aquisition

continuous.png

 

<Joel Khan | Applications Engineering | National Instruments | Rice University BSEE> 


Message 2 of 2
(2,488 Views)