Programmatically calibrate with LinkOS

I created an iOS app that prints labels to a QLn320 and ZQ620 mobile printer.  If the printer is not calibrated, it rolls out 3 labels for every one I try to print.

This app will be in 100 different locations that already have uncalibrated printers; obviously I can't drive to 100 locations to plug them into the Zebra Setup Utility. 

If I programmatically send ~jc^xa^jus^xz to the printer, it prints out about 8 completely black labels plus a few more.  If I continue to send the calibration command, it will send 3 labels for every 1 I intend to print.  If I remove the calibration command, it will subsequently print properly.  In other words, it seems if I send the calibration command just once, it will actually work.  The question is, is there a way for the app to know when to send the calibration command?  Is there a way to query the device to see if it's calibrated?

I notice if I send this in the Zebra Setup Utility:

! U1 getvar "media.type"

! U1 getvar "media.sense_mode"

I already get a return of "label" and "bar" even though it's not truly calibrated to my needs.  It seems to require the ~jc^xa^jus^xz command.

Any advice would be appreciated. I prefer to not confuse the users and require some sort of one time "Calibrate" button.  Thanks!

Usually, the label calibration takes 2-3 labels at most, even when calibrating from an app. Looks like there might be something else going on when the calibration command is sent from your app. Make sure that your app only sends the calibration commend once.

Once the calibration is done, the zpl.label_length will be set to whatever the label length detected by the calibration. If you know the label length beforehand, then you can use the following command to check if the printer has been calibrated or not from your app. ! U1 getvar “zpl.label_length”

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Usually, the label calibration takes 2-3 labels at most, even when calibrating from an app. Looks like there might be something else going on when the calibration command is sent from your app. Make sure that your app only sends the calibration commend once.

Once the calibration is done, the zpl.label_length will be set to whatever the label length detected by the calibration. If you know the label length beforehand, then you can use the following command to check if the printer has been calibrated or not from your app. ! U1 getvar “zpl.label_length”

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Hello,

It would be helpful to see a photo of both sides of paper media used to print your labels. There some type of media may that may produce issues.
Also you may need to check a label length and max label length setting values with a following commands:

! U1 getvar "zpl.label_length"
! U1 getvar "ezpl.label_length_max"

Dmitry Prokhorov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’