09-06-2005 10:47 AM
09-06-2005 10:52 AM
09-07-2005 03:49 AM
@Mad_Bob wrote:
[...]
The meter continually sends data. Start byte is #$02, end byte is #$0D, all other bytes are ascii.
Problem is, my code does not always 'grab' the bytes.
[...]
Open VISA serial port once at the beginning of your program and set the termination character to x0D and the timeout say twice the sending rate of your meter.
In a (while) loop read the data with one serial read and ignore the first string read since you will sometimes start your open VISA during a data transmission. If the meter always send the same amount of data, you can use the bytes read value to check your data.
After you terminate your loop (stop button) close the VISA port
09-07-2005 05:57 AM
09-07-2005 07:07 AM