I interfaced a simple ADC to my Microcontroller and the Microcontroller to PC using serial port.
I vary the analog input to the ADC using a POT.
I used VISA in LABVIEW2010 to get the data from serial port and display it in a waveformchart.
But I have some problems in doing so.It(LABVIEW) receives the data properly at one instant and misses it the other instant,sometimes I get a part of the data.Also I get some FRAMING ERROR also occassionly.
I send the ADC value as 3decimal digits( from 0-256 as my ADC is an 8-bitADC) followed by a linefeed(0x10) from my microcontroller for each sample. I dint give any delay except for the conversion time of the ADC.
I have attached my vi file too.
Please help me out,Thank you.
Solved! Go to Solution.
You've got several problems and all of them have been explained in numerous threads.
First, the VISA init and close belong outside the loop. Second, delete the constants you have for the init function then simply right click on the inputs to the VI and select 'Create Constant. You will get the correct data type and eliminate the red coercion dots. Third, if you are sending 3 ASCII characters (i.e. ASCII '123'), then simply set the VISA Read for 3 bytes and skip the VISA Bytes at Serial Port. Fourth, an 8 bit DAC goes from 0-255.