22 Replies Latest reply on Mar 5, 2018 6:11 AM by Kenny Gregory

    ZD410 SGD.GET odometer.total_label_count returns device.host_status

    Kenny Gregory

      Hello,

       

      At the top of this image where you see <Print>.. I SGD.GET device.host_status. Where you see sensor.p:.. is me requesting sensor.peeler.. the odometer:.. is me requesting odometer.total_label_count. Each time the printer prints.. I get this device.host_status bleeding into my other responses.

       

      I've also limited my code to only issuing the SGD.GET("odometer.total_label_count", Conn); ,but I'm getting the value of device.host_status even though it was never called. The image below is me trying to determine where that unexpected data was coming from (030,0,0,0112,000,0,0,0...). If you look near the bottom you will see after the label prints I begin to get the expected results.

       

      I believe SGD just wraps ZPL or similar commands and fetches the odometer.total_label_count from ZPL ~HQ. In doing so it is not always parsing the value to return for odometer.total_label_count correctly.

       

      I'm using LinkOS SDK and developing in Visual Studio C# .NET

       

      output.png

        • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
          Kenny Gregory

          The above image was produced with the following call: LinkOsPrinter.GetSettingValue("sensor.peeler");

          • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
            Kenny Gregory

            I believe I have limited this to firmware as before I uploaded the firmware I was not getting this problem. Unfortunately I'm not able to find a firmware archive so that I can get our printers back into production until we get a proper answer on where the bug lies in LinkOS

              • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                Robin West

                Hi Kenny, Which version of firmware are you seeing this on?  V84.20.10Z?

                  • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                    Kenny Gregory

                    I have tried firmware versions:

                     

                    v77-20-01z

                    v84.20.10z

                     

                    Unfortunately the initial firmware on one of the printers our company purchased had a firmware that did not have this issue, but in troubleshooting the remaining printers (all the same model) I did not document that working version like a dummy. I did not know at the time what the cause was and firmware was one of many things I have tried, however I feel I have limited it down to the firmware and have attempted different approaches and minimal code with same results. I debugged the LinkOS SDK using Resharper and got these same results directly from the SDK.

                  • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                    Robin West

                    Hi Kenny,

                    Do you have this connected over USB and do you have a Zebra Designer driver installed for it?  If so, you may have the status/port monitoring feature for the driver turned on.  Basically the driver may be the one requesting the ~HS (your output) occasionally to make sure it knows the current status of the printer.  There is no way of distinguishing between sources/outputs over USB, so your app is capturing it.  You can remove the monitor by closing it in the system tray or uninstalling it in Add/Remove Programs

                    I did verify that directly sending "! U1 getvar \"odometer.total_label_count\"\r\n"  gets the correct value in this firmware on a ZD410.

                    1 of 1 people found this helpful
                      • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                        Kenny Gregory

                        I'm using USB_DIRECT connection type. I installed the software on Zebra's setup cd but we are not using the designer. I did install the Zebra driver I can get you the version when I return to work tomorrow. It only triggers this when the device prints so if that makes sense to you then it's worth a shot. I can request settings from the printer all day and get valid results until it occurs during a print. I'm testing this on multiple Microsoft surface tablets all running Windows 10 and a Dell notebook.

                         

                        Did you do your getvar on a separate thread while printing on the other? This would recreate the scenario I'm facing.

                        • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                          Kenny Gregory

                          Okay so this morning I have had a chance to verify Zebra Designer is not installed:

                           

                           

                          Here is the driver version:

                           

                            • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                              Robin West

                              Hi Kenny,

                              Even if you don't have ZebraDesigner application installed, the driver Zebra provides is still a ZebraDesigner driver.  It's not a problem, just check for the Zebra Status Monitor in your system tray or in the "Add/Remove Programs list".  The Status Monitor is an optional install when you install the driver. Turn off or uninstall the monitor. The driver itself is fine and won't communicate with the printer without direct user interaction.

                               

                              I did run the attached multi-threaded program and it's functional but not well. I did not get the unexpected data directly, but I did get a couple of malformed status responses because the response from one thread was showing up in the data being looked at by another thread. The reason is that running multi-threaded communication over USB is very problematic.  USB is essentially a serial connection.  It has no method to direct input or output to any specific thread.

                              If you do want to communicate to the printer via multiple threads you need to take into account the idea that you may receive extraneous data.

                              1 of 1 people found this helpful
                        • Re: ZD410 SGD.GET odometer.total_label_count returns device.host_status
                          Kenny Gregory

                          Robin,

                           

                          Yeah I don't have the Zebra Status Monitor either. I'll explain what I'm trying to do so maybe that would be easier. We are printing barcode labels and the user needs to specify the quantity between cycles. Lets say they print 2 barcodes. We have a peeler attachment so we want to print and wait until the user peels it so we check sensor.peeler until we get a 'clear' status. Then the next label will feed. They click the print button and repeat this cycle. It's a simple process, but what's causing me headaches is that when I send a Print to draw the barcode I can not seem to capture an event that the print has ended. If I use Windows EndPrint event it triggers immediately. So I changed my approach and monitored the jobs on the device, but it always returns 0. Every setting I think to monitor or event I try to catch leaves me empty handed. This is why I had went the route of monitoring the odometer and making sure the label qty had printed before I began looking at the sensor.peeler to see if it was clear. I believe even if I write a loop that after Print() is called to monitor the odometer and peeler that it will still give me this unexpected response containing the device.host_status. I will confirm this unless you have another solution.

                           

                          It seems that as soon as I send the Print() call it spools and I'm not able to find anywhere to catch an event that its complete. Is there a way to trigger an event from the device when its done printing that label. Or a way you would suggest for me to monitor.. If I monitor the sensor.peeler itself there is room for error and the app can get stuck in a unexpected flow. So I really need to know that a label has printed before I start reading from the sensor.

                           

                          Thank you very much for your time