2 Replies Latest reply on Jan 4, 2019 12:57 AM by Abdul Wadood Halimeh

    What is the best practice to track print job progress?

    Abdul Wadood Halimeh

      Hello!

       

      I'm writing a program to print labels on GK420t and ZT420 and I'm trying to follow Zebra's recommendations and best practices.

       

      I find it really useful for the client program to be informed about the print job progress especially when using serialized data command (^SN). I used to utilize ZebraNet alerts using (^SX) command to do the job, however, I don't want to run another (SNMP, UDP, or TCP) listener on my host machine, besides it wasn't very reliable (sometimes printers stop sending alerts for some reason).

       

      This document, however, suggests the use of printer's odometer "odometer.total_label_count" to track progress (section 6. Status). I tested this, it worked on ZT420 (V75.19.7Z) and failed on GK420t (V61.17.17Z) (returned "?"). I checked all other odometer entities, they all return information in inches/centimeters rather than counts.

       

      I noticed that both printers return a parameter called "number of formats in receive buffer" (as described in the ZPL programming guide). I'm using this parameters to track progress and it works on both printers.

       

      I'm still not sure about this solution though, is this reliable? can I depend on this and safely assume that it will work on other Zebra printer models?

       

       

      Thanks,

      Abd

        • Re: What is the best practice to track print job progress?
          Dmitry Prokhorov

          Hello Abdul,

           

          As you can see in ZT420 firmware release notes document, your printer has odometer.total_label_count command is supported starting from version V68.20.01ZB. It has been released 01 November 2017.

          https://www.zebra.com/content/dam/zebra_new_ia/en-us/software-printer/firmware/en/release-notes/link-os-firmware-v5-2-p1…

           

          At the same time, you can see in GK420t firmware release notes document, it has no odometer.total_label_count command supported in most recent version V61.17.17Z. It has been released 30 December 2013.

          https://www.zebra.com/content/dam/zebra/firmware/en/release-notes/v61-17-17z-releasenotes.pdf

           

          So you may suppose that your printers that with firmware released after October 2017 or with version from V68.xx and up may have a good chance for odometer.total_label_count command to be supported.

           

          You can always check SGD commands support status on pages 1393 to 1433 of "Programming Guide" document:

          https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf

          Also you can check it in Release Notes document for exact version of your device firmware.

           

          p.s. Have you checked a device.jobs_print SGD command? Could it be an option for your on devices, that have no support for odometer.total_label_count?

           

          Dmitry Prokhorov

          Software Engineer, Kutir Mobility

          Posted on behalf of Zebra Technologies

            • Re: What is the best practice to track print job progress?
              Abdul Wadood Halimeh

              Hello Dimitry,

               

              Thanks for your reply.

               

              Yes, I'm aware of the software version support for these commands, that's why I thought there must be another way to track print jobs (a command that all versions support).

              p.s. Have you checked a device.jobs_print SGD command? Could it be an option for your on devices, that have no support for odometer.total_label_count?

              The problem with this SGD command is that it returns the total count of submitted jobs. There is no way to tell whether a job has actually been processed or more precisely how many labels have been printed using this command.

               

              However, I guess I recently found a good way to track progress on both printers (still under testing though). The "~HS" command as described in the guide returns two interesting parameters:

               

              1. number of formats in receive buffer (3-digit number)
              2. labels remaining in batch (8-digit number)

               

              I use these parameters to track progress like this:

               

              progress = total_labels_sent_to_printer - (num_of_formats_in_receive_buffer * labels_remaining_in_batch)

               

              This seems to work fine so far, however, I would like to know if this is a good practice.

               

               

              Best,

              Abd