PLC Time Clock

Leigh.edler

Member
Join Date
Apr 2014
Location
Arlington, WA
Posts
21
Hey all.

I'm using an allen bradley 1769-L35E. I'm supposed to be programming a time clock for people to clock in and out. Eventually this system will allow certain people access to certain doors and what not. I'm new to PLC programming and havent done much at all. I'm just trying to figure out how to get each card to correlate with each person in the plant, and also how to go about setting up the time card aspect of it. Forgive me for being such a noob. Thanks in advance for any advice.
 
Each card has a unique ID, parse ID, lookup ID in database and crossref door access permissions. Return valid/invalid signal(fail closed probably)?

Is this a class project? Because if not, I'd recommend COTS hardware/software to make this a lot easier.
 
Ok, Well I'd use a SQL database to store the card IDs, users, permission levels(ie which doors), and audit log(what cards, when, where, success/failure)
You'll want a simple front end application to add/remove users/cards eventually, but you can do without in the short term.
If the card reader will be hooked to the PLC, You'll want a SCADA type application to 'read' the card id/door id on a trigger. Then the SCADA would do a lookup against that combo to verify access, write an audit log, and send a return signal to the PLC.
 
I agree that there are definitely off-the-shelf solutions for access control and timekeeping, but if you're using a logic controller, so be it.

How does a person "clock in" ? Do they have a NFC card or other identity device, or do they type a username and password into some kind of computer ?

How will the person identify themselves to the secured door ? Do they use the same card or device as when they clock in ?

I would approach this with a set of very simple single-dimensional arrays.

The first array includes identifiers for the smart cards.
The second array includes employee names or employee numbers.
The third array includes a code that identifies which doors each employee can access. If there are fewer than 32 doors, you could just use a DINT value with one bit per door.

You'll need two more 2-dimensional arrays to hold the Clock-In Time and the Clock-Out Time for the shift.

Read up on the WallClockTime in the instruction set reference under the GSV/SSV instructions. Consider how you're going to keep the clock accurate (I use the Logix 5000 Clock Update Tool) and how you're going to handle Daylight Saving Time.

Edit: I'm focusing on inside-the-PLC storage. I agree that an external SQL database is far better suited to the task, especially for logging and auditing.
 
Last edited:
Each employee will have and Allen bradley RFID card. The plan is that this card will be used to clock in/ out and that this same card will also be used to give certain people access to certain doors
 
Maybe it's a test.

Just see to see if you would tell the boss this is a dumb idea and there are better system already out there for less $.

-just a thought.
 
There's nothing wrong with the 56RF family RFID products, and they do have a 128 byte "Smart Card" tag, among the various types of tags they offer. They're just meant for product tracking in factories, rather than people tracking and access control.

Since you're new to "PLCs" in general, I'd say start with the example code for the 56RF EtherNet/IP-connected Interface Block. Get a transceiver head and a tag, and start experimenting to be sure you can receive data.
 
I told the boss that there are better ways to do it. And he said he wanted it done this way. At this point I have the RFID demo from allen bradley. I'm just having a hard time figuring everything else out.
 
Okay, what exactly do you have ?

It's a special pet peeve of mine when a salesman drops off a demo and just says "here you go !". RA and North Coast Electric have some pretty good technical people in the area, and while I don't think any are experts in RFID, all of them can work through ControlLogix and EtherNet/IP stuff, especially if the demo has some examples from Automation Fair.
 
We got this one from North Coast. I just walked into my office one day and it was there. But I just got a little bit of help from my boss and we figured a couple things out. One thing that I need to know though is, can you store a DINT on the Allen Bradley Smart Cards?
 
The smallest data capacity I saw for Smart Cards was 128 bytes, so you should be able to get 32 DINTs on there.

I think the unique identifier of the card comes through, too, as well as the stored data.
 
One important thing w/ the cards, Don't store any permissions on the card itself. You want all permissions to come from the PLC.
That way if a card is lost, all you do is turn off access for that ID.
 

Similar Topics

At the moment on my application (S7-1212C), the PLC/HMI are showing the correct time, i.e. the displayed time matches the time of the clock on the...
Replies
10
Views
909
The PLC in question is a S7-1212C. The PLC will be transportable on a wheeled trolley and used wherever it's needed in the factory. I've been...
Replies
14
Views
1,325
Hi, I'm using CX Programmer and just seeing what the best way to trigger an output from the plc clock time would be. I need this to come on at 9am...
Replies
4
Views
1,730
Hello I have a AB Compact logic 1769-L32E controller. I'm wanting to reset a counter at the end of each month. Since the months have different...
Replies
34
Views
9,457
Hi all, I'm running into an issue with a Modicon M340 PLC Clock and daylight savings time. I found an old thread that wrote out specific code...
Replies
3
Views
1,862
Back
Top Bottom