我正在为打印机 Epson TM-H5000II 编程。
我在调用函数 ESC c 0 4 时尝试打印便条纸。
我正在使用的基本步骤:
- 手动插入纸张
- 调用 ESC c 0 4(选择隔页纸)
问题是在调用 ESC c 0 4 后,纸张将从打印机中弹出。
如何告诉打印机停止从打印机中弹出我的纸张?
可以这样做还是打印机的限制?
更新 2013-03-16
我找到了另一个爱普生文件。我正在尝试禁用 TOF 和 BOF 传感器。但我不确定我的代码是正确还是错误。希望有人能给我一些提示来解决问题。谢谢你
这是文件。第 1 页http://postimage.org/image/i0mffniv9 第 2 页 http://postimage.org/image/ev1tpg091
下面是我的代码
Dim SerialPort1 As New SerialPort("COM1")
SerialPort1.BaudRate = 9600
SerialPort1.Parity = IO.Ports.Parity.None
SerialPort1.StopBits = 1
SerialPort1.DataBits = 8
SerialPort1.WriteBufferSize = 4096
If SerialPort1.IsOpen = False Then SerialPort1.Open()
If SerialPort1.IsOpen Then
'SerialPort1.DiscardInBuffer()
'SerialPort1.DiscardOutBuffer()
'Initialize Printer
Dim BufferInitialize() As Byte = {&H1B, &H40}
SerialPort1.Write(BufferInitialize, 0, BufferInitialize.Length)
''Enable(SLip) ESC c 1 4
Dim Buffer5() As Byte = {&H1B, &H63, &H31, &H4}
SerialPort1.Write(Buffer5, 0, Buffer5.Length)
'Disable sensor
Dim BufferTOF() As Byte = {&H1B, &H63, &H34, &H10}
SerialPort1.Write(BufferTOF, 0, BufferTOF.Length)
'Disable sensor
Dim BufferBOF() As Byte = {&H1B, &H63, &H34, &H20}
SerialPort1.Write(BufferBOF, 0, BufferBOF.Length)
'Enable(SLip) ESC c 0 4
Dim Buffer2() As Byte = {&H1B, &H63, &H30, &H4}
SerialPort1.Write(Buffer2, 0, Buffer2.Length)
SerialPort1.WriteLine("WHY")
'Release
Dim BufferEnd() As Byte = {&H1B, &H71}
SerialPort1.Write(BufferEnd, 0, BufferEnd.Length)
End If
If SerialPort1.IsOpen = True Then SerialPort1.Close()