Oki OKIPOS408II OKIPOS 408II Programmer s Technical Reference - Page 245

Exception Processing, processing starts from code analysis of <40>H.

Page 245 highlights

3-2 Exception Processing There are two possible page mode analyses: Code analysis and ESC command analysis that follows. 1) Code analysis Code that analyzes all codes from H to H and defines reception data as commands. Discards the code when anything other than (H, H, H, H) is received. When the reception data is an ESC code (H), processing shifts to ESC command analysis. (Ex.) If processing the data string of HHHHH, the printer will discard H as an undefined code and will enable subsequent commands of HHHH. 2) ESC command analysis If the data analyzed using code analysis is an ESC code, it analyzes reception data following that ESC code. When the reception data following an ESC command applies to one of the following ESC command analysis stops immediately and maintains that reception data, then shifts to code analysis again. Data received before that is read and discarded. • When data following an ESC code is a code that is not defined as a command: (Ex.) When the data of HHHHHH is received, the printer analyzes H following the ESC code. Because this is not a code defined as a command, the printer stops ESC command analysis, maintains the reception data H and begins analysis from the H code. The result is H is an undefined code, so it is discarded and the subsequent HHHH command is enabled. • When processing numerical values outside of the definition in commands that accompany arguments: (Ex.) If the data string of HHHHHHHH is received, the printer will start processing the ESC D (HH) command. However, because the following argument H is data outside of the definition, ESC command analysis is stopped, the reception data H maintained and processing starts from code analysis of H. (Ex.) This is the same as for commands the specify the position as an argument, and that position is outside of the print region. When a data string below is received. HHHHHHHHHHH... The printer begins processing the command (ESC P C (HHH) but the X coordinate is out of the print region, so the ESC command is interpreted and the final H of the 4-byte parameter that indicates this position is held as it is, and the analysis of the H code is begun. • When the command that ends at the last data string of LF NUL (HH) and the code does not end there: (Ex.) When the data string of HHHHHHHH is received, the printer starts processing ESC C (HH), but because the last is not an LF NUL data string, the data received to then is read and discarded, but it maintains the reception data H and begins analysis from the H code analysis. The result is H is an undefined code, so it is discarded and the subsequent HHH H command is enabled. _____ STAR Page Mode Command Specifications 3-4

  • 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
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366

____________________________________________________________________________________________________________________________________________
STAR Page Mode Command Specifications
3-4
3-2
Exception Processing
There are two possible page mode analyses: Code analysis and ESC command analysis that follows.
1) Code analysis
Code that analyzes all codes from <00>H to <FF>H and defines reception data as commands.
Discards the code when anything other than (<04>H, <05>H, <17>H, <1B>H) is received.
When the reception data is an ESC code (<1B>H), processing shifts to ESC command analysis.
(Ex.)
If processing the data string of <30>H<1B>H<43>H<0A>H<00>H, the printer will discard <30>H as an
undefined code and will enable subsequent commands of <1B>H<43>H<0A>H<00>H.
2) ESC command analysis
If the data analyzed using code analysis is an ESC code, it analyzes reception data following that ESC code.
When the reception data following an ESC command applies to one of the following ESC command analysis stops
immediately and maintains that reception data, then shifts to code analysis again.
Data received before that is read
and discarded.
• When data following an ESC code is a code that is not defined as a command:
(Ex.) When the data of <1B>H<41>H<1B>H<43>H<0A>H<00>H is received, the printer analyzes <41>H
following the ESC code.
Because this is not a code defined as a command, the printer stops ESC
command analysis, maintains the reception data <41>H and begins analysis from the <41>H code.
The result is <41>H is an undefined code, so it is discarded and the subsequent
<1B>H<43>H<0A>H<00>H command is enabled.
• When processing numerical values outside of the definition in commands that accompany arguments:
(Ex.)
If the data string of <1B>H<44>H<40>H<30>H<30>H<30>H<0A>H<00>H is received, the printer will start
processing the ESC D (<1B>H<44>H) command. However, because the following argument <40>H is data
outside of the definition, ESC command analysis is stopped, the reception data <40>H maintained and
processing starts from code analysis of <40>H.
(Ex.) This is the same as for commands the specify the position as an argument, and that position is outside of
the print region.
When a data string below is received.
<1B>H<50>H<43>H<30>H<30>H<3B>H<39>H<38>H<37>H<36>H<2C>H…
The printer begins processing the command (ESC P C (<1B>H<50>H<43>H) but the X coordinate is out of the
print region, so the ESC command is interpreted and the final <36>H of the 4-byte parameter that indicates this
position is held as it is, and the analysis of the <36>H code is begun.
• When the command that ends at the last data string of LF NUL (<0A>H<00>H) and the code does not end there:
(Ex.) When the data string of <1B>H<43>H<0A>H<FF>H<1B>H<43>H<0A>H<00>H is received, the printer
starts processing ESC C (<1B>H<43>H), but because the last is not an LF NUL data string, the data
received to then is read and discarded, but it maintains the reception data <FF>H and begins analysis from
the <FF>H code analysis.
The result is <FF>H is an undefined code, so it is discarded and the subsequent <1B>H<43>H<0A>H
<00>H command is enabled.