Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

System slows down while reading from 3 channels simultaneously

Solved!
Go to solution

Hello all!

 

I am at the very begining stage with Labview (7.0, old I know ;( ) and trying to code a routine that reads force data from 3-axial load cell(400Hz sampling frequency), filters it with simple lowpass software filter (100Hz cut off), and in future writes it down into a data file so I can use Matlab for plotting. I encountered strange delay when I read all three channels at once and I am trying to figure out what did I do wrong.

 

Here are steps in my code(I used <<read analog input>> example as a base):

 

1) I initialized global channels, in which I scaled voltage according to manufacture supplied charts

LC physically connected to SG23/SC-2345 combo which in turnes connected to PXI-6221 DAQ board

 

2) I initialized a virtual channel for pxi-6221 so I can have a control on its gain (+/-0.5v, +/-1v, +/-5v, +/-10v), and set gain to +/-1v, this gives me appropriate precision(at least I hope it does)

 

3) Wired global channels to PXI block

 

4) Set sampling rate to 400Hz

 

5) Start acquisition

 

6) Split waveform into three channels, and connected a VI for filtering to one of them

 

The thing is, once I start the program, everything "moves" so slow that made me wandering if I am doing things right.

 

 

Would greatly appreciate any comments

 

my VI:

 

 

0 Kudos
Message 1 of 4
(3,702 Views)
Solution
Accepted by topic author Oleks
The one thing you don't mention changing is the number of samples to read. The VI you posted has number of samples to read set to 4000. If you change the sample rate to 400, then of course it will take 10 seconds to acquire that many samples.
Message 2 of 4
(3,696 Views)

Oh,

 

That was a silly mistake, thanks for pointed it out  Dennis  Smiley Happy, that solved my problem.  I left "number of samples" unwired, as far as I understand this option goes along with continuous sampling mode.

 

Btw, is it still better to left it unwired if sampling is continuous, or is there a rule of thumb on number of samples per channel, when sampling is continuous?

 

Thanks in advance!

 

 

0 Kudos
Message 3 of 4
(3,683 Views)

I don't know what you mean by the number of samples was unwired. It's wired to a front panel control.

 

If it had been unwired, then it would default to a value of -1 which would mean to get all of the samples available.

0 Kudos
Message 4 of 4
(3,678 Views)