Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

problems with DAQ on PDA with CF 6004

HI, I have Dell Axim x51v and I am trying to sample 4 channel ( with force sensors) continuously at slow rates of 20-25 Hz with CF - 6004. I took one of the analog cont. examples ( from DAQmx base) and changed the configuration to 4 channels . here I am having several problems :
1. Hardware rate doesn't goes below 196Hz, why? how this will affect the program ( regarding the speed of the DAQ) if I will leave it as is and make a delay in the loop in order to achive slower rates? how can I make it sample 1 point from each channel at a low rate?
2. After insert a delay the program sample the data but there is a delay between the applied load to the sensor until the data is presented on the screen of the PDA - using a wavefrom graph. How can I correct it , make different dfinitions , in the program in order to avoid this delay? In addition, the example use " analog 2D DLB" . if I change it to " analod 1D DLB" ( as I know to be the opption fro multiple channels single sample" ) , nothing happen and I can't get the sample at all. why?
4. How can I get the numeric value of the samples ( I tried what I know from sampling with PC but it won't work)?
5. After sampling the data for about 2 minutes the program stop with an error, something about not enough screen memory error number 200036. what is this error and how can I fix it?
 
I will appriciate any help you have
Thanks
Eran
0 Kudos
Message 1 of 27
(6,775 Views)

Hello Eran,

1.  This is a limitation of the hardware you are using - it is detailed in the datasheet.  If you add a delay in the loop you will continue to acquire at the same rate, but will not read from the buffer fast enough, causing a buffer overflow error.  According to the readme, "Single-point analog input (AI) is not supported."  This is why analog 1D DBL does not return what you expect.  I would recommend sampling at a faster rate, such as 250 S/s and then parsing the data so that you only get datapoints that correspond to a rate that you want. 

2.  How long is this delay?  PDAs can be slow when it comes to updating graphs because they don't have as much processing power.  In addition, if you are acquiring 100 samples with your DAQmx Base Read function, you have to wait for some amount of time while those samples are acquired before they will be displayed on the graph.

4.  I don't really understand what you are looking for with this question - Could you clarify?

5.   Could you get a screenshot of this error message? 

I am attaching a VI that I modified to work the way I think you want it to.  Do not change the task settings for the CF 6004 in the NI DAQmx Base Configuration Utility.  The VI samples at 250 S/s and retrieves 10 samples at a time.  I take only the first sample of the set from each channel and discard the others.  These samples are plotted on a waveform chart.  This gives you an effective sample rate of 25 S/s. 

I hope this helps!

Laura

 

0 Kudos
Message 2 of 27
(6,753 Views)
Hi Laura,
First thank you for your detailed answers.
1. I will try to clarify question number 4. I am intending to use the sampled data to make some kind of calculation and to save it into a file, but I can't get the numeric value of the data from each channel. I can't find the proper index of each channel from the 2d array the read function give me.
2. I look into the VI you send me . I don't understand few things:
   a. Why you kept the delay in both loops?
   b. I don't have the task you worte in my configuration utility. Can I just make a new task with the specification you worte : 4 channels, 250s/s rate and 10 samples per channel?
 
3. The error code I gave before was wrong . this is the correct one : the code 200361. I will send you a screen shot of the error message later on.
 
Agian thanks for your help
 
Eran
0 Kudos
Message 3 of 27
(6,749 Views)

Hi Eran,

Did you try to get the data with the VI that I posted?  In particular, the output of each Index Array function will have a datapoint from a different channel.

I kept the delay in both loops for the following reasons:  In the outer loop, you are polling to see if the user has pressed the "start" button so you do not want to burden with processor with polling very fast.  Once the "start" has been pressed, the inner loop begins to run.  For the most part, your loop should take about 40 ms to run because you are reading 10 samples at 250 S/s each loop iteration.  However, if for some reason one iteration takes a long time, the hardware continues to acquire at that same rate.  The next iteration could go very fast because the DAQmx Read VI only needs to pull in the next 10 samples sitting in the buffer.  The 5 ms wait ensures that the loop iteration where this is occurring doesn't go to fast, choking the processor from performing other tasks. 

The task I used was the standard one from the examples.  If you do not have it, you need to import the correct task list.  To do this, click Import Task List and choose the list named CFDAQExamples.cfg.  The only thing you need to change is to select all four channels for the task that I used.  Remember that the 10 Samples/Channel is specified in the VI itself. 

Do you see this same error with the VI that I posted?

Thanks,

Laura

0 Kudos
Message 4 of 27
(6,747 Views)
Hi Laura,
 
1. I ran the VI you sent me :
a.
0 Kudos
Message 5 of 27
(6,730 Views)

Hi Laura,

For some reason my message from yesterday was cut so here it is again.

I tried to run the VI you sent me and still there are problems:

1. There is a delay of about 15 seconds between the activation of the sensor till the data is presented on the screen. Furthermore, after continuous runnig of about 2.5 minutes I got the same error message saying that : " Onboard device memory overflow. Because of system and/or bus-bandwidth limitations the driver could not read the data from the device fast enough to keep up with the device throughput. Error code : 200361".

2. If I changed the task to include 4 channels, It won't show sampled data that is measured from the 4 channels simultanly. Even worse , it presents the first data that is collected from one of the sensors and then nothing is presented.

3. I added a numeric indicator to the output of the each one of the index array( see attachment). when I tried to run this VI no data was presented nor on the waveform chart, nor in the numerric indicator.

 

I am appriciat your help,

Eran

0 Kudos
Message 6 of 27
(6,718 Views)

Hello Eran,

It sounds like the PDA does not operate the program fast enough to pull the data from the buffer before it is over written.  You will need to vary the number of samples to read and the sample rate to find the best combination for your device.  I would suggest starting by reading more samples each loop and then parsing just the data you need to achieve the 25 S/s you are after.

Also, when I ran the program here, I saw data from all channels on the graph.

I don't see the attachment you describe.  However, I originally did the same thing and the indicator had data in it.  Is there a task listed in the drop down box when you are running this program on the pda?  There should be, so you may need to make sure of this and check in the task configuration utility that the correct task list is shown when you download to the pda.

Have you changed the sample rate from 250 S/s at all?

Regards,
Laura

 

0 Kudos
Message 7 of 27
(6,709 Views)

Hello Eran,

Have you tried my suggestions? 

Also, can you post the specifications of your device so that I can try to find one to recreate the situation and offer other suggestions? 

Please post:  PDA model and model number, type of processor and speed, amount of RAM, OS and any other pertinent information that you can think of.

Regards,

Laura

0 Kudos
Message 8 of 27
(6,690 Views)

Hello  Laura,

I tried your suggestions. No mater what  choice I made for the sample rate and number samples per channel the delay still there. furthermore, it still show only the first data that I activate and can't handle 4 channels simultaneously.

_________________________________________________________________________________________________________________

the spec of my PDA are : Dell Axim x51v

1. Processor:  Intel XScale PXA270 processor up to 624MHz.

2. Memory : 64MB RAM, 256MB NAND Flash ROM.

3. OS: Microsoft windows mobile version 5 software for pocket pc premium edition.

 

0 Kudos
Message 9 of 27
(6,681 Views)

continue . . .

4. Dispay : QVGA, VGA TFT color 16-bit. Touch sensitivity transflective display. 3.7 inches screen size. 480X640 at 65,536 colors resolution. 100 nits LCD brightness.

5. Expansion slots :

                a. Secured digital memory card : one Secure Digital memory card slot (3.3v) , supports 1 bit and 4 bit SDIO card.

                b. Compact Flash card : one compactflash type II card slot (3.3v).

0 Kudos
Message 10 of 27
(6,681 Views)