Control Code Functions
The following information is listed for each code function (where applicable and possible).
ASCII Mnemonic – The standard American Standard Code for Information Interchange (ASCII) name for the control code.
Hex Code – The code’s numeric equivalent in hexadecimal.
Decimal Code – The code’s numeric equivalent in decimal.
Purpose – The function(s) of the control code.
Comment – A description of exceptions or limitations to normal use.
A sample Expression written in BASIC programming language is provided for some control codes when a specific syntax is required to complete the program statement (i.e.,: Bit Image modes, Down- load a Language, Horizontal Tab Set, Vertical Tab Set). The programs in this chapter were run on an IBM Personal Computer using Microsoft
Special Function Control Code – Control Code Header
A Special Function Control Code (SFCC) is used to extend the control code protocol. The SFCC is the control code introducer (or header); it is the first input in the sequence of parameters. The general con- trol code sequence is:
(SFCC)(parameter 1)(parameter 2)...(parameter n)
ASCII: SOH G | Hex: 01 47 | BASIC: CHR$(1);“G”; |
ETX G | 03 47 | CHR$(3);“G”; |
ESC G | 1B 47 | CHR$(27);“G”; |
^ G | 5E 47 | CHR$(94);“G”; |
~ G | 7E 47 | CHR$(126);“G”; |
Serial Matrix codes use only ESC as the control code introducer. For example, to enable bold print in the Serial Matrix printer protocol, use the Serial Matrix SFCC and the bold print control code character G as follows:
ASCII: ESC G | Hex: 1B 47 | BASIC: CHR$(27);“G”; |
The SFCC is selected from the control panel. To select the SFCC for your application, refer to the Ap- plication Compatibility diagrams in the Configuration chapter.
Most programming examples in this chapter have been created using the ESC control code introducer.
Programming |