问题
I'm trying interpret the Automatic Status Back (ASB) data from Epson POS printer. I've successfully made contact with the printer using some example code from the UB-E20 Technical Reference Guide (www.amigopos.com/faq/faq_262.aspx). Unfortunately, the manual only states where I can expect the 4 bytes of ASB data in the return string from my query. It does not explain what each bits represents in those 4 bytes. I can see that the return values change when I open the cover of the printer and/or remove paper, but I want to be certain that I am looking for the proper values for the different failure modes.
I've tried contacting Epson, but have had no response. And I cannot seem to find a spec for ASB anywhere on-line. Anyone have any experience with ASB on Epson Printers?
回答1:
I had the same problem a few months ago, but talking with some guys from Epson i made this. This is how to get the Status of the paper I hope that this will help you.
' **********************
' Format ASCII DLE EOT n
' Decimal 16 4 n
' **********************
' n Function
' 1 Transmit printer status
' 2 Transmit off-line status
' 3 Transmit error status
' 4 Transmit paper roll sensor status
' ***********************
comPort.Write(Chr(16) & Chr(4) & Chr(4))
Dim aReplyBuffer(0) As Byte
Dim intNBytes As Integer = 0
comPort.Read(aReplyBuffer, 0, 1)
AND THIS IS THE RESPONSE
' Status Response
' n name
' 0 Error
' 30 No Paper
' 18 OK
回答2:
I contacted Epson directly through their developer network. They had me sign an NDA and now I have the spec. I'm just putting this info up here for anyone who might need it in the future.
来源:https://stackoverflow.com/questions/514231/epson-pos-printer-automatic-status-back-specification