Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

VISA communication problem

Go to solution



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.


VISA configuration:




Stop_bits: 10:1


I have attached my vi file too.


Please help me out,Thank you.

0 Kudos
Message 1 of 3
Accepted by topic author shyamsdar

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.

0 Kudos
Message 2 of 3

Thanks for your reply.Smiley Happy

0 Kudos
Message 3 of 3