Epson U220B Technical Reference - Page 96

Application Development Information, Rev. D - receipt printer

Page 96 highlights

5.1.2 OPOS Note This section describes the summary of status handling. Refer to "OPOS ADK Application Development Guide General Functions" for details. 5.1.2.1 Checking the printer state The state of the printer can be checked through properties supported by the printer. For example, if the user wants to check if the printer cover is open, the CoverOpen property can be used. If OPOSPOSPrinter1.CoverOpen = True Then MsgBox ìCover is open!î End If This and many other events can also be checked by firing a StatusUpdateEvent. [Event management] Private Sub OPOSPOSPrinter1_StatusUpdateEvent(ByVal Data As Long) If Data = PTR_SUE_COVER_OPEN Then MsgBox ìCover is open!î End If End Sub StatusUpdateEvent can return information on the following items. STATUS INFORMATION PTR_SUE_COVER_OPEN PTR_SUE_COVER_OK PTR_SUE_REC_EMPTY PTR_SUE_REC_NEAREMPTY PTR_SUE_REC_PAPEROK PTR_SUE_IDLE Cover is open. Cover is closed. Receipt paper is out. Receipt paper is near the end. (The near end detector is factory option. When the printer does not have one, the status does not occur.) Receipt paper is OK. Printer State is idle. When the FlagWhenIdle property is set to TRUE, PTR_SUE_IDLE is sent to inform the application that the printer is idle. Other than when data is being sent, the printer is in an idle state, so if FlagWhenIdle is TRUE, an event will be fired when printing is finished. After the event is fired, FlagWhenIdle will be set to FALSE. By using this value, the information below can be found out. *Finding out when multiple asynchronous print jobs have finished printing. When multiple asynchronous print jobs have been sent to the printer, it is possible to know when they have finished printing. After setting the AsyncMode property to TRUE and running the PrintNormal 5-2 Application Development Information Rev. D

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164

5-2
Application Development Information
Rev. D
5.1.2
OPOS
Note
This section describes the summary of status handling. Refer to “OPOS ADK Application Development
Guide General Functions” for details.
5.1.2.1
Checking the printer state
The state of the printer can be checked through properties supported by the printer. For
example, if the user wants to check if the printer cover is open, the CoverOpen property can be
used.
This and many other events can also be checked by firing a StatusUpdateEvent.
StatusUpdateEvent can return information on the following items.
STATUS INFORMATION
When the FlagWhenIdle property is set to TRUE, PTR_SUE_IDLE is sent to inform the
application that the printer is idle. Other than when data is being sent, the printer is in an idle
state, so if FlagWhenIdle is TRUE, an event will be fired when printing is finished. After the
event is fired, FlagWhenIdle will be set to FALSE. By using this value, the information below can
be found out.
*Finding out when multiple asynchronous print jobs have finished printing. When multiple
asynchronous print jobs have been sent to the printer, it is possible to know when they have
finished printing. After setting the AsyncMode property to TRUE and running the PrintNormal
PTR_SUE_COVER_OPEN
Cover is open.
PTR_SUE_COVER_OK
Cover is closed.
PTR_SUE_REC_EMPTY
Receipt paper is out.
PTR_SUE_REC_NEAREMPTY
Receipt paper is near the end. (The near end detector is
factory option. When the printer does not have one, the status
does not occur.)
PTR_SUE_REC_PAPEROK
Receipt paper is OK.
PTR_SUE_IDLE
Printer State is idle.
If OPOSPOSPrinter1.CoverOpen = True Then
MsgBox ìCover is open!î
End If
[Event management]
Private Sub OPOSPOSPrinter1_StatusUpdateEvent(ByVal Data As Long)
If Data = PTR_SUE_COVER_OPEN Then
MsgBox ìCover is open!î
End If
End Sub