我正在为Epson TM-H5000II打印机编程。
我在调用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()