• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Sendstring not working

Started by adyble, September 11, 2009, 11:06:49 am

Previous topic - Next topic

adyble

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
else
  EndOfPacket:=  '';

  strSendString := edtSendString1.Text
nrComm1.SendString(strSendString+EndOfPacket);

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 ?

Thanks
Andy



adyble

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.

Andy

Roman Novgorodov

Hello

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.