April 30, 2004

SREAL buffer read issues - solved

Problem solved. The GPIB read vi and the Keithley 6430 interact in a funny way. If you split the read into two portions, it won't work properly because the last character of the first read shows up in the first character of the next read. The original Keithley 6430 Buffer Read.vi had two problems. The :TRAC:DATA? read was split into three sections: reading the header "#0", reading the data, and then reading the LF (linefeed) character. Because of the error I discussed above, data was not being properly read into labview. In the second read, the byte for "0" shows up before the data, shifting the dataset by 1 byte, this had two effects - it caused the data to read in funny and it caused the primary vi to crash when run again since there were characters still left in the buffer. I solved the problem by reading the entire block, +1 extra character in one swoop, and then stripping the first two characters out before conversion. You need the extra character so that it doesn't leave the LF in the buffer. If you don't have it the next run will crash.

Before

bufferread_old.PNG

After

bufferread_new.PNG

Download file

Posted by torque at April 30, 2004 10:39 AM | TrackBack
Comments
Post a comment









Remember personal info?