01-18-2006 02:18 PM
01-19-2006 06:36 PM
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
01-20-2006 01:43 AM
01-20-2006 11:27 AM
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
01-22-2006 02:49 AM
01-23-2006 01:29 AM
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
01-23-2006 01:30 PM
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
01-25-2006 09:46 AM
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
01-25-2006 11:15 AM
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
3. OS: Microsoft windows mobile version 5 software for pocket pc premium edition.
01-25-2006 11:16 AM
continue . . .
4. Dispay : QVGA, VGA TFT color 16-bit. Touch sensitivity transflective display.
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).