Quote:Model: D41SRB SKU: D41SRB Electronic Cash Drawer Black 16", Roller, 24V Epson STD RJ11, Stainless front 5 Bill/5 Coin 1mm steel case Two extra brackets inside top of case for added durability
Quote:EPSON TM-T88V Receipt
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO.Ports; namespace cashdrawertest { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private SerialPort serialPort1 = new SerialPort(); public void OpenPort() { //serialPort1.PortName = "COM1"; serialPort1.PortName = "ESDPRT001"; serialPort1.Encoding = Encoding.ASCII; serialPort1.BaudRate = 38400; serialPort1.Parity = System.IO.Ports.Parity.None; serialPort1.DataBits = 8; serialPort1.StopBits = System.IO.Ports.StopBits.One; serialPort1.DtrEnable = true; try { serialPort1.Open(); } catch (Exception ex) { serialPort1.Close(); serialPort1.Open(); } // serialPort1.Open(); } public void InitializePrinter() { serialPort1.Write(Char.ConvertFromUtf32(27) + char.ConvertFromUtf32(64)); } public void OpenDrawer() { serialPort1.Write(char.ConvertFromUtf32(27) + char.ConvertFromUtf32(112) + char.ConvertFromUtf32(0) + char.ConvertFromUtf32(5) + char.ConvertFromUtf32(5)); } private void button1_Click(object sender, EventArgs e) { OpenDrawer(); } private void Form1_Load(object sender, EventArgs e) { serialPort1.PortName = "COM1"; //serialPort1.PortName = "ESDPRT001"; serialPort1.Encoding = Encoding.ASCII; serialPort1.BaudRate = 38400; serialPort1.Parity = System.IO.Ports.Parity.None; serialPort1.DataBits = 8; serialPort1.StopBits = System.IO.Ports.StopBits.One; serialPort1.DtrEnable = true; try { serialPort1.Open(); } catch (Exception ex) { serialPort1.Close(); serialPort1.Open(); } } } }
OpenDrawer
Load
OpenPort
InitializePrinter
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)