09-28-2013 06:23 AM - edited 09-28-2013 06:43 AM
Well I Take The (MutiChannel ADC )Input From A Microcontroller.i.e uC has 6ADC uC does its work and sends it serially..
my problem is when i use a write waveform to file....
the TDMS contians more than 2 values for the same time
hence when i o/p the waveform is wrong.....its much igger(time sense)
How to Build A Waveform With Instantaneous Values Of Amplitude
Solved! Go to Solution.
09-28-2013 11:18 AM
09-29-2013 11:02 PM - edited 09-29-2013 11:06 PM
void setup()
{
Serial.begin(9600);
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(A2,INPUT);
pinMode(A3,INPUT);
pinMode(A4,INPUT);
pinMode(A5,INPUT);
while(1)
{
if(Serial.available())
{
Serial.write("TESTING\r\n");
Serial.read();
Serial.read();
break;
}
}
}
void loop()
{
int ip0,ip1,ip2,ip3,ip4,ip5;
ip0=analogRead(A0);
ip1=analogRead(A1);
ip2=analogRead(A2);
ip3=analogRead(A3);
ip4=analogRead(A4);
ip5=analogRead(A5);
char signal[25];
sprintf (signal, "%04u%04u%04u%04u%04u%04u",ip0,ip1,ip2,ip3,ip4,ip5);
Serial.write(signal);
}
this is the code for the arduino
As u can see from attached image.... for the same time it shows it shows different values .... henc the output is longer
the laview code is not complete yet.... so please dont sy the code is bad ....i know it is .... this is just to see if everything works
09-29-2013 11:26 PM
What is the .tar file you attached?
Looking at your screenshot, I see the timestamps in your table. Are you relying on Windows timing to get the timestamps? Do you know that Windows only has a resolution on its clock of about 16 milliseconds? That is why you see several pieces of data with the same time, then it jumps 16 milliseconds.
09-29-2013 11:31 PM
Ok so how do i write waveform data .... into some file and use it later
09-30-2013 12:21 AM
Thanks Man...16ms was the problem i just had to resample the signals