Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial echo / terminal object for BCB5

Status
Not open for further replies.

finnmike

Programmer
Oct 17, 2001
50
DE
Hy guys! (Both from mars and venus!)

I am new today, really happy about this forum. Good answers, good questions!

Now I would like to try to solve my most urgent problem:

I am a BCB5 programmer, writing an application that has to communicate a lot via RS232/Modem.

For now, I have purchased the ZComm-package, which gives the ability to write and read a "text" property directly to/from the connected port. That works fine, when i don't care about linefeeds etc.

In my application I used a TListBox in the beginning, then a TMemo for output the echo of the remote machine in my application. Both have TStrings as Items(Lines), making it impossible to write several characters one after the other into one line(TString). I did try checking the incoming data for a "linefeed" and closing an AnsiString which I created after the last TString was added to the Memo. My problem here now is: I do not get accurate data all the time, sometimes I get more than the Textstring that was sent.
I tried to replace the "Text" property of TMemo every time the "OnDataAvailable"-Event was triggered, and I got finer results, sometimes even a whole string in clear text, no scrap, coming from the connected unit (4 characters and the cursor keeps in the same line after those characters). But, this remote unit also gives back its "echo" one character at a time, not resulting in a string in my object. The TMemo is Read-Only, so that I just receive the echoed char's and don't see my typed char's.

My question now is:

Is there an object within BCB5 or in the wide field of programmers-code that can accept characters and append/display characters (and eg a <CR>) into a field?

Thanx for your patience to get through this!
--micha
 
I think that is a problem of the serial communication setup. Perhaps you can setup the Modem by dipswitches or software to turn off the echo. Perhaps the Protocol is not setup properly. (usually X-On/X-Off)

I would check the Hardware before trying to filter the Software.
hnd
hasso55@yahoo.com

 
Hy hnd,

let's see. My &quot;Hyperterminal&quot; does not complain at all when connected and receiving data from the unit. My unit is not (yet) a Modem but a RS232/Rs422 converter, channeling data from a measuring sensor.

In the meantime I have found 2ffat's solution mentioned, the Commport (and Terminal) from &quot;bcbdev.com&quot;. The term.exe is quite slow, because all characters are parsed for control char's. Mr Howe states that there is definitely no single-char capable Object for BCB available, so I'll try his workaround from his examples.

You guys have also stated that AsynchPro is good. But its REALLY EXPENSIVE, don't You think?
It's even more than my BCB5pro-update from ms vc++... :-(

Thanx for the answer!!!!
--micha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top