没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论




















BOCA SYSTEMS, INC.
1065 South Rogers Circle
Boca Raton, Florida 33487
PHONE: 561 998 9600
FAX: 561 998 9609
Email boca@bocasystems.com
PROGRAMMING GUIDE
FRIENDLY GHOST LANGUAGE
Lemur
FGL46 / FGL26
FGL44 / FGL24
FGL42 / FGL22
March 26 2018
Revision 8
FRIENDLY GHOST LANGUAGE (FGL) is Boca’s industry standard language that allows the user to print data,
graphics, boxes and bar codes anywhere on the ticket in virtually any orientation. Great care has been taken to
make this language user friendly without sacrificing any of the features and flexibility required by both future and
existing customers. FGL has been structured in such a way to easily accommodate adding new functions in the
future. FGL46 is the latest version of the Friendly Ghost Language. Unless stated otherwise, all references
in the programming guide to Lemur, FGL26/46 &FGL24/44 are the same.
FGL22, 24 and 26 are subsets of FGL42, 44 and 46, respectively. They contain most of the same features as
FGL42/44/46. Features unavailable in the FGL22/24/26 code will be identified, when appropriate, throughout
the programming guide. For simplicity, all references to FGL46 should be interpreted as valid for all FGL
printers, except as noted. Please note that the features identified in this manual represent those features
available in the latest version of the firmware. Older revisions of FGL42/44/46 firmware may not contain
all of the features discussed in this document. New commands will be highlighted in green to indicate
the possibility that older versions of FGL22/24/26 and/or FGL42/44/46 may not contain these features.
We hope you enjoy your new Ghostwriter family printer.
The FGL46 language represents the latest enhancements to the FGL language. FGL46 contains many new
features (PDF-417, Data Matrix, QR and Aztec 2D barcodes, BMP graphics, Justifying Text, etc.) while retaining
all of the commonly used FGL features. Some of the new FGL46 features are available in older FGL44 printers
using special firmware version '44G' and above. Note: Downloading of FGL Bitmapped fonts is no longer
allowed in order to eliminate potential conflicts with some of the new FGL features.
While the use of FGL provides the programmer with the most efficient means of communicating with the printer,
printing through a printer driver (Windows, Mac or Linux) is probably the fastest way to get your printer running.
To work with a driver, follow the instructions on the applicable printer driver page of our website.
Copyright c 1989-2017 by Boca Systems, Inc.

2
TABLE OF CONTENTS
GENERAL DESCRIPTION - READ THIS FIRST....................................................................................................3
COMMAND SEQUENCES......................................................................................................................................9
STATUS COMMANDS..........................................................................................................................................12
FILE COMMANDS ...............................................................................................................................................19
PRINT COMMANDS .............................................................................................................................................19
SPECIAL COMMANDS.........................................................................................................................................20
DRIVER COMMANDS (implemented November 2007 on new 26/46 printers)....................................................21
STANDARD INTERFACE PINOUTS ....................................................................................................................22
For Lemur series printer see “Standard Interface Pinouts” section of user manual..............................................22
UPC SUPPLEMENT .............................................................................................................................................23
INTERLEAVED 2OF5 SUPPLEMENT..................................................................................................................24
EAN13 SUPPLEMENT .........................................................................................................................................25
CODE 39 SUPPLEMENT ....................................................................................................................................25
USS-CODABAR SUPPLEMENT ..........................................................................................................................25
SOFTSTRIP BAR CODE SUPPLEMENT.............................................................................................................26
TWO DIMENSIONAL BAR CODE SUPPLEMENT...............................................................................................27
FGL Features Minimum Firmware Version........................................................................................................27
FGL Font file contents SB00 to SB05................................................................................................................27
PDF-417 2D Bar Code ......................................................................................................................................29
Data Matrix 2D Bar Code ..................................................................................................................................30
Quick Response 2D Bar Code ..........................................................................................................................31
DOWNLOADING FILE SUPPLEMENT.................................................................................................................34
DOWNLOADING LOGO SUPPLEMENT..............................................................................................................36
DOWNLOADING BMP & PCX SUPPLEMENT.....................................................................................................38
FGL TEXT LOGO (MACRO) SUPPLEMENT .......................................................................................................39
DOWNLOADING FONTS SUPPLEMENT............................................................................................................40
TRUETYPE FONTS SUPPLEMENT ....................................................................................................................42
UPDATING FIRMWARE, FONTS and FEATURES..............................................................................................44
BOX AND LINE SUPPLEMENT............................................................................................................................45
HOST TO PRINTER COMMUNICATION SUPPLEMENT....................................................................................46
DIAGNOSTIC MODE SUPPLEMENT...................................................................................................................47
ORIENTAL CHARACTER SETS ..........................................................................................................................48
DUAL PRINTER SUPPLEMENT ..........................................................................................................................50
FGL CONTROL PANEL........................................................................................................................................52
PRINTER STATUS SUPPLEMENT......................................................................................................................58
SAMPLE BASIC PROGRAM FOR SENDING AND RECEIVING STATUS FROM PRINTER. ............................60
SHADING PATTERN SUPPLEMENT...................................................................................................................61
JUSTIFY TEXT SUPPLEMENT............................................................................................................................63
FLASH MEMORY EXPANSION SUPPLEMENT..................................................................................................64
FONT SIZE SUPPLEMENT..................................................................................................................................65
PRINTER DRIVER SUPPLEMENT ......................................................................................................................66
Windows Printer Drivers ....................................................................................................................................66
Apple/Mac Printer Drivers..................................................................................................................................68
Linux Printer Drivers..........................................................................................................................................69
42/44/46 CONFIGURATION TEST TICKET SUPPLEMENT................................................................................73
CHANGING ETHERNET PARAMETERS SUPPLEMENT ...................................................................................80
ETHERNET INTERFACE ADDENDUM - REV H .................................................................................................82
MEMORY INVENTORY COMMAND SUPPLEMENT.........................................................................................109
RFID ADDENDUM - REV H................................................................................................................................110
Wi-Fi ADDENDUM ..............................................................................................................................................134
Configure Wi-Fi Connection ............................................................................................................................134
Configure Wi-Fi Connection Step by Step.......................................................................................................135
BLUETOOTH ADDENDUM ................................................................................................................................137
USB DRIVER ADDENDUM ................................................................................................................................142
USB Printer/HID Device Type .........................................................................................................................142
APPENDIX A - SAMPLE BASIC PROGRAM FOR 200 DPI PRINT HEAD ....................................................143
APPENDIX B - GHOSTWRITER COMMANDS - Quick Reference Chart......................................................144
APPENDIX C - ASCII CHARACTER SET.......................................................................................................147
APPENDIX D – Special Character Set............................................................................................................148
200 DPI FONT SAMPLES ..................................................................................................................................149

3
GENERAL DESCRIPTION - READ THIS FIRST
Many people will have neither the time nor patience to read through this entire programming guide. For those of
you, we recommend that you skip to Appendix A and B of the manual. Appendix A contains sample basic
programs, while Appendix B quickly lists all of the Ghostwriter commands. If you plan to use any special
functions not covered in these examples, a quick look at the "command sequence" section and the applicable
"supplement" section should provide you with the rest of the information you need. The technically oriented are
invited to read the whole manual. The rest of you might find it more enjoyable to skip the "Theory of Operation"
section and go straight to the "General" section. In any case, please feel free to call us if you have any
questions.
BRIEF THEORY OF OPERATION
In order to produce a ticket or label the Boca printer must first receive ticket data written in FGL. All data
transmitted to the printer is immediately placed in its 64k (4k for parallel and serial) byte circular input buffer.
The printer uses this information to produce a ticket image. The Ghostwriter uses two independent ticket buffers
for storing the ticket image. The data from the input circular buffer is processed and then loaded into one of the
printer's two ticket buffers. After the ticket data is fully processed, the printer begins printing that ticket and then
starts processing the next ticket's data. This processed data is then loaded into the second ticket buffer. At this
point, the two ticket buffers are full so no new information can be processed from the input buffer. However, the
printer can still receive more data at this point until it has reached its maximum limit of bytes loaded. Once the
ticket has finished printing, the printer can again start processing data. It will start printing the second ticket
buffer while inserting processed data into the first ticket buffer. The above cycle will be repeated for each ticket.
This double-buffered approach allows the computer system to derive the maximum ticket output from the printer.
In serial mode, the printer will go busy if it has more than 3000 characters stored in its circular input buffer. This
is for protection against systems that still send some data even after the printer goes busy. In parallel mode, the
printer will go busy if it has more than 4000 characters stored in its circular buffer. (Note: the printer goes busy
momentarily for each character sent during parallel transmission.) Since the printer is constantly processing
data from the input buffer, it will typically take a transmission of much more than 4000 characters to fill up the
buffer. In both parallel and serial mode, the printer will remain busy until it has reduced the number of stored
characters below 2500. With the 64k buffer, the printer will goes busy with approximately 6400 characters in its
buffer.
In addition to the ready/busy function, the printer can transmit x-on/off and status when operating via its serial
interface. X-off (13H) is sent in conjunction with the printer going busy. X-on (11H) is sent whenever the printer
goes ready. An ACK (06H) is sent following the successful printing of a ticket. After the last ticket is printed, the
printer will send an ACK followed by a 10H indicating an out of ticket condition. A ticket jam will result in the
transmission of an 18H (no ACK will be sent).
GENERAL INFORMATION
FGL has evolved over a period of many years. During this time, the Ghostwriter has been used with many
different logic boards (421487, FGL I - 421532, FGL II - 421570, FGL III - 421670, FGL IV - 421770, FGL40 –
422270, 21/41 – 422770, 42/22 – FGL42, 24/44 – FGL44 and 26/46 – FGL46, Q46, Z46, A46). Although the
basic FGL language has remained constant, new features are added with each revision. Some of the new
features found in this manual may not be available on certain individual printers. Should you find that you are
unable to access any of the features delineated in this manual, please feel free to consult the factory to verify
whether or not this option is available in your printer.
This manual has been written specifically for the newest FGL46 board. This board features a fast state-of-the-
art 32 bit RISC microprocessor. This new board is an enhanced version of the FGL 42 board and processes
data about 4 times faster. It contains twice the memory of the FGL42 board.
The Ghostwriter prints on a variety of ticket and label sizes. The standard widths are 2", 2.125", 2.5", 2.7",
3.25", 4" and 8". Dot sizes of .00492" (203.2 dpi) and .00328" (304.9 dpi) and .0015” (600 dpi) are available.
For the sake of clarity, we will assume a standard ticket to be 2" wide by 5.5" long. Additionally, we will refer to
the above dot densities as 200 and 300 dpi.
TICKET/LABEL FORMATTING
A ticket can be thought of as a large dot matrix. The printer can place a dot anywhere on the ticket according to
set spacing requirements. These spacing requirements are a function of the particular print head used on the
printer. The ticket is comprised of a series of dot rows and dot columns. Note, that the printer usually reserves

4
a small margin around the perimeter of the ticket in which no printing can appear. The starting position on each
ticket is row 0, column 0 (0, 0). This is the left top-most corner of a ticket. The end of the ticket (the bottom
right-hand corner) is considered to be position row 383, column 1049 (383, 1049).
The printer can print different size character sets depending on the font size sent to it. The default font size is
called font3 and produces characters 17 dots wide by 31 dots high positioned within a box 20 dots wide
(approximately 10 character per inch) by 33 dots high. The box size can be changed by commands to the printer
in order to produce different inter-character spacing. Each character is top-left justified within the box depending
on its rotation. Each character can be rotated in any of the four directions. Non-rotated (NR) characters are
printed across the ticket from left to right. Rotated right (RR) characters are printed down the ticket from top to
bottom. Rotated upside down (RU) characters are printed across the ticket from right to left (and build up from
their starting points). Rotated left (RL) characters are printed up the ticket from bottom to the top. A character
can be positioned to start anywhere on the ticket by sending a row/column command to the printer. The next
character will start where the previous character box ended unless a new row/column command is sent. A
return command will position the next character on the start of the next line keeping the same rotation from
before (unless a new one is sent). Therefore, if a return is sent while printing in a rotated right mode the next
character is printed at the top of the ticket and one character line below (to the left of) the previous line. A
character line is equal to the box height of a character. In the default mode (font3), a character line is 33 dot
positions and a character column is 20 dot positions.
Please note that many software programs will automatically send a return characters based on some arbitrary
criteria. These automatic carriage returns should be suppressed.
The different types of command sequences that the printer will accept will be described later. The ticket data is
terminated by a FF (0CH) or <p> indicating that the full ticket has been received. At this point, the Ghostwriter
will print, cut and eject the ticket. To print a ticket without cutting, send a 1DH in place of the FF. For a
complete list of print commands see the command section. The printer will automatically clear its buffer after
printing a ticket.
AUTOMATIC TICKET LENGTH CALCULATION
On power-up, the printer will automatically determine the length (in dot positions) of the ticket being used. This
feature allows different sized tickets to be used with the same printer and software. On thermal printers, the
ticket will advance past the print head and then return to the initial print position during this measurement. On
ribbon printers, a blank ticket will be cut and ejected. This feature can be disabled as explained in the command
sequence section.
The printer will allow the user to print data across the entire length of the ticket minus .142" (29 dot columns on
a printer with a .005" dot print head). With all ticket stocks, there is a slight variation in the distance between
successive black marks that will result in a small variation in the calculated length of the ticket (1-8 dots). It is,
therefore, recommended that the user avoid printing in the last three or four dot columns of the ticket to avoid
the possibility of truncating the last column due to a variation in calculated ticket length. (For general reference,
a 5.5" long ticket will contain about 1077 dot columns for 300dpi.)
SPECIAL CONSIDERATIONS
Most Ghostwriters require a minimum of three characters (blanks are acceptable) to be sent in the first line
before accepting a CR character. This is to protect the printer from processing false CR's which are sent by
certain PC's. The Ghostwriter also requires a minimum of three lines of data per ticket as a further error
checking technique. This restriction does not apply if a <p> command is used as the print command instead of
the form feed character.
Certain printer commands allow the user to select rotated and/or expanded versions of a character set. All
modified characters will be top and left justified in their box according to their rotation. For example, a rotated
left character that starts at the bottom left-hand corner of the ticket will build up the ticket and to the right.
Expanded characters will build even further into rows and columns next to them. Therefore, care must be taken
not to start a character in a row or column that is occupied by another character. For instance, if you expand a
non-rotated 7x8 box size character by 2 it will occupy a space 16 dot positions down from its starting point and
14 spaces to the right. Therefore, no character should be placed less than 16 dot rows below that character or
closer than 14 positions to the right. The printer will automatically do this if no overriding positioning commands
are sent. In other words, the Ghostwriter knows if it is printing an extra sized character and it will place the next
character in the correct position so it will not be over-written. This also holds true for return commands. The
printer will automatically position itself down enough lines depending on the size of the characters printed.
However, the printer only remembers the parameters set up for the previously printed character. Therefore, if a
sentence is printed across the ticket and it starts with normal characters and ends with double-sized characters,

5
a return will position the next character below the beginning of the sentence as if it started with a double-sized
character. If this feature is not desired, skip the return character and send a row/column command to position
the next character where desired.
Note - Care must be used when using size modifiers and positioning commands. In most instances, the printer
will ignore all data sent outside the ticket boundaries as well as any data sent following an illegal positioning
command. In the latter case, the printer will normally ignore all remaining data until a valid command is sent.
However, in certain cases, the illegal data may end up being printed on either this or the following ticket. Always
check what is being sent to the printer if unexpected results occur.
Printer Default Settings
� Font type - Font3 (17x31 dot matrix)
� Character box size - 20x33 dot matrix
� Starting point - row 0,column 0
� Height - normal (1)
� Width - normal (1)
� Rotation - No rotation (NR)
� Ticket length - automatically calculated
� Printing length - equal to ticket length
� Bar code size - 4 units (32 dots)
� Dot row offset - 1 unit (8 rows)
These settings can be changed at any time (and in any combination) before printing a character or string of
characters. However, once changed, they will remain in effect until changed with a new command. The printer
will also return to the default settings for the start of a new ticket. Once a print command is sent, the printer
reverts back to the default settings so each new ticket must repeat any special command settings - they will not
be retained from the previous ticket.
INVERTED CHARACTERS
The Ghostwriter will print an inverted version of any character sent provided that the proper modifier has been
sent. An EI (enable inversion) command turns on the inverted mode. All subsequent data (except bar codes)
will be inverted until a DI (disable inversion) command is sent. An inverted character is simply a negative image
of the original. Caution should be exercised in using these modifiers because the whole ticket could be
blackened if the DI modifier is forgotten. In inverted mode, the printer will automatically add a black border
around the character to improve its readability. Therefore, an inverted character is actually slightly larger than a
normal character. This must be remembered when positioning characters beneath inverted characters with
row/column commands. It is recommended that a new row/column command be sent for the line following an
inverted one. If one is not sent, then the lines may be closer together than expected because of the increased
size of the inverted characters. (This feature is not presently available with soft fonts.)
BAR CODES
Code 39, Interleaved 2of 5, EAN13, EAN8, UPC, USS-Coda bar, Code 128 , Softstrip, PDF 417, Aztec, QR and
Data Matrix barcodes can be printed via the appropriate select codes. All can be printed in either ladder or
picket fence orientations. Ladder bar codes are printed along the width of the ticket and picket fence bar codes
are printed along the length of the ticket. Ladder bar codes can be printed top to bottom (RR) or bottom to top
(RL). Picket fence bar codes can be printed left to right (NR) or right to left (RU).
All bar codes should be selected by specifying the starting address, bar code size, orientation and type of bar
code. Most bar codes are built using bars 8 dots high and 1 dot wide. This is the minimum size of a bar (called
a unit dimension). The height of the bar can be changed in units of 8 using the bar code size command.
Therefore, the number used to select the bar code size represents the number of 8 dot high bars to be used to
construct the bar code. (A bar code size of three translates to a 24 dot high bar code.)
All bar codes can be expanded from their normal bar width of one dot by using the expanded (X) command.
The expanded command allows you to double, triple, etc., the length of the bar code. It does not affect the
height (size) of the bar code. Normally, on a 200 dpi head you should at least use the <X2> command, <X3> for
300 dpi.
There are two types of bar code select commands. Using uppercase letters to select a bar code type will allow
you to print bar codes in only two rotations, top to bottom and left to right. This command is to keep the
software downward compatible with older FGL printers. A new type of command using lowercase letters to
select bar code type has been added to the FGL44 language. This command allows the rotation commands to
be used to rotate bar codes in all four directions.
剩余147页未读,继续阅读
资源评论

嘻哈冬
- 粉丝: 0
- 资源: 1

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
