Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 20th, 2012, 07:54 AM
rush1169 rush1169 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 2 rush1169 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 35 m 14 sec
Reputation Power: 0
3rd Party Hardware Communication With COM Port - Help Needed

I have a Dollar Bill Acceptor (DBA) that I need to "talk" to through Delphi and could use some help. A DBA is a device like you'd find on a coin changer, slot machine, or vending machine. You insert a $1, $5, $20, etc and the device validates the note and pulses credits to the listening hardware.

The DBA has a 9-pin connector. Pin 7 and 8 are 'Credit Relay' lines (7 is normally open and 8 is common). I've attached these two pins to a USB terminal block that acts as a keyboard such that when a dollar bill is inserted, Delphi 'sees' the '5' key pressed 4 times (4 pulses = 4 x 25 cents = $1). This part works perfectly.

The problem is that I need to turn off the DBA until the user of the software has 'logged on'. The money inserted will be 'deposited' into a specific user's account so it creates a problem if someone inserts $1 but doesn't have an account on the system as there is no way to spit the note back out on a failed logon.

The other pins on the DBA's 9-pin connector are: INHIBIT+, INHIBIT-, 120VAC, and Ground. 3 pins are not used. According to the DBA manufacturer, I need to use INHIBIT+ and INHIBIT- to turn note acceptance on and off. When a user successfully logs on, the DBA needs to accept notes. When a user logs off, the DBA needs to reject (inhibit) notes.

My thought is I need to "talk" to the DBA through the computer serial port. Assuming the COM port is a suitable solution, I have two questions: How do I use Delphi to send data/signal/whatever through the COM port to the DBA and what pins on the COM port are the right ones to use?

The COM port has 9-pins: Carrier Detect (CD - Incoming Signal), Receive Data (RXD - Incoming Signal), Transmit Data (TXD - Outgoing Signal), Data Terminal Ready (DTR - Outgoing Signal), System Ground (GND - Neutral Signal), Data Set Ready (DSR - Incoming Signal), Request to Send (RTS - Outgoing Signal), Clear to Send (CTS - Incoming Signal), and Ring Indicator (RI - Incoming Signal).

So, somehow I need Delphi to 'send' some kind of data/signal to either the INHIBIT+ or INHIBIT- pins on the DBA. I have the wiring harness needed to connect between the DBA connector and the COM port connector, I'm just not sure which pins to use on the COM port nor do I know exactly how and what data/signal to send from Delphi. Can anyone help me with this problem?

Thank you,
Dan

Additional Information: The DBA manual seems to indicate that I need to 'send' +5VDC to the INHIBIT- pin of the DBA.

Reply With Quote
  #2  
Old May 1st, 2012, 09:49 PM
Luthfi Luthfi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 140 Luthfi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 58 m 17 sec
Reputation Power: 2
If INHIBIT+ and INHIBIT- are separate pins, then looks like you can use RTS and DTR for each of them and manipulate them accordingly. If they are actually a same pin, looks like RTS is the better choice.

For serial port communication, in Delphi there is TComport library. Search sourceforge.net for the source code.

But your biggest problem is that RS232 (serial) uses voltage in the range of -12 to +12V. You have to address this in your wiring.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > 3rd Party Hardware Communication With COM Port - Help Needed

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap