Arduino-sine wave test in Labview....sampling issues

Hi,

I am working with arduino uno for labview based sensor data acquisition application.
I am facing a problem of signal reconstruction at higher frequencies...as per snapshots attached.
All loop delays are set to zero but my acquired signal is getting distrorted...what could be the reason for this??

Input signal at 25Hz


Input signal at 1Hz

Input signal at 50Hz

Please post your Arduino code, so we can see what the cause is.

Hi,

Here is my arduino code....I just modified the example code and flashed it. Any special code is required for this kind of application??

#include <SoftwareSerial.h>

SoftwareSerialmySerial(2, 3); // RX, TX

void setup()
{
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);

//mySerial.begin(38400);
//mySerial.begin(9600);

}

// the loop routine runs over and over again forever:
void loop()
{
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue;// * (5.0 / 1023.0);
// print out the value you read:
mySerial.print(voltage);
delay(0);
}

delay(0)
does not do anything special.

If you want some speed you should improve the Serial to 115200
that gives more samples per minute.