S a m p l e 4
F u n c t i o n
Prints using fonts and formats loaded with pclOpen.
A l g o r i t h m
1. Initializes the Print subsystem.
2. Loads FORMATS.PCL. This file contains an MPCL format packet.
3. Performs the following until the operator presses the trigger (to print), b (to break out of the loop), or f+0 to calibrate supplies.
A. Waits for the operator to press the trigger.
B. Checks whether the battery is charged enough for printing.
C. Loads a batch packet.
D. Waits until the label prints by checking the status repeatedly until it returns something other than “busy.”
4. Closes the Print subsystem.
S a m p l e 5
F u n c t i o n
Uses the scanner.
A l g o r i t h m
1. Enables the scanner.
2. Waits for the operator to press the trigger. Pressing b breaks out of the waiting loop (without performing a scan).
3. Initiates a scan.
4. Disables the scanner.