Google Answers Logo
View Question
 
Q: Cheking Cash draw status on parallel port ( No Answer,   0 Comments )
Question  
Subject: Cheking Cash draw status on parallel port
Category: Computers > Programming
Asked by: yon-ga
List Price: $25.00
Posted: 21 Jul 2003 17:44 PDT
Expires: 20 Aug 2003 17:44 PDT
Question ID: 233550
I'm using Epson Tm-T88P (parallel port) printers with MMF or AGP cash
drawers pluged in the printer. How can I get the cash drawer status
(open / closed) in my
clipper code.

Request for Question Clarification by mathtalk-ga on 23 Jul 2003 10:29 PDT
Hi, yon-ga:

It may not be possible to do this.  The parallel port "pass through"
interface apparently allows for a character (MMF) or sequence of
characters (AGP) to be output on the parallel port to "open" the cash
drawer.

Not all parallel ports even support a bi-directional flow of
information, though of course there are "paper out" and "printer
off-line" signals that could be conceivably converted to this purpose.
 However the philosophy of "pass through" printing would seem to argue
against this.

I have contact information for technical support in both companies and
would be pleased to inquire from both on your behalf.  However I'd
like to know whether you are willing to pay for the information even
if it turns out to be "negative", ie. that you cannot do that.

regards, mathtalk-ga

Clarification of Question by yon-ga on 24 Jul 2003 05:25 PDT
Hi, Tankes

>> It may not be possible to do this.  

Its in the Epson help docs.  Other POS software is using it to sound
an alarm when the draw is open.

It’s a RJ11 cable coming from the cash drawer in to the printer the
printer receives a command to send a 12V signal to the RJ11 port, so
its not "pass through"

I could email you the Docs -in PDF format (I cant cut and paste)-, my
problem is converting the technical lingo to clipper code

Thanks again

Request for Question Clarification by mathtalk-ga on 24 Jul 2003 07:49 PDT
Hi, yon-ga:

If I understand correctly, you have an Epson T88P "point-of-sale"
receipt printer attached to a PC by printer cable (parallel port), and
then you further have a cash drawer (from MMF or AGP) attached to the
printer by RJ11 cable (cash drawer interface port).

You also have some PDF documents (for the Epson printer), but have
difficult selecting text within the document.  You probably _can_
select text, but the Adobe Acrobat Reader user interface is a little
bit tricky for this.  The usual "mouse" pointer in Adobe Acrobat
Reader is a "hand", signifying a document navigation/scrolling mode. 
You should see a text selection mode button on the Adobe Acrobat
Reader toolbar.  It looks like a letter T next to a rectangle with
dashed border.  Click that button and you will switch into text
selection mode, and then the mouse will allow you to select text for
copying (and pasting into another application).

It sometimes happens that a PDF document is primarily composed of
scanned images with little text, so conceivably even in text selection
mode as above you might not be able to copy and paste the command
documentation.  But in my experience with the Epson printer
documentation, their PDF documents are text based, so I don't think
this will be a problem for you.

I cannot receive email from you, sorry, but if you paste the specific
information from the Epson printer documentation about detecting the
cash drawer status here, this is likely to prove helpful to a Clipper
expert in understanding how to perform the required programming steps.

regards, mathtalk-ga

Clarification of Question by yon-ga on 28 Jul 2003 08:59 PDT
OK this is from the manual.


2.1.2.2 Reverse Mode (Data Transmission from Printer to Host)
The STATUS data transmission from the printer to the host is proceeded
in the Nibble or Byte mode.
' Description
This mode allows data transmission from the asynchronous printer under
the control of the host.
Data transmissions in the Nibble Mode are made via the existing
control lines in units of four bits
(Nibble). In the Byte Mode, data transmissions are proceeded by making
the eight-bits data
lines bidirectional.
The both modes fail to be proceeded concurrently with the
Compatibility Mode, thereby causing
half duplex transmission.

2.1.2.3 Interface Pin Assignments for Each Mode
Pin Source 	Compatibility Mode	 Nibble Mode 	Byte Mode
1 Host		 nStrobe 		HostClk 	HostClk
2 Host/Ptr 	Data0(LSB) 		Data0(LSB) 	Data0(LSB)
3 Host/Ptr 	Data1 			Data1		 Data1
4 Host/Ptr 	Data2 			Data2 		Data2
5 Host/Ptr 	Data3			 Data3		 Data3
6 Host/Ptr 	Data4			 Data4		 Data4
7 Host/Ptr 	Data5 			Data5 		Data5
8 Host/Ptr 	Data6 			Data6 		Data6
9 Host/Ptr 	Data7(MSB) 		Data7(MSB)	 Data7(MSB)
10 Printer	 nAck 			PtrClk 		PtrClk
11 Printer Busy PtrBusy/Data3, 7 PtrBusy
12 Printer PError AckDataReq/Data2, 6 AckDataReq
13 Printer Select Xflag/Data1, 5 Xflag
14 Host nAutoFd HostBusy HostBusy
15 NC ND ND
16 GND GND GND
17 FG FG FG
18 Printer Logic-H Logic-H Logic-H
19 GND GND GND
20 GND GND GND
21 GND GND GND
22 GND GND GND
23 GND GND GND
24 GND GND GND
25 GND GND GND
26 GND GND GND
27 GND GND GND
28 GND GND GND
29 GND GND GND
30 GND GND GND
31 Host nInit nInit nInit
32 Printer nFault nDataAvail/Data0, 4 nDataAvail
33 GND ND ND
34 Printer DK_STATUS ND ND
35 Printer +5V ND ND
36 Host nSelectIn 1284-Active 1284-Active


*NC: Not Connected
ND: Not Defined

NOTES: 1. A prefix “n” to signal names refers to “L” active signals.
To the host provided with none of
the signal lines listed above, both-way communication fails.
2. For interfacing, signal lines shall use twisted pair cables with
the return sides connected
to signal ground level.
3. Interfacing conditions shall be all based on the TTL level to meet
the characteristics
described below. In addition, both rise time and fall time of each
signal shall be
0.5 ìs or less.
4. Data transmission shall not ignore the signal nAck or Busy. An
attempt to transmit data
with either signal, nAck or Busy, ignored can cause lost data. (Data
transmissions to
the printer shall be made after verifying the nAck signal or while the
Busy signal is at the
“L” level.)
5. Interface cables shall be as minimum required short in length as
possible.

Specifications Characteristics Symbol Min[ns] Max[ns]
Data Hold Time (host) tHold 750 --
Data Setup Time tSetup 750 --
STROBE Pulse Width tSTB 750 --
READY Cycle Idle Time tReady 0 --
BUSY Output Delay Time tBUSY 0 500
Data Processing Time tReply 0 -
ACKNLG Pulse Width tACK 500 10s
BUSY Release Time tnBUSY 0 -
ACK Cycle Idle Time tNext 0 --
*The printer latches data at a nStrobe “timing


2.1.2.7 Reception of status from the printer through the bidirectional
parallel interface
In the bidirectional parallel interface specifications, the printer
status transmission is available by using
the both-way communication facility in the Nibble/Byte Modes in
accordance with the IEEE 1284.
In this case, different from in the RS-232 serial interface
specifications, the real-time interruptions from
the printer to the host are disabled and thus precautions must be
taken to the followings.
1) Allowable capacity of the printer internal buffer is 99 bytes
(except ASB status). The status
signals exceeding this capacity will be discarded. To prevent possible
loss of status, the host
shall be ready for data acception (Reverse Mode).
2) When ASB is used, the host is preferably in the wait state for data
acception (Reverse Idle Mode).
When this state is not available, the host shall enter the Reverse
Mode to always monitor the
presence of data.
3) When ASB is used, preference shall be given to the ASB status for
transmission over the other
status signals. Any accumulated ASB status signals left for
transmission from the last to the
newest ASB status transmission shall be transmitted together at a time
as one ASB status
showing the presence of change, followed by the latest ASB status.
Example: In the normal (wait) state, the ASB status is configured as
follows.
First Status Second Status Third Status Fourth Status
0001 1000 0000 0000 0000 0000 0000 0000
When a sequence of operations are proceeded, the near end is detected
and
the printer cover is opened, then the printer cover is closed, the
following
pieces of data are accumulated.
First Status Second Status Third Status Fourth Status
0001 1000 0000 0000 0000 0011 0000 0000 Near end detection
0011 1000 0000 0000 0000 0011 0000 0000 The printer cover is opended.
0001 1000 0000 0000 0000 0011 0000 0000 The printer cover is closed.
When the ASB status is received following this, a total of eight (8)
bytes of
ASB will be transmitted as follows.
Accumulated ASB ( + + )
First Status Second Status Third Status Fourth Status
Accumulated ASB ( + + ) 0011 1000 0000 0000 0000 0011 0000 0000
+ First Status Second Status Third Status Fourth Status
The latest ASB ( ) 0001 1000 0000 0000 0000 0011 0000 0000
Fourth Status



2.1.3.2 Switching between online and offline
The printer does not have an online/offline switch.
The printer goes offline:
1) Between when the power is turned on (including reset using the
interface) and when the printer is
ready to receive data.
2) During the self-test.
3) When the cover is open.
4) During paper feeding using the paper feed button.
5) When the printer stops printing due to paper-end (in cases when an
empty paper supply is
detected by either paper roll and detector or the paper roll near-end
detector with a printing halt
feature set enabled due to paper shortage by ESC c 4).
6) During macro executing standby status.
7) When a temporary abnormality occurs in the power supply voltage.
8) When an error has occurred.
9) When the receive buffer becomes full. (*1)
*1 ' Definition of “receive buffer full”
' When the receive buffer capacity is specified to 4 KB (DIP SW1-2 is
Off):
' If the DIP SW2-5 is off, when the remaining space in the receive
buffer drops to 128 bytes,
the printer status becomes “buffer full” and it remains “buffer full”
until the space in the
receive buffer increases to 256 bytes.
' If the DIP SW2-5 is on, when the remaining space in the receive
buffer drops to 128 bytes,
the printer status becomes “buffer full” and it remains “buffer full”
until the space in the
receive buffer increases to 138 bytes.
' When the receive buffer capacity is specified to 45 bytes (DIP SW1-2
is On):
' Regardless of the DIP SW2-5 setting, when the remaining space in the
receive buffer drops
to 16 bytes, the printer status becomes “buffer full” and it remains
“buffer full” until the space
in the receive buffer increases to 26 bytes.
' The printer ignores the data received when the remaining space in
the receive buffer
is 0 bytes.
·	For notes on setting DIP switch 2-1 to ON, refer to Section 2.1.1.6.

3.3.3.2 Parallel interface specification
SW Function ON OFF
1 Handshaking (BUSY condition) ' Receive buffer full ' Offline
' Receive buffer full
2 Reserved (Do not change settings) --- Fixed to Off.
3 Refer to Table 3.3.7
4
Selects print density /
Low power consumption mode
5 Setting the release condition of the
receive buffer BUSY state (this function
is effective when the capacity of the
receive buffer is set to 4 KB.)
Releases the BUSY
state when the
remaining capacity of
the receive buffer
reaches 138 bytes.
Releases the BUSY
state when the
remaining capacity of
the receive buffer
reaches 256 bytes.
6 Reserved (Do not change settings) --- Fixed to Off.
7 Reserved (Do not change settings) --- Fixed to Off.
8 I/F pin 31 reset signal
(Do not change settings)
Fixed to On ---



DLE EOT n
[Name] Real-time status transmission
[Format] ASCII DLE EOT n
Hex 10 04 n
Decimal 16 4 n
[Range] 1 .n .4
[Description] Transmits the selected printer status specified by n in
real-time, according to the following
parameters:
n = 1: Transmit printer status
n = 2: Transmit offline status
n = 3: Transmit error status
n = 4: Transmit paper roll sensor status
[Details] ' The printer transmits the current status. Each status is
represented by one-byte data.
' The printer transmits the status without confirming whether the host
computer can receive
data.
' The printer executes this command upon receiving it.
' This command is executed even when the printer is offline, the
receive buffer is full, or there
is an error status with a serial interface model.
' With a parallel interface model, this command can not be executed
when the printer is busy.
This command is executed even when the printer is offline or there is
an error status when
DIP switch 2-1 is on with a parallel interface model.
' When Auto Status Back (ASB) is enabled using the GS a command, the
status transmitted by
the DLE EOT command and the ASB status must be differentiated. (Refer
to Appendix G,
TRANSMISSION STATUS IDENTIFICATION)
' Even though the printer is not selected using ESC = (select
peripheral device), this command
is effective.
[Notes] ' The status is transmitted whenever the data sequence of
<10>H<04>H<n>
(1 .n .4) is received.
Example:
In ESC .m nL nH d1...dk, d1=<10>H, d2=<04>H, d3=<01>H
' This command should not be used within the data sequence of another
command that
consists of 2 or more bytes.
Example:
If you attempt to transmit ESC 3 n to the printer, but DTR (DSR for
the host
computer) goes to MARK before n is transmitted and then DLE EOT 3
interrupts
before n is received, the code <10>H for DLE EOT 3 is processed as the
code for
ESC 3 <10>H.


n = 1: Printer status
Bit Off/On 	Hex 	Decimal	 Function
0    Off 		00 	0 		Not used. Fixed to Off.
1    On		02	2 		Not used. Fixed to On.
2    Off		00 	0 		Drawer open/close signal is LOW (connector pin 3).
      On               04  	4	             Drawer open/close signal is
HIGH (connector pin 3).
3    Off		00 	0 		Online.
      On 		08 	8 		Offline.
4    On 		10 	16 		Not used. Fixed to On.
5,6 - - - Undefined.
7    Off 		00 	0		 Not used. Fixed to Off.

n = 2: Offline status
Bit 	Off/On 		Hex 	Decimal 	Function
0 	Off		 00 	0 		Not used. Fixed to Off.
1 	On 		02	2 		Not used. Fixed to On.
2 	Off 		00 	0 		Cover is closed.
On		04 	4 		Cover is open.
3 	Off		00 	0 		Paper is not being fed by using the FEED utton.
On 		8 	8 		Paper is being fed by the FEED button.
4	 On 		10 	16 		Not used. Fixed to On.
5	 Off		 00	 0 		No paper-end stop.
On 		20	 32 		Printing is being stopped.
6 	Off		 00 	0 		No error.
On 		40 	64 		Error occurs.
7 	Off		 00 	0 		Not used. Fixed to Off.

Bit 5: Becomes on when the paper end sensor detects paper end and
printing stops.

n = 3: Error status
Bit Off/On Hex Decimal Function
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
2 – – – Undefined
3 Off 00 0 No autocutter error.
On 08 8 Autocutter error occurs.
4 On 10 16 Not used. Fixed to On.
5 Off 00 0 No unrecoverable error.
On 20 32 Unrecoverable error occurs.
6 Off 00 0 No auto-recoverable error.
On 40 64 Auto recoverable error occurs.
7 Off 00 0 Not used. Fixed to Off.

Bit 3: If these errors occur due to paper jams or the like, it is
possible to recover by correcting
the cause of the error and executing DLE ENQ n (1 .n .2). If an error
due to a
circuit failure (e.g. wire break) occurs, it is impossible to recover.
Bit 6: When printing is stopped due to high print head temperature
until the print head
temperature drops sufficiently or when the paper roll cover is open
during printing, bit 6
is On.

n = 4: Continuous paper sensor status
Bit Off/On Hex Decimal Function
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
2, 3 Off 00 0 Paper roll near-end sensor: paper adequate.
On 0C 12 Paper near-end is detected by the paper roll near-end
sensor.
4 On 10 16 Not used. Fixed to On.
5, 6 Off 00 0 Paper roll sensor: Paper present.
On 60 96 Paper roll end detected by paper roll sensor.
7 Off 00 0 Not used. Fixed to Off.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy