Search code examples
c#epsonopos

Monitor cashdrawer opened or not using EPSON printer in C#


We have Point of sale application. We don't want to start the billing while the cash-drawer is open.

I saw EPSON is having the "Auto Status Back" function. I have installed the "OPOS for dotnet" from the EPSON website.

It does open the cash drawer and prints to the printer. But when it comes to "cash-drawer open/close status", it is always returning false. The sample C# application is provided by EPSON, has OnStatusUpdateEvent event. It is firing when I open the printer cover, power on/off. But not firing when the cash-drawer is open/close.

I have tried this sample code using ESC-POS. Here also am getting "IsCashDrawerOpen = false" always.

{
   "IsWaitingForOnlineRecovery":false,
   "IsPaperCurrentlyFeeding":false,
   "IsPaperFeedButtonPushed":false,
   "IsPrinterOnline":true,
   "IsCashDrawerOpen":false,
   "IsCoverOpen":false,
   "IsPaperLow":false,
   "IsPaperOut":false,
   "IsInErrorState":false,
   "DidRecoverableErrorOccur":false,
   "DidUnrecoverableErrorOccur":false,
   "DidAutocutterErrorOccur":false,
   "DidRecoverableNonAutocutterErrorOccur":false,
   "DeviceConnectionTimeout":false
}

The printer model is EPSON TM-T82(Connected Via USB). The cash-drawer is connected via an RJ11 cable connected to the printer.

Can anyone help?


Solution

  • The "Auto Status Back" function is automatically processed inside the OPOS or POS for.NET service object and is not visible to the application.

    For "It is firing when I open the printer cover, power on/off.", It is possible that PowerState Online/Offline is notified instead of Open/Close of the CashDrawer.
    Please check the value of the status property of StatusUpdateEventArgs.

    For "But not firing when the cashdrawer is open/close.", The open state sensor of the CashDrawer may not exist, is not connected, or may be broken. Or the setting by Setup POS (Which is Open state, LOW or HIGH?) May be different.

    Are the CashDrawer and connection cable EPSON's? If it is from another manufacturer, is it listed in information such as EPSON's confirmed operation list? Please check it.


    By the way, OPOS and ESC-POS-.NET are separate and independent, and there will be little information that can be complemented by arranging them side by side.


    You can find the connector wiring diagram on page 68 of the document that you can download from this page.
    TM-T82 (Singapore & India Model) Technical Reference Guide
    Is it supported and connected?

    Or, since the previous page describes the buzzer unit that connects to the drawer kick connector, it may be set to the mode to connect this unit.
    Please refer to the setting description starting on page 54 to check.