Control codes - converting to ASCII, Hex or Decimal

Our free ComDebug software lets you both collect data from, and control, measurement instruments which are connected to your computer.

Sometimes you need to send a control command to instruct the instrument to send back its data. In ComDebug you can enter these commands in either decimal or hexadecimal format.

Converting Control Codes to ASCII, Decimal and Hexadecimal

CtrlASCII Dec HexMeaning
^@ NUL 000 00 Null character
^A SOH 001 01 Start of Header
^B STX 002 02 Start of Text
^C ETX 003 03 End of Text
^DEOT 004 04 End of Transmission
^E ENQ 005 05 Enquiry
^F ACK 006 06 Acknowledge
^GBEL 007 07 Bell
^H BS 008 08 Backspace
^I HT 009 09 Horizontal tab
^JLF 010 0A Line feed
^K VT 011 0B Vertical tab
^L FF 012 0C Form feed
^M CR 013 0D Carriage return
^N SO 014 0E Shift out
^O SI 015 0F Shift in
^P DLE 016 10 Data link escape
^Q DCL 017 11 Xon (transmit on)
^R DC2 018 12 Device control 2
^S DC3 019 13 Xoff (transmit off)
^T DC4 020 14 Device control 4
^U NAK 021 15 Negative acknowledge
^VSYN 022 16 Synchronous idle
^WETB 023 17 End of transmission
^XCAN 024 18 Cancel
^YEM 025 19 End of medium
^ZSUB 026 1A Substitute
^[ESC 027 1B Escape
^\FS 028 1C File separator
^]GS 029 1D Group separator
^^RS 030 1E Record separator
^_US 031 1F Unit separator
SP 032 20 Space


The ^ symbol stands for Ctrl

Originally the Control codes were used for instruments like teleprinters, so many of the codes are now obsolete.

Entering Control Codes with Comdebug

  1. Create a new instrument file
  2. Edit Message_1
  3. Type into the Prompt string box. Either
    1. On your keyboard set Num Lock on and use the numeric keypad to type the decimal equivalent of the Control character into the Char column, or
    2. Type the hexadecimal equivalent straight into the Hex column.

ComDebug Message Screen

Carriage Return, Line Feed and Escape are the three that you will most often come across. (There are shortcuts for these on ComDebug's non-print menu.) Also look out for STX and ETX which are used to mark the start and end of messages from instruments.

Entering special ASCII characters

Comments or Questions?

Comments:

             
     
: