Author Topic: XE4 Sending hex codes  (Read 1706 times)


  • Newbie
  • *
  • Posts: 29
    • View Profile
XE4 Sending hex codes
« on: June 10, 2013, 02:57:42 pm »

I am having trouble sending hex codes to a pos pole display from Delphi XE4.

The pole display codes are 1B 46 41[DISPLAY MESSAGE] 0D.  This should display the message on the 1st line of the display.

I can send this via a serial port program and all works fine, but when I try and send it from Delphi the pole display
ignores the hex control codes.  Tried the following code.

Code: [Select]
    nrComm1.SendString('TEST DISPLAY MESSAGE');


Code: [Select]
nrComm1.SendString(#$1B#$46#$41+'TEST DISPLAY MESSAGE'+#$0B);
I can send just the message text and the pole display shows it, but I have no control of where and how it displays.  The
control codes tell it whether it must display text on line 1 or 2 etc

This used to work but now it does not.  Is it possibly XE4?


Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1008
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: XE4 Sending hex codes
« Reply #1 on: August 30, 2013, 06:06:48 am »

You need check serial port settings.
Possible XOnn/xOff stream protocol handles some HEX numbers.
You can set spNone or spHardware and try again.

Also possible your device need timeout between control chars and text string. Try following:
Code: [Select]

  nrComm1.SendString('TEST DISPLAY MESSAGE');

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