Back when I was a junior engineer I made a small system for dealing with industrial printers that took either direct printer language commands or pdfs and exported the printer driver output to a file via the Redmon printer driver output file exporter and then ftped it to the printer over the network. This avoided manual driver installation of hundreds of printers and may still be sold in a new project. It's hacky af but still works and beats alternatives.
I had a Customer who used Zebra industrial label printers for labeling product. The print jobs came from one of their Customers' ERP servers, sent over a VPN directly to the production line. The Customer might send hundreds of labels in a single job. If the roll of label stock ran out during the job their server would re-send the job from the beginning after the printer was reloaded. This meant somebody had to find and dispose of the duplicate labels (or risk re-using a serialized label). The Customer said that they couldn't modify the ERP software that was composing the jobs. A friend and I wrote a parser for the Zebra "ZPL" printer language to ingest the large jobs, split them into single label jobs, then shoot those single labels into the printer. We used Redmon to intercept the jobs coming from the Customer's ERP server into an LPR queue on a Windows server machine. Redmon would hand the job off to the label splitter.
I once built a backup script in Batch (Windows Shell scripting language). That was a while before Powershell got popular, and needed to work on everything from Windows 2000 to Windows 7 or server. Additionally, as I was working for a small (read: 5 guys) IT shop with small customers, it needed to be free, while still supporting lots of advanced functionality (automatic diff backups, restore operations, rotation, network drive mapping, configuration parsing, etc.) that ruled out most proper solutions.
While it wrapped a low-level shadow snapshot tool, it still got a few hundred lines long, did crazy logic and output stuff, and even required me to create a unit testing framework for Batch files from scratch. If that all doesn’t sound really noteworthy, it’s because you don’t know that curse of a shell :)
I have centralized AC and the wall-mounted control panel is located in a small storage room. I wanted to hack the control panel with an Arduino and a Raspberry pi so I can control it remotely via my Alexa. I ended up buying a switch bot [0] and an IP camera and was done with it.
My boss in a gear factory had some code from about 1982 that ran in "Tk!Solver" 1.0 under MS-DOS. He had moved it as far forward as he could, in DOS boxes, until Windows 10 got rid of 16 bit mode. The new version of Tk!Solver was something like $6000, totally unacceptable.
I ended up running the program in MS-DOS, inside VirtualBox. I used MS-DOS to route the "printer" to COM1. Then on the outside, I routed the serial output to a file on the host machine. He just clicked the shortcut that fired it all off, did the calculations he needed to do, and "printed it", then exited Tk!Solver. The batch file then checked for output, and if it was there, it printed it. He was happy, and it only took about an hour to get it all working.
Comments (499) 174 threads
Earlier commentsI had a Customer who used Zebra industrial label printers for labeling product. The print jobs came from one of their Customers' ERP servers, sent over a VPN directly to the production line.
The Customer might send hundreds of labels in a single job. If the roll of label stock ran out during the job their server would re-send the job from the beginning after the printer was reloaded. This meant somebody had to find and dispose of the duplicate labels (or risk re-using a serialized label).
The Customer said that they couldn't modify the ERP software that was composing the jobs.
A friend and I wrote a parser for the Zebra "ZPL" printer language to ingest the large jobs, split them into single label jobs, then shoot those single labels into the printer. We used Redmon to intercept the jobs coming from the Customer's ERP server into an LPR queue on a Windows server machine. Redmon would hand the job off to the label splitter.
0: https://www.switch-bot.com/products/switchbot-bot
I ended up running the program in MS-DOS, inside VirtualBox. I used MS-DOS to route the "printer" to COM1. Then on the outside, I routed the serial output to a file on the host machine.
He just clicked the shortcut that fired it all off, did the calculations he needed to do, and "printed it", then exited Tk!Solver. The batch file then checked for output, and if it was there, it printed it.
He was happy, and it only took about an hour to get it all working.
All comments shown.
Couldn't load more comments. Check your connection and try again.