Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration of CF 6004

hi,

   i want to use CF6004 to aquire data from 4 analog signals.  The sample rate is 2000 samples/second(the 4 signals are the same).

   

when i use  NI-DAQmx Base Task Configuration Utility to configure this task, i  just do not know how to set Scan Rate and Number of Scans.

 

though i have search the means of Scan Rate and Number of Scans, i feel that it is difficult to understand. 

 

I am using Labview 8.6 and NI-DAQmx Base 3.2. 

0 Kudos
Message 1 of 8
(4,751 Views)

Hello luckypenguin

 

Try taking a look at the DAQmxBase Timing.vi.  This vi has a place where you can specify the sampling rate per channel and the number of samples.  Also, you can see the online help of this function to see the detailed explanation of this function.  Just press Ctrl + h and the help menu will show up, and the online help link will also show up in the help menu. 

 

Best regards

 

Noboru Urakawa

National Instruments Japan

Application Engineer

0 Kudos
Message 2 of 8
(4,721 Views)

hi Noboru Urakawa,

 

 thank you for your reply.

  

As i have looked at DAQmx Base Timing.vi, i did see samples per channel and sample mode.

But, in this VI, there is a case structure and in this structure there is no setting for  CF6004 device,

just have ESeries and USB 621x.  

 

 In stead,  in DAQmxBase Start Task CFDAQ6004.vi, i see Scan Rate and Number Of Scans.

Also in CFDAQ6004 Globals.vi, I find the next explanations but can not figure it out.

 

Parameters used for CFDAQ6004 DIO

 

Scan Rate:

Rate in Hz of the acquisition

 

Number Of Scans:

Number of scans to acquire for a finite acquisition

 

Enable List:

There are 4 channels on the device.  A value of "True" means to enable the channel for the acquistion

 

  

Parameters used for E Series AI scans.

 

Scan List:

   Set coupling, gain, channel and bipolar/unipolar for each element in the scan list.

 

Scan Rate:

   Set the overall scan rate.

 

Convert Rate:

   Set the rate between convert pulses in the same scan.

 

Number of Scans:

   Set the number of scans in the acquisition. 

 

 hope your help.

 

best regards

 

 

0 Kudos
Message 3 of 8
(4,718 Views)

Hello luckypenguin

 

Sorry about my misunderstanding.

You are right about using the NI-DAQmx Base Task Configuration Utility in order to use CF 6004.

I am not able to test this since I do not have a PDA with me but you can select CFDAQExamples.cfg from "import task list"

and be able to use CF 6004.

If you are planning to use 4 channels, you should put the check mark on all 4 channels.

Scan rate of 2000 and number of scans of 2000 as well.

This way, the device will retrieve 2000 samples in 1 sec.

 

best regards,

 

Noboru Urakawa

National Instruments Japan

Application Engineer

0 Kudos
Message 4 of 8
(4,694 Views)

hi N.Urakawa,

Thank you for your solution. It is really help.

 

Now in this situation, that  i set Scan rate to 2000 and number of scans to 2000, 

is there any difference or problem between  finite aquisition and  continual aquisition, if  do not consider the application software.

 

and sorry,  today i had a new problem when using  DAQmxBase Read CFDAQ6004 (Analog 2D DBL NChan NSamp).vi (this VI is called by DAQmxBase Read (Analog 2D DBL NChan NSamp).vi  used in my project)

this VI has an input of [number of samples per channel],  which i think it is the number of samples you want to read.

But when i see the Source Code of this VI, there is a case structure which checks  [number of samples per channel] parameter,

in this structure only -1 and 0 are used, all the other values are ignored.  if it is -1, the Number of Scans is used if it is 0, 0 is used.

 

is this means that if i would like to read 2000 samples from CF6004 with  DAQmxBase Read (Analog 2D DBL NChan NSamp).vi

i must set number of samples per channel to -1? (the background is that i have set Scan rate to 2000 and number of scans to 2000, with finite aquisition or continual aquisition.)

 

below is the help of this parameter that let me feel confused.

 

number of samples per channel specifies the number of samples to read.

If you leave this input unwired or set it to -1, NI-DAQmx Base determines how many samples to read based on if the task acquires samples continuously or acquires a finite number of samples.

If the task acquires a finite number of samples and you set this input to -1, the VI waits for the task to acquire all requested samples, then reads those samples.

 

Hope your help.

 

best regards.

 

 

Message Edited by luckypengiun on 01-22-2009 12:24 AM
Message Edited by luckypengiun on 01-22-2009 12:27 AM
0 Kudos
Message 5 of 8
(4,692 Views)

Hello luckypenguin

 

Lets answer you question one at a time.

 

1.  The difference between finite and continuous is that if you set the "samples to read" to 2000, finite will only grab the first 2000 data points.  When it is set to continuous using while loop, the vi will continuously read 2000 data points every second (assuming that the rate is also set to 2000).

 

2.  On the second question about the setting for the [number of samples per channel], since it says that if it is -1, the Number of Scans will be used.   Therefore, I would set the [number of samples per channel] to -1 and set the [Number of Scans] to 2000.  This way, the function will use the value listed in [Number of Scans].

 

number of samples per channel specifies the number of samples to read.

If you leave this input unwired or set it to -1, NI-DAQmx Base determines how many samples to read based on if the task acquires samples continuously or acquires a finite number of samples.

If the task acquires a finite number of samples and you set this input to -1, the VI waits for the task to acquire all requested samples, then reads those samples.

 

The above statement is saying the if the [number of samples per channel] is set to -1 when it is in finite mode, the vi will wait until all of the data are collected and read them at once.

 

Hope this answered your question.

 

Noboru Urakawa

National Instruments Japan

Application Engineer

Message 6 of 8
(4,686 Views)
Hi Urakawa,

Thank you for the explanations and Sorry for so many basic questions.
i am really a newbie of Labview and have used Labview for only two months.

So to confirm my understanding, i have made two examples
for this problem. In this examples i have imported CFDAQExamples.cfg   
with NI-DAQmx Base Task Configuration Utility.

does this two program have the same operation?
or, will i get 2000 samples for each of the  four channels 
every loop? 
 
The finite aquisition and continual aquisition has no relationship
with CF6004 device, the CF6004 will start Read samples after StartTask,
and will continue to read samples at the speed of 2000 Samples/second  until StopTask,
even if the program is in the StorageData or DAQmxBase Read function and CF6004's FIFO is full, is this right? 

Hope your help.

best regards.
 
0 Kudos
Message 7 of 8
(4,666 Views)

Hello luckypenguin

 

Have you tried running the actual vi?

 

I would go with ai cont buffered.

The reason is that if this was tested with DAQmx and the PCI device that I have,

combining finite with while loop results in an error.

When while loop is used, the read function should be set to continuous.

However, this is tested with DAQmx and not DAQmx Base task configuration utility so the function might be different.

Therefore, you should try it out first with the ai cont buffered.

 

CF6004 starts reading after it reaches the Start task and in each loop, it will read 2000 data points and store them in the FIFO.

After the data points are stored, it will clear the FIFO memory and become ready for the next 2000 data points.

When the requirement to stop the loop is confirmed, it will go to stop task and will end the vi.

 

Hope this helped.

 

Noboru Urakawa

National Instruments Japan

Application Engineer

0 Kudos
Message 8 of 8
(4,641 Views)