VB6, MSComm, and working in BINARY mode.
Posted on 2007-07-19
I am using VB6 and the MSComm control.
I have written several programs using the above and they are working OK. So I'm not a beginner to the concepts :>
I am working with a device that I can communicate to using RS232. The way it works is this
Send a REQ
Get and ACK
Send a Get Data request
Data is recieved in 8 blocks of 128 characters. I send an REQ after each 128 block.
The difficulty I am having is that sometime I get only hald of the data. I suspect that because I am using the TEXT mode I am getting a character that is blocking transmission (Likie and EOF, Cntrl Z, or something like that)
I would like to try working in BINARY mode however I can find little information about that. Does anyone have some example on this which shows how I processes that data coming in in the MSComm event routine. After recieving I will still need to deal with the data as strings for comparisons.