Oki X400 X400 Programming Command Manual - Page 4

Selecting Protocol Control Codes, Using Basic

Page 4 highlights

This commands set the operational parameters of the printer, "set the print speed to 3." {Command} {Parameter} {Data} Some commands can contain both parameter and data elements, such as "print a code 39 symbol containing the data." SELECTING PROTOCOL CONTROL CODES Protocol codes are special control characters that prepare the printer to receive instructions. For example, the character tells the printer that a command code will follow. The Protocol Control Code set is made up of six special characters. The Standard Protocol Codes are non-printable characters. They can be changed to printable characters using the Protocol Control code download command. This may be useful on host computers using protocol converters or in an application where non-printable ASCII characters cannot be sent from the host. The manual uses Standard Protocol Control Codes for all of the examples. The Protocol Control codes must be downloaded from the host using the LD command (see page 89). Once they are downloaded, the printer will not respond to standard protocol codes. The current protocol codes active in a printer can be determined by printing a Test Label. CONTROL CHARACTER STX ETX ESC ENQ CAN Off-Line HEX VALUE 02 03 1B 05 18 40 DESCRIPTION Start of Data End of Data Command code to follow Not used Not used Not used Using Basic It may be useful to test your printer using a BASIC program on a PC. You may also write your production program in BASIC. Whatever the reason, if you will be working in BASIC, some of the following hints may help you get started: 1. Set the WIDTH of the output device to 255 characters to avoid automatically sending and 2

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137

This commands set the operational parameters of the printer, “set the print speed to 3.”
<ESC>{Command} {Parameter} {Data}
Some commands can contain both parameter and data elements, such as “print a code 39 symbol containing the
data.”
SELECTING PROTOCOL CONTROL CODES
Protocol codes are special control characters that prepare the printer to receive instructions. For example, the
<ESC> character tells the printer that a command code will follow.
The Protocol Control Code set is made up of six special characters. The Standard Protocol Codes are
non-printable characters. They can be changed to printable characters using the Protocol Control code download
command. This may be useful on host computers using protocol converters or in an application where
non-printable ASCII characters cannot be sent from the host. The manual uses Standard Protocol Control Codes
for all of the examples.
The Protocol Control codes must be downloaded from the host using the <ESC>LD command (see page 89).
Once they are downloaded, the printer will not respond to standard protocol codes. The current protocol codes
active in a printer can be determined by printing a Test Label.
CONTROL CHARACTER
HEX VALUE
DESCRIPTION
STX
02
Start of Data
ETX
03
End of Data
ESC
1B
Command code to follow
ENQ
05
Not used
CAN
18
Not used
Off-Line
40
Not used
Using Basic
It may be useful to test your printer using a BASIC program on a PC. You may also write your production
program in BASIC. Whatever the reason, if you will be working in BASIC, some of the following hints may
help you get started:
1.
Set the WIDTH of the output device to 255 characters to avoid automatically sending <CR> and <LF>
2