02-10-2012 12:30 AM
Gents
just I question, I need to acquire data fast possible (near 500 Hz) from Arduino not for only one pin but at least 3 pin. With last one LIFA version (1.6) I used Analog Port, building array and plot on graph... using
"Continuous Sampling" on LIFA 2.0 is it possible make it? acquire from analog port at rate 500 Hz
thank you
roberto
Solved! Go to Solution.
02-10-2012 06:31 PM
Hey Roberto,
I tested a single channel up to around 5KHZ with continuous sampling. That being said that is set up for a single channel. You should be able to get around 5K/number of channels. This will require changes to both the sketch and the LabVIEW code. Since we are not at the size limit of the Arduino packet I would suggest making a new command from the same framework that just sends 3 data points (one from each channel) back at a time instead of 1.
02-22-2012 06:48 AM
Gents
I am still working to fast analog read without progress! Let me explain:
Like wrote previously, my task is acquire data as fast possible from at least 3 channel (i use arduino 1).
For make this, whit Kevin's advices try to modify both sketch and labview code, with poor result.
In particular i modify sketch in order to add new variable called
"unsigned char contAcqPin1;"
and in LabviewInterface.pde
under
// Variables
unsigned int retVal1;
under
case 0x2A: // Continuous Aquisition Mode On
contAcqPin1=command[9];
also modify labview code
Continuos aquisitionON.vi (here adding a new pin controller) and
Continuos aquisition sample.vi (adding join number and replace arry subset)...
Someone could help me?
thank you
roberto
03-12-2012 03:17 PM
Have you tried Finite sampling in 2.0? Portread is slow when you want to read multiple samples (faster when you want to take single readings of multiple pins' high/low states)
Try setting up successive finite sampling at 5khz, say 100 samples, then switch to the other pin. I like to median filter these samples to smooth out the data.
Also, if you are doing comparisons between the analog pins you're sampling, you may instead connect the voltage sources that you would've connected to those analog pins to an instrument or different amplifier and connect the output from that instr. amp into the arduino (limits the pins you need to read from). You will have to decide if this will work for your application. Good luck.
05-26-2012 08:23 AM
Hello
I'm coming back in this older post because still I can't fix this problem.
Unfortunately the solution previously proposed didn't work.
Somebody know exactly how modify arduino sketch and labview code in order to acquire continuous sampling at least at minimum 3 analog pins?
I try to change both, but really I don't know where is key point.
Kevin_F, could you help me?
thank you
roberto