Does anyone have a good methodology for getting the status of a network printer and making it available to ignition. Through scripting. is it available through system properties? Or maybe making an HTTP call?
Basically, I want to set a tag off or on. Based on whether a print can be reached or not. Talking to TSC label printers for what it matters.
Printers are notoriously tricky things. You could try pinging it but that would only tell you if itâs alive in the most basic sense, not that its necessarily functional or accepting print jobs, in the middle of a printer job or facing some error.
Some newer printers Iâve seen now accept basic HTTP requests so perhaps you could find some help there and probably your best option if available.
Some others host a little website at their IP address where they have the Status available and you could probably hardcode something to get that status via a script when asked.
As for making the printer âavailableâ to Ignition, as long as the printer is available to the gateway OS it should be available to Ignition (I am assuming you are using the report module here). Making the printer available/usable by Ignition is not something I know of that can be set up via a script, you would have to configure that outside Ignition.
Inside of Ignition best you can hope for is 1) Seeing that the printer is not dead with a ping and 2) Possibly see the status of the printer with a HTTP call or by webscraping the printer webpage.
In scripting if a printer wasnât available I was going to default to the printer beside it. With some kind of logic.
I have like 15 of these printers.
The reports print automatically after some stuff happens in the field on the machines.
So I was going to send a prompt to the HMI and then just default the print job else where.
I figured I was going to probably have to scrape the printers web page or find the right call to make. If there wasnât some better way to get status out of java or something.