SKU: AT-UHD-PRO3-44M, AT-UHD-PRO3-66M, AT-UHD-PRO3-88M, AT-UHD-PRO3-1616M
Scenario: Different TCP/IP and RS-232 terminals have different ways to enter carriage returns.
Some TCP/IP and RS-232 terminals allow you to enter a carriage return using an “escape character”, which is a printable ASCII character that tells the interpreter that the next ASCII character (or two or three, depending on the control system) is to be interpreted as non-printable HEX value-pairs or as command delimiters (please see your control system for delimiter character reference). Common escape characters are “$” (dollar-sign), “%” (percent), “\” (backslash), “\x”, and “0x” (all without quotes).
For example:
RS232zone[PWON$0D]$0D
Here the escape character “$” (without quotes) allows the TCP/IP or RS-232 terminal to interpret the HEX value-pair for carriage return and continue interpreting printable ASCII.
The Windows Command Prompt and PuTTy are common TCP/IP interfaces that cannot enter a carriage return without sending a command, which will result in “COMMAND FAIL” errors in situations such as our example in which multiple carriage returns must be sent within a single command string. Windows users can use the free program Hercules for sending both TCP/IP and RS-232 commands. It has a comprehensive list of supported delimiters and escape characters.
In many control systems, command strings can be entered as either ASCII or HEX. You can use www.asciitohex.com to convert an ASCII string to HEX, and simply enter the HEX value-pair “0D” (without quotes) for a carriage return where it belongs in the string syntax.
For example:
RS232zone[PWONCR]CR (where “CR” represents a carriage return)
Converted to HEX, the string would appear as:
52 53 32 33 32 7A 6F 6E 65 5B 50 57 4F 4E 0D 5D 0D
Note that here, our carriage returns are represented as the HEX value-pair “0D” (without quotes). If your ASCII to HEX converter yielded the following result:
52 53 32 33 32 7A 6F 6E 65 5B 50 57 4F 4E 5D
Then you must add the carriage returns where they belong. Be mindful that when using most TCP/IP and RS-232 terminals that support HEX strings for entering control commands, you must include a space between each HEX value-pair.
ASCII/HEX Conversion Table
HEX |
ASCII |
HEX |
ASCII |
HEX |
ASCII |
HEX |
ASCII |
00 |
NUL |
20 |
Space |
40 |
@ |
60 |
` |
01 |
SOH |
21 |
! |
41 |
A |
61 |
a |
02 |
STX |
22 |
" |
42 |
B |
62 |
b |
03 |
ETX |
23 |
# |
43 |
C |
63 |
c |
04 |
EOT |
24 |
$ |
44 |
D |
64 |
d |
05 |
ENQ |
25 |
% |
45 |
E |
65 |
e |
06 |
ACK |
26 |
& |
46 |
F |
66 |
f |
07 |
BEL |
27 |
' |
47 |
G |
67 |
g |
08 |
BS |
28 |
( |
48 |
H |
68 |
h |
09 |
HT |
29 |
) |
49 |
I |
69 |
i |
0A |
LF |
2A |
* |
4A |
J |
6A |
j |
0B |
VT |
2B |
+ |
4B |
K |
6B |
k |
0C |
FF |
2C |
, |
4C |
L |
6C |
l |
0D |
CR |
2D |
- |
4D |
M |
6D |
m |
0E |
SO |
2E |
. |
4E |
N |
6E |
n |
0F |
SI |
2F |
/ |
4F |
O |
6F |
o |
10 |
DLE |
30 |
0 |
50 |
P |
70 |
p |
11 |
DC1 |
31 |
1 |
51 |
Q |
71 |
q |
12 |
DC2 |
32 |
2 |
52 |
R |
72 |
r |
13 |
DC3 |
33 |
3 |
53 |
S |
73 |
s |
14 |
DC4 |
34 |
4 |
54 |
T |
74 |
t |
15 |
NAK |
35 |
5 |
55 |
U |
75 |
u |
16 |
SYN |
36 |
6 |
56 |
V |
76 |
v |
17 |
ETB |
37 |
7 |
57 |
W |
77 |
w |
18 |
CAN |
38 |
8 |
58 |
X |
78 |
x |
19 |
EM |
39 |
9 |
59 |
Y |
79 |
y |
1A |
SUB |
3A |
: |
5A |
Z |
7A |
z |
1B |
ESC |
3B |
; |
5B |
[ |
7B |
{ |
1C |
FS |
3C |
< |
5C |
\ |
7C |
| |
1D |
GS |
3D |
= |
5D |
] |
7D |
} |
1E |
RS |
3E |
> |
5E |
^ |
7E |
~ |
1F |
US |
3F |
? |
5F |
_ |
7F |
DEL |