3

I have a cash register of a Chinese manufacturer and I want to open its cash drawer using Delphi code.

The register and the drawer are connected by an RJ12 (6 pins) cable.

I've seen elsewhere mentioned "cash registers and POS system sends a 12V or 24V signal to the cash drawer to activate the solenoid to open the cash drawer." sorry the web site of the manufacturer is here.

How can this be done in Delphi?

stukelly
  • 4,257
  • 3
  • 37
  • 44
  • 2
    Please specify the model of your register. POS is a standard and every manufacturer also deliver some software to work with their product. They usually have a SDK to work with. – Arnaud Bouchez Nov 17 '11 at 19:05
  • You need to send a command to the driver that is done usually by DeviceIoControl .if you have an application that does that written in another language use an api monitor utility to see what apis it calls. – opc0de Nov 17 '11 at 20:44
  • RJ12 is just the mechanical connector. The web site you linked only says it has a serial port. So now you need to figure out the location of at least, the RX (receive), TX (transmit), and ground pins, and possibly of the RTS/CTS (flow control) pins. Until you know the pin-out or have a working RJ12 to DB9 serial cable, and some information about the serial protocol, given to you by the manufacturer, you won't be able to write any code. I know how OMRON cash registers work, and I know that most manufacturers have a programming manual. You need to get that first. – Warren P Nov 18 '11 at 02:50
  • You can order the parts here and then you just need the manual to figure out what wire to poke into what hole: http://canada.newark.com/newport-electronics/db9-rj12/computer-cable-serial-7ft/dp/48F5067 -- There are about 84 possible ways it could be wired up, so contact the manufacturer for the pinout. – Warren P Nov 18 '11 at 02:52

1 Answers1

0

If you need just a 12V signal with low amperage, you can use a V24 RS232 classical serial line. The common voltage is +12V (ON) and for it you may use a control signal like DTR.

You have a lot of serial port libraries for Delphi.

Community
  • 1
  • 1
philnext
  • 3,242
  • 5
  • 39
  • 62
  • He can't write any software until he knows the protocol, and he has a working serial cable. He has neither one. – Warren P Nov 18 '11 at 02:53
  • @WarrenP The question is not clear and we can understand it as "I need to use DIRECTLY the RJ12 cable to put +12 V signal to open the cash drawer". – philnext Nov 18 '11 at 08:48
  • Oh. So you're assuming that you simply need to do a DTR output at +12V, to trigger the cash drawer. Yes some of them do work like that. However he has no idea which pin is the DTR pin. I guess rather than 1 :84, his chances are about 1:40 of finding the DTR and Ground pins and wiring them correctly by random attempts. Wiring a solenoid directly to a serial port will result in frying the serial port, and possibly the whole computer. This person needs to know a bit more about electronics before they get anywhere good. – Warren P Nov 18 '11 at 17:19