Author Topic: Sendstring not working  (Read 1923 times)


  • Newbie
  • *
  • Posts: 10
    • View Profile
Sendstring not working
« on: September 11, 2009, 02:06:49 pm »
Hi I have a modified version of the dterminal all to send characters to a weighbridge or scales and receive the weight.
When only a #1310 or #13 is required bytes are received ok.
However we need to send XB + the end of packet, it's this that's not working :

here;s the code :

if cbEOP.ItemIndex = 1 then
  EndOfPacket:=  #13
 else if cbEOP.ItemIndex = 0 then
  EndOfPacket:=  #13#10
  EndOfPacket:=  '';

  strSendString := edtSendString1.Text

It used to work but I changed something.  What I do notice is that if I use a nrTerminal on the form when type in XB and press enter, it does not go to the next line.

Any thing I can test ?



  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Sendstring not working
« Reply #1 on: September 11, 2009, 03:31:09 pm »
I've tried the Dterminal demo again and that works.

I removed the modem component and still works.
I can't get the ntTerminal to move to the next liken after input XB
nt terminal enterkey - i have tried avery one.


Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1008
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Sendstring not working
« Reply #2 on: September 22, 2009, 04:54:21 pm »

I'm sorry but I don't understand your problem.

Why do you use nrTerminal control for detect incoming packets?
Please take a look Demos\SimplePacket\SimplePacket.dpr demo project.
It detects needed packet without any visual controls.

Also I don't understnad what is XB?

Roman Novogrodov
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.