# ESC - HEX - XCT - DEC/Decimal Conversion

**URL:** <https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424>\
**Category:** V5 Question\
**Created:** [October 2, 2015, 10:06pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424 "2015-10-02T22:06:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 2, 2015, 10:06pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/1 "2015-10-02T22:06:38Z")

</div>

I am setting up a new terminal with pole display and am struggling to get template right,  
Am in need of the XCT codes.  
Have found a list of potential ESC & HEX codes but cant find the reference site I found before on converting the values.  
Anyone have a link as is driving me crazy.

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 2, 2015, 10:07pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/2 "2015-10-02T22:07:56Z")

</div>

Can you give a concrete example about what you want to convert to what?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 2, 2015, 10:09pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/3 "2015-10-02T22:09:38Z")

</div>

Have a list of commands,  
Pole has option for couple of command modes and is in EPSON POS mode.  
Have found a list of EPSON commands;  
 ![](https://forum.sambapos.com/uploads/default/original/2X/e/e564ae87146862129a28ebcb0d7329be4ff89d08.PNG)  
Cant remember how to convert these into XCT for use in samba template (or am I forgetting something)

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 2, 2015, 10:10pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/4 "2015-10-02T22:10:11Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/2X/8/8b894b51c0927373d106498dc37293c2aaee6b45.jpg)

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 2, 2015, 10:11pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/5 "2015-10-02T22:11:20Z")

</div>

Use **Dec** column for `XCT` values

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 2, 2015, 10:11pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/6 "2015-10-02T22:11:28Z")

</div>

Thanks 😄  
That looks like what I used last time but couldn’t find it to save my life.  
If its not already maybe it could go in a tutorial post as a good place of reference.?

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 2, 2015, 10:14pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/7 "2015-10-02T22:14:36Z")

</div>

I have found a fairly big list of commands for many types of pole displays;  
[http://support.j2rs.com/Documents/OldDocs/VFD%20Pole%20Display.pdf](http://support.j2rs.com/Documents/OldDocs/VFD%20Pole%20Display.pdf)

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [October 2, 2015, 10:15pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/8 "2015-10-02T22:15:06Z")

</div>

Yeah so this topic can be found when searched 🙂

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 2, 2015, 10:24pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/9 "2015-10-02T22:24:41Z")

</div>

Dohh, stupid suggestion LOL  
Will write a few examples when I’ve converted my codes.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 3, 2015, 7:47pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/10 "2015-10-03T19:47:44Z")

</div>

I fount this which covers all my commands, the other link I couldn’t get to work on the commands I thought I needed.  
These seem very generic commands so possibly helpful if you don’t have original documentation as a good place to start.

> **[VFD-220/420 Programmer's Reference](https://www.seetron.com/vfdx20/vfdx20prog.html)**
>
> Programming VFD-220 and VFD-420 serial VFDs.

> Control Codes

> VFD-420 and VFD-220 understand a small set of control codes similar to our other text-mode displays (GLO, VFD, ILM, TRM). Codes not listed below ( e.g., Null, 0 ) are ignored by the display.

> NOTE: The display must be in factory-default Normal mode (not “Old” mode) for these control codes to work; see the configuration software description for more information.

> Items marked with » can be clicked for tips or more detail.

> Home (ctrl-A) 01 dec 0x01 hex

> Moves the printing position to 0, the first character of the top line. »

> Begin Big-Character Mode (ctrl-B) 02 dec 0x02 hex

> VFD-420 Only Puts the display into Big-character mode, in which characters are displayed as 4-line tall graphics. The display can show up to four big characters at a time. The big character set includes 0-9, A-Z (uppercase) and symbols dot/decimal point ( . ), hyphen/minus sign ( - ), colon ( : ) and space. The symbols take up one-half the width of the letter/number characters. To end big-character mode, send ctrl-C, another control code, or a character not available in big mode. »

> End Big-Character Mode (ctrl-C) 03 dec 0x03 hex

> Sets the printing mode to the default size. »

> Hide Cursor (ctrl-D) 04 dec 0x04 hex

> Turns off the visible cursor. »

> Show Blinking-Block Cursor (ctrl-F) 06 dec 0x06 hex

> Turns on a blinking-block cursor that tracks the location of the next character to be printed. »

> Bell (ctrl-G) 07 dec 0x07 hex

> Pulses the Bell output (marked “J4”) briefly to beep a 25mA piezo buzzer (if connected). »

> Backspace (ctrl-H) 08 dec 0x08 hex

> Backs up one character, erases that character, sets the print position to erased character’s location. »

> Tab (ctrl-I) 09 dec 0x09 hex

> Moves the printing position to the next multiple-of-4 screen location: 0→4→8→12→16→20→24→… »

> Smart Linefeed (ctrl-J) 10 dec 0x0A hex

> Moves the printing position down a line. »

> Vertical Tab (ctrl-K) 11 dec 0x0B hex

> Moves the printing position up a line. »

> Clear Screen (ctrl-L) 12 dec 0x0C hex

> Clears the screen and moves the printing position to 0—the first position of the first line. »

> Carriage Return (ctrl-M) 13 dec 0x0D hex

> Moves to the first printing position of the next line. »

> VFD On (ctrl-N) 14 dec 0x0E hex

> Turns on the VFD screen after a ctrl-O power-down.»

> VFD Off (ctrl-O) 15 dec 0x0F hex

> Turns off the VFD driver circuitry to save power. »

> Set Printing Position (ctrl-P) 16 dec 0x10 hex

> Sets the printing position according to the value of the next byte, position+64 (0x40 hex). For example, to move to the fourth character of the second line (position 23; see the charts above), you would send two bytes, 16 87 (0x10 0x57 hex)»

> Right-align Text (ctrl-R) 18 dec 0x12 hex

> Displays text (usually numeric) within a field 2 to 8 characters wide. The byte that follows ctrl-R is a text number from ‘2’ to ‘8’ (50-56 dec, 0x32-0x38 hex) that sets the field width. The text after that will be invisibly stored until one of the following is received:

> A control code.  
> A period/decimal point.  
> The specified number of bytes.  
> When this happens, the field will be cleared and the received text printed at the righthand end of the field. »

> Escape: Start Multipart Instruction (ctrl-[) 27 dec 0x1B hex

> See the Escape-code descriptions below.

> Escape Instructions

> These are multipart instructions that begin with the Escape character; 27 dec, 0x1B hex. Escape instructions affect memory: writing bitmaps to RAM to define custom characters, or storing/recalling text or character patterns to/from EEPROM.

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [October 3, 2015, 7:56pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/11 "2015-10-03T19:56:56Z")

</div>

My clear screen command was as simple as `<XCT>12`

---

<div class="post-metadata">

**Author:** ![ricco](https://forum.sambapos.com/user_avatar/forum.sambapos.com/ricco/32/26554_2.png) [@ricco](https://forum.sambapos.com/u/ricco)\
**Post date:** [September 6, 2016, 3:40pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/12 "2016-09-06T15:40:22Z")

</div>

Hi, I’m glad that this topic has created before. Right now, I’m setting up an ECS/POS customer display, but have no idea about the XCT command. If you don’t mind, do you want to share us your customer display template, please? Appreciated with thanks!

I tried this one, but still messed up.

EDIT: I’m using Posiflex PD-350UE Customer Display, running on virtual COM port. I realised that the clear screen command is the same as yours `<XCT> 12`. But I’m not sure how to apply the rest of the command in HEX code.

> [@Pole Display / Customer Display / VFD](https://forum.sambapos.com/t/pole-display-customer-display-vfd/1978/1):
>
> First of all, you need to determine how your Display is connected to the computer, and how it communicates. If you cannot figure out this information, it will be very difficult to get your Display working with SambaPOS. There are many types of Displays, though most of them will communicate in a serial fashion via a serial port or COM emulation via USB.
> 
> The following screenshots show a Display connected via USB, that the Driver emulates as a serial port on COM2. This Display requires a driver in order to do port redirection/emulation.
> 
> Logic Controls PD3000 USB Pole Display:

---

<div class="post-metadata">

**Author:** ![JTRTech](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jtrtech/32/21270_2.png) [@JTRTech](https://forum.sambapos.com/u/JTRTech)\
**Post date:** [September 6, 2016, 4:38pm UTC](https://forum.sambapos.com/t/esc-hex-xct-dec-decimal-conversion/7424/13 "2016-09-06T16:38:45Z")

</div>

What other command you need?
