PDA

View Full Version : Slave Databuffer - RS-485 network



DynamoBen
- 1st June 2005, 14:55
I have a door entry device that reads magnetic cards and then allows access based on card number. Currently there is an onboard EEProm database with valid card numbers programmed into it. In addition this device can connect to an RS-485 network an communicate back to a central computer. I've opted to go the master and slave route to simplify communications. However, I'm hung up on how to solve one problem.

When a card is swiped, I want to report that card number back to the central computer via the network. Since I'm polling each slave I'm afraid that I may "miss" a swipe from time to time. (if another swipe occurs prior to when I poll the slave) Should I be storing these swipes into a buffer variable and then send them when the master polls? How big should the buffer be, should I store multiple swipes in this buffer?

Or am I being paranoid, store just one and be done with it?
Thoughts?

Melanie
- 1st June 2005, 15:03
Just store ONE swipe.

If the punter swipes again prior to the buffer being read (which at worst should only be a couple of seconds away anyway), then the latest swipe simply replaces the previous one.

Card readers usually have a status LED. Use this to differentiate between a 'WAIT - your swipe is being processed' or a 'FAILED/REJECTED swipe'.

DynamoBen
- 1st June 2005, 15:13
I had kind of hoped that would be the response. Thank you...will do!

BTW the combination of your magcard code and the $1 magreaders are working out well. (www.allelectronics.com)

Melanie
- 1st June 2005, 18:29
Second-hand or not, $1 for a reader isn't bad going.

You know that code reads the Credit-Card info from the mag-strip?... So your Door Access automatically debits their card? Great idea! Gotta nail one to the Men's room door for a giggle...

I was going to start a competition for a bottle of Champage... can anybody swipe a Card thru a reader so fast that my code couldn't catch it... but I drunk it instead...

DynamoBen
- 1st June 2005, 18:36
The $1 unit is used however they do have a new $5 unit.

I have been able to swipe to quickly but hey who is counting ;)