Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MsComm control problem
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
MsComm control problem
Miscellaneous
Thread ID:
00684163
Message ID:
00684163
Views:
61
I'm using the mscomm control to send and receive information with a scale. the machines are mutually set to 9600,n,8,1 and handshaking is set to 2-rts/cts.

All works well when receiving from the scale; handshaking appears to make the scale wait for the computer to process. However, when going the other way, the mscomm32 control seems to spit out the data in chunks with pieces missing.

I determined that I had a timer running which was actually checking the inbuffercount and placing a message on the screen if not zero. However, this appears to reset the buffers. Setting a trace on the outbuffercount appears to reset the buffer as well. Unfortunately, I have found no way to see if the data is staying in the output buffer or is being reset because checking the buffer size appears to clear it.

In addition, the oncomm event appears to be firing after some interval with the status of "1" when there is no connection to the scale and handshaking is on. My impression (or misguided wish) is that the oncomm should fire either after a send or change in status is detected. Otherwise, it should wait, buffer ready, until something is ready at the other end.

How can I check for proper operation of the com port without changing the nature of it in the process (kind of the "microscope on the atom changes the atom" routine...)?

Thanks
Steve Howie, owner
DaSH Technology
Denver, CO
Next
Reply
Map
View

Click here to load this message in the networking platform