01-16-2010 02:07 PM
Hi All,
I am working with Li-ion batteries that gives out codes every second through an RS-232. With these codes you can get battery voltage and other stuff.
To read these values and store them in excel I created a program in labview using the VISA reader. I tried to run the program a few times and it worked well initially.
After that I also called in a DAQ function to read other values from an NI 9206 module. When this change was made to the program the problem arose. I am able to get vaules and run the program for a while. But within a few minutes the program gives an error saying " Error - 1073807252 occured at VISA read in serial reader.vi" ( I have attached a screenshot for this).
Would anybody know why this problem is occuring? Any suggestions would be helpful. I am new to VISA read and not sure why this error occurs.
I have attached to VI's.
1. with the DAQ function
2. without the DAQ function
Thanks,
Rahul Patel
Solved! Go to Solution.
01-16-2010 02:57 PM
As the message says, you are not reading the serial data fast enough. As you say, the device sends data every second. If you don't read this data at least this fast, eventually the serial buffer will overflow because of unread bytes will be overwritten. Your acquisition loop is guaranteed to be longer than a second. The DAQ Assistant is taking a second to acquire the data because that is time you have specified. Reduce the number of samples or place the DAQ Assistant in a separate loop.
p.s. Please clean up the code a bit. Get rid of all those case statements that do not do anything and don't use local variables - especially the one for the serial string response.
01-16-2010 06:03 PM
Dennis,
Thank You for the suggestion. I reduced the sampling rate on the DAQ assistant and the program now seems to be running fine.
Thanks,
Rahul Patel