Aaron, thanks for your help. I believe the wrong encodings setting was
causing a big chuck of the problem. I think I may still have a problem
though and here are the details:
I'm working with a Chatsworth Data Optical Card Reader, APC 100. The
Chatsworth has a FTDI Chip with a driver that makes a USB port think
it's a serial.
The system finds the fake serial port fine. I'm supposed to get 111
ASCII characters when I do a ReadAll. Instead of getting all 111
characters in one read, evidently DataAvailable fires two or three
times before I get the entire string. Right now I'm combining the reads
via a EditField to come up with all 111 characters.
Is this normal behavior or do I need to rewrite something?
Serial1 DataAvailable Code:
Sub DataAvailable()
dim SerialData as string
if val(editField5.text) >= 111 then
editField5.text = ""
editField3.text = ""
end if
SerialData = Serial1.ReadAll(Encodings.ASCII)
editField3.text = editField3.text + SerialData
editField5.text = str(len(editField3.text))
End Sub
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|