Intermec PM43/PM43c Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43 - Page 25

About Programming Mode, Using Line Numbers

Page 25 highlights

Chapter 2 - Understanding Fingerprint Syntax As soon as a carriage return is received, the firmware checks the instructions for syntax errors. Provided there is a working two-way communication and the verbosity is on, the printer returns either an error message or "Ok" to the host. Note: If you need more flexibility than Immediate mode provides, use Intermec Direct Protocol, since it allows variable input data to be combined with predefined layouts, handles counters, and includes a flexible error-handler. For more information, see the Intermec Direct Protocol Programmer's Reference Manual. About Programming Mode Use Programming mode to create programs consisting of one or more program lines. The complete program can be saved in printer memory and used anytime. The program is executed when you issue a RUN statement. Fingerprint assumes input for Programming mode: • when a line starts with a number. • after you disable Immediate mode by sending an IMMEDIATE OFF command. One or several lines make up a program, which can be executed as many times as you wish. A program can be saved, copied, loaded, listed, merged, and killed. For more information, see "Commands for Creating and Managing Program Files" on page 34. All program lines include line numbers that are either manually entered as the program is edited, or provided automatically and invisibly by Fingerprint after an IMMEDIATE ON statement has been executed. The program is executed in ascending line number order when a RUN statement is entered on a line, followed by a carriage return. Branching and loops can be created in the program to make the execution deviate from a strict ascending order. Often, programs are created as autoexec files that start up automatically when the printer is switched on, and keep running indefinitely. Using Line Numbers You can manually enter line numbers as you write program lines. Intermec recommends that you start with line number 10 and use an increment of 10 between lines to allow additional lines to be inserted later if necessary. To make the program easier to read, you can use a space character between the line number and the instruction. If you do not use a space, Fingerprint automatically inserts a space character when the program is listed. The next example shows a short program with line numbers: 10 PRPOS 200,200 20 DIR 3 30 ALIGN 5 40 PRIMAGE "GLOBE.1" 50 PRINTFEED RUN The last line has no line number, and contains the RUN command plus a carriage return. This orders the printer to execute all preceding lines in consecutive ascending order according to their line numbers. Fingerprint Developer's Guide 13

  • 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

Chapter 2 — Understanding Fingerprint Syntax
Fingerprint Developer’s Guide
13
As soon as a carriage return is received, the firmware checks the instructions for
syntax errors. Provided there is a working two-way communication and the
verbosity is on, the printer returns either an error message or “Ok” to the host.
About Programming Mode
Use Programming mode to create programs consisting of one or more program
lines. The complete program can be saved in printer memory and used anytime. The
program is executed when you issue a RUN statement.
Fingerprint assumes input for Programming mode:
when a line starts with a number.
after you disable Immediate mode by sending an IMMEDIATE OFF command.
One or several lines make up a program, which can be executed as many times as you
wish. A program can be saved, copied, loaded, listed, merged, and killed. For more
information, see
“Commands for Creating and Managing Program Files” on
page 34
.
All program lines include line numbers that are either manually entered as the
program is edited, or provided automatically and invisibly by Fingerprint after an
IMMEDIATE ON statement has been executed.
The program is executed in ascending line number order when a RUN statement is
entered on a line, followed by a carriage return. Branching and loops can be created
in the program to make the execution deviate from a strict ascending order.
Often, programs are created as autoexec files that start up automatically when the
printer is switched on, and keep running indefinitely.
Using Line Numbers
You can manually enter line numbers as you write program lines. Intermec
recommends that you start with line number 10 and use an increment of 10 between
lines to allow additional lines to be inserted later if necessary. To make the program
easier to read, you can use a space character between the line number and the
instruction. If you do not use a space, Fingerprint automatically inserts a space
character when the program is listed.
The next example shows a short program with line numbers:
10
PRPOS 200,200
20
DIR 3
30
ALIGN 5
40
PRIMAGE “GLOBE.1”
50
PRINTFEED
RUN
The last line has no line number, and contains the RUN command plus a carriage
return. This orders the printer to execute all preceding lines in consecutive
ascending order according to their line numbers.
Note:
If you need more flexibility than Immediate mode provides, use Intermec
Direct Protocol, since it allows variable input data to be combined with predefined
layouts, handles counters, and includes a flexible error-handler. For more
information, see the
Intermec Direct Protocol Programmer’s Reference Manual
.