从嵌入式系统打印

发布于 2024-07-13 21:21:46 字数 278 浏览 3 评论 0原文

我们正在使用 ARM9/RTOS 系统制作实验室仪器。 客户询问如何从 ARM9 系统打印简单的报告。 在这种情况下,我们的 RTOS 中有 USB 主机支持。 我正在考虑在通用 PCL 中打印位图,希望能够覆盖最广泛的打印机。 有更好的方法来解决这个问题吗? 我假设 RTOS 没有打印机驱动程序,并且我不想支持很多打印机。

我们的系统还支持 USB 设备模式,因此您可以插入照片打印机,而我们的设备将显示为 USB 记忆棒。 这样就可以了,但是有点笨拙。 这将是一个 C/C++ 嵌入式系统

We are making a lab instrument using an ARM9/RTOS system. The client has asked about printing simple reports from the ARM9 system. In this case, we have USB Host support in the RTOS. I'm thinking about printing bitmaps in generic PCL, hoping that will cover the widest range of printers. Is there a better way to approach this? I'm assuming the RTOS does not have printer drivers, and I don't want to support a lot of printers.

We also support USB device mode on our system, so you could plug in a photo printer, and our device would appear to be a USB stick. So that would work, but it's a bit clunky. This will be a C/C++ embedded system

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

污味仙女 2024-07-20 21:21:46

假装成数码相机并与 PictBridge 打印机连接实际上听起来很聪明。 它将消除处理不同打印机驱动程序的需要,如果我对技术的理解是正确的,您甚至可以直接从您的设备控制打印机的操作。

另一方面,作为使用过大量计算机化实验室仪器(示波器等)的人,我发现从以太网/Web 界面保存屏幕截图的功能更加有用。 印刷已死。

Pretending to be a digital camera and interfacing with a PictBridge printer actually sounds pretty clever. It would remove the need to deal with different printer drivers, and if my understanding of the technology is correct, you could even control the operation of the printer right from your device.

On the other hand, as someone who has used a fair number of computerized lab instruments (oscilloscopes etc.) I find the ability to save screenshots from an ethernet/web interface to be much more useful. Print is dead.

忱杏 2024-07-20 21:21:46

您是否了解过所有示波器供应商都在做什么? 他们都有打印选项(我认为),我不知道他们正在做什么来解决这个问题。

上次我参与类似的事情时,我们使用串行端口与使用 PCL 的 HP 打印机进行通信。 这适得其反,因为每个人都很快停止生产串行打印机!

Have you looked at what all the scope vendors are doing? They all have print options (I think) and I don't know what they are doing to solve this problem.

Last time I was involved with something like this, we used serial ports to talk to HP printers using PCL. That backfired as everyone quickly stopped making serial printers!

半城柳色半声笛 2024-07-20 21:21:46

大多数打印机本身就支持 PostScript,因此您可以通过网络发送它,但这比直接的 ASCII 麻烦得多。 有图书馆,但它们很大。

PostScript is natively supported by most printers, so you could just send it over the wire, but it would be a lot more cumbersome than straight ASCII. There are libraries, but they're bulky.

躲猫猫 2024-07-20 21:21:46

由于您的设备可能看起来像 USB 记忆棒,因此一个简单的解决方案是生成 JPEG 图像形式的报告,然后打开打印机并打印它。 这样,想要无纸输出的人就可以按原样使用图像,而其他人都可以打印它。

Since your device can appear to be a USB stick, a simple solution would be to generate a report as a JPEG image and then have the printer open and print it. This way, the people who want paperless output can use the image as-is, and everyone else can print it.

流心雨 2024-07-20 21:21:46

如果我理解正确的话,您可以编写一个格式化的文本文件,并通过 Windows 在“USB 棒”模式下执行“打印”命令。

If I understand you correctly, you could write a formatted text file and do a "print" command through Windows in the "usb stick" mode.

最后的乘客 2024-07-20 21:21:46

对于简单的报告,最好坚持使用直接 ASCII。 如果您需要一些图形,PCL 对于黑白激光打印机来说是一个不错的选择,但我不确定它对于更常见的喷墨打印机的通用性如何。

编辑:PCL 参考手册可用来自 HP 的 PDF 文件。

For a simple report, it would be best to stick to straight ASCII. If you need some graphics, PCL would be a good choice for B/W laser printers, but I'm not sure how universal it would be for the more common ink-jet printers.

Edit: the PCL Reference Manual is available as a PDF from HP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文