打印到POS显示单元 [英] Print to POS Display Unit

查看:250
本文介绍了打印到POS显示单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个爱普生显示单元(用于销售点),并将其设置为打印机。当我去打印机属性>字体(有一个测试输入框)时,我只能得到它打印所需的东西。

I have an Epson Display Unit (for the Point of Sale), and have it set up as a printer. I can only get it to print what I want when I go to Printer Properties > Fonts (there is a test input box).

但是从诸如记事本的应用程序打印没有结果。我试图让它与p.o.s.我在Excel中制作的应用程序我发现一个COMM端口通讯脚本 here ,但我不能通过OPEN命令。似乎有一个正在使用的文件。我想知道其他人是否有这种事情的经验。

However printing from an app such as notepad yields no results. I'm trying to get it to work with the p.o.s. app I made in Excel. I found a COMM port communication script here, but I can't get past the OPEN command. Seems there's a "file in use". I'd like to know if anyone else has had experience with this sort of thing.

推荐答案

假设您的打印机是连接到串行接口1,只要串行接口参数正确设置,并且您想要发送一个字符串到该接口,您可以尝试这个...

Under the assumption that your printer is connected to serial interface 1, provided that the serial interface parameters are correctly set, and you want to send a string of characters to that interface, you may try this ...

Sub WriteToCOM()
    Open "COM1:" For Output As #1
        Write #1, "ddd"
    Close #1
End Sub

将此代码粘贴到Excel VBA脚本中,并循环使用F8 - 它适用于我

Paste this code into an Excel VBA script and cycle thru it with F8 - it worked for me

您可以使用任何现有的COMx:或LPTx:替换COM1:(不要忘记分号!)

You may replace "COM1:" by any existing "COMx:" or "LPTx:" as well (don't forget the semicolon!)

我正在使用这个控件从包含广播电台名称及其频率的Excel表中控制业余无线电(设置频率)。我当然使用chr()函数发送特殊字符到我的装备。

I am using this to control an Amateur Radio (setting the frequency) from an Excel table containing broadcast station names and their frequencies. I am of course sending special characters to my gear using the chr() function.

宏被绑定到一个控制按钮。我的Excel是Office 2003(它已经在Office97中工作)

The Macro is tied to a control button. My Excel is Office 2003 (it worked already in Office97)

祝你好运
MikeD

Good luck MikeD

这篇关于打印到POS显示单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆