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.