Writing Fingerprint programs that run on the PM and PX series printers

I’m in the middle of a couple of these projects, so while the subject is fresh, I’ll note tips.

The PM series printer needs to have device names in lower case, and both the PX and PM series converts everything to upper case by default. The command to turn this off is SYSVAR(43)=1, so you can get the version of the printer and execute this command accordingly:

IF LEFT$(VERSION$(1),2) = “PM” THEN SYSVAR(43) = 1

The VERSION$(1) command returns the printer type: PM43, PX4, etc.

I’m converting a program that runs on a PX series to run on a PM. The users are used to pressing the “<” and “i” key to execute certain functions, but these keys are absent on the PM series. To get around this I copied the less than key image from the /usr/share/ui/images/fpapps folder on the PM43 and copied it into the /home/user/display folder and named it funckey_1.png. I then edited the image with Paint to create a custom “i” key and saved it as funkey_5.png.

Next, I executed the display key function if the printer was a PM series:

IF LEFT$(VERSION$(1),2) = “PM” THEN
DISPLAY KEY 1,1
DISPLAY KEY 5,5
DISPLAY KEY 2,0
DISPLAY KEY 3,0
DISPLAY KEY 4,0
END IF

When the code executes, the display looks like this:

The less that and I key map to the F1 and F5 keys, but the display is friendly for the user. Note that the DISPLAY KEY2,0 through 4,0 hides the F2, F3, and F4 keys from the screen.

As I mentioned earlier, the PM series needs device names in lower case, so UART1: becomes uart1: and CONSOLE: becomes console:

Make all of your file names upper case and specify the path to make them compatible with both printers, so it’s /c/MYFILE.TXT.

We use the sound command to put timed delays into our code; a typical command: SOUND 20000,100. This doesn’t work with the PM series, it’s sound command is limited to 4 digits, so use SOUND 0,100 instead, This will run on both printers.

Intermec published a nice document on migrating to the PM series, you can find it here.

If you have images to print on your labels be aware the the DIR command works differently in the PM and PX series. The PM can rotate images in all four directions, the PX only by 180 degrees. The best practice is to use DIR1 on all images on your label and rotate the images themselves with an editor(such as IRFAN) as needed so you images will print out the same on both printers.

 

One last item that has nothing to do with this subject, but it is a Fingerprint topic. I was doing a program on a PC43 series printer using small cryo labels .5 inches long. After the label printed the label gap came to rest directly over the label sensor and the printer returned an out of media status when I queried it with ?PRSTAT.  No start/stop or label length commands could fix this so I used a PRSTAT(8) command instead and waited on a “next label not found error”,  a 132 to get around this issue. Saved a project.

How to print barcode labels from your program

Sometimes you need to print labels from a program you are writing. Here’s a few tricks to make that job easier.

You can develop a label format in its native language of IPL, ZPL, Direct Protocol, etc (there’s a bunch of them) but an easier method is to use a design tool, which are available for free from printer manufacturers and capture its output.  For Intermec printers you can download Bartender UltraLite from the Honeywell web site here. You’ll need to sign up to get an account and you’ll have to use their download tool, which works with Windows 7 but not 10.

Next, download the appropriate printer driver for your target printer. You can get these from the same Honeywell site or from Seagull Scientific.

Once you have the software and driver installed, use Bartender to design your label:

Print your label to check that it looks the way you want and you can then print your template to disk for later inclusion into your code.

Find the printer driver and open the Printer Properties page. Click on the Port Tab and change the Port to “File”:

Now print your label from Bartender again. A dialog box will pop up asking you for a file name and location to save the output. Once this is done you can open the file with a text editor and look at the data. The label above created this output file:

<xpml><page quantity=’0′ pitch=’50.8 mm’></xpml>’Seagull:2.1:DP
INPUT OFF
VERBOFF
INPUT ON
SYSVAR(48) = 0
ERROR 15,”FONT NOT FOUND”
ERROR 18,”DISK FULL”
ERROR 26,”PARAMETER TOO LARGE”
ERROR 27,”PARAMETER TOO SMALL”
ERROR 37,”CUTTER DEVICE NOT FOUND”
ERROR 1003,”FIELD OUT OF LABEL”
SYSVAR(35)=0
OPEN “tmp:setup.sys” FOR OUTPUT AS #1
PRINT#1,”MEDIA,MEDIA SIZE,XSTART,0″
PRINT#1,”PRINT DEFS,PRINT SPEED,200″
CLOSE #1
SETUP “tmp:setup.sys”
KILL “tmp:setup.sys”
CLIP ON
CLIP BARCODE ON
LBLCOND 3,0
<xpml></page></xpml><xpml><page quantity=’1′ pitch=’50.8 mm’></xpml>CLL
OPTIMIZE “BATCH” ON
PP373,698:AN7
BARSET “CODE128C”,2,1,6,203
PB “12345678”
PP474,495:NASC 1252
FT “Dutch 801 Roman BT”
FONTSIZE 12
FONTSLANT 0
PT “12345678”
PP325,297:PT “Sample Text”
LAYOUT RUN “”
PF
PRINT KEY OFF
<xpml></page></xpml><xpml><end/></xpml>

You can get rid of of the overhead and just keep the portion that actually prints the label:

PP373,698:AN7
BARSET “CODE128C”,2,1,6,203
PB “12345678”
PP474,495:NASC 1252
FT “Dutch 801 Roman BT”
FONTSIZE 12
FONTSLANT 0
PT “12345678”
PP325,297:PT “Sample Text”
PF

You can replace the two fixed text fields “12345678” and “Sample Text” with variable names and include it in your code.

You can test print the small file above by making an FTP connection from a command line to the printer and use PUT to sendthe label format to location PR1. As an example:

One label printer after the PUT command. Hope this helps.