Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with MSComm control
Message
From
14/06/2001 19:19:26
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00515479
Message ID:
00519761
Views:
19
>>Since your RThreshold is 1, I'm assuming you are using event driven processing. Let me see your Oncomm event code.
>
>Oncomm event code (really simple, just like other stuff):
>
>  THISFORM.Edit1.Value = THISFORM.Edit1.Value + THISFORM.OleControl1.Input
>  THISFORM.Edit1.SelStart = LEN( THISFORM.Edit1.Value )
>
Great. not a lot of busy stuff going on.

>
>>Will your cabling/DEC hardware support CTS/RTS hand shaking? Not your problem, just the way I like to do things.
>I pretty sure it doesn't, the control wouldn't work with that setting anyway, I haven't checked on the DEC yet if there is something I can change to support it. I know it uses XOn/XOff, and that works.
>

If it works, fine. Me, I don't trust it since we moved beyond 2400 baud ...

>
>>Since I can't see any extra data on the wire here, I think I would try and parse the data returned and see exactly what the DEC is responding with. The garbage in an edit box is not very useful. See if you can determine what exact control sequence is returned.
>
>Here is what is being returned, I don't know what it means though:
>CHR(30) + CHR(8) + CHR(27) + CHR(53) + CHR(30) + CHR(8) + CHR(27) + CHR(53) + CHR(27) + CHR(35) + CHR(27) + CHR(34) + CHR(30) + CHR(8) + CHR(27) + CHR(53)
>
>Thanks again Jim,
>John

AHAH! Now we are getting somewhere. My translation:
CTRL ^        Home the cursor
CTRL H        Backspace (to bottom right of screen)
ESC 5         Send unprotected page up to and including the cursor
CTRL ^        Home the cursor
CTRL H        Backspace (to bottom right of screen)
ESC 5         Send unprotected page up to and including the cursor
ESC #         Lock the keyboard
ESC "         unlock the keyboard
CTRL ^        Home the cursor
CTRL H        Backspace (to bottom right of screen)
ESC 5         Send unprotected page up to and including the cursor
If I read the above correctly, the host is trying to send you 3 pages of data, and messing with the keyboard in the meantime. 3 pages @ 80X25 = 6000 bytes going somewhere. I think you have insufficient buffer space and/or handshaking problems. As a test can you drop back to 300 bps to see if any more data becomes available? I think you are transmitting the control sequence fine, just dropping the data inbound. Others have reported problems with the control being unreliable - see here - http://fox.wikis.com/wc.dll?Wiki~MsComm32~VFP . I haven't experienced the problem, using hardware handshaking, allocating sufficient buffer space, and keeping the Oncomm event code very tight. Any massaging of the data should be done elsewhere.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform