I never thought of that. I suppose in Inputlen=0 that could be a problem.
Printable View
I never thought of that. I suppose in Inputlen=0 that could be a problem.
If reading from .Input when InputLen is 0, this could reveal the problem.
In this case we must put an If .InputLen > 0 before the .Input statement.
I really wonder why the terminal program can read successfully and we can not...
Inputlen is a user setting is it not? Not sure about MSComm but in SAX comm a setting of 0 means read the entire buffer any other value means read this number of characters.
Well, yes so it seems. I was falling for that, too.
But look, you were also going on about doing an If MSCOmm.InputLen > ) then do the input. :)
But as it seems we were only referring to the wrong property.
It is MSComm.InBufferCount which reflects the number of characters waiting in the InBuffer to be read.
So in fact what we want to do is
If MSComm1.InBufferCount > 0 Then i$ = MSComm1.Input, while we have set
MSComm1.InputLen to 0 to signify that we want to read all of the buffered characters.
I am thinking that either this device is not compatiable with MSComm or there is a property set on MSComm that should not be set and we have not been told about it as of yet.
I would suggest that the OP upload the project and let us have a look at the code and properties.
My money is till on the USB device...
I just did a quick search and it appears as though there is an sdk that may be required here.