RFID card reader to PLC ControlLogix

Join Date
Feb 2020
Location
Quebec
Posts
3
Hi,
i'm actually using a rfid card reader to send cards number to the plc, we have two differents type of cards: one with 6 digits (24 bits) and the other with 8 digits (32 bits) in exadecimal. to be able to get the right number displayed on each card in PLC. i have to specify to the PLC to take only 16 bits from the first one and put 0 for the 8 bits left from 24 bits. for the second one i have to tell the PLC to take 20 bits from 32 bits and put 0 for 12 bits.
so, once i scan the card, i want the plc to make a test weither the card contain 24 bits or 32 bits and proceed
Exemple:
first card is C8659D and number diplayed on the card is 26013 so i need only 659D to get the right number
Second card is 7FD21C38 and the number displayed on the card is 138296 which only 21C38.

i wanna know if somebody has done something similar to this. and which instruction d i have to use.

Any help would be much appreciated
 
Last edited:
Welcome to the forum!

Please list the PLC hardware, and specific brand and model number of RFID reader...

How far have you got? Is the PLC communicating to the RFID and you just don't know how to code to interpret the result?
 
Hi,
i'm actually using a rfid card reader to send cards number to the plc, we have two differents type of cards: one with 6 digits (24 bits) and the other with 8 digits (32 bits) in exadecimal. to be able to get the right number displayed on each card in PLC. i have to specify to the PLC to take only 16 bits from the first one and put 0 for the 8 bits left from 24 bits. for the second one i have to tell the PLC to take 20 bits from 32 bits and put 0 for 12 bits.
so, once i scan the card, i want the plc to make a test weither the card contain 24 bits or 32 bits and proceed
Exemple:
first card is C8659D and number diplayed on the card is 26013 so i need only 659D to get the right number
Second card is 7FD21C38 and the number displayed on the card is 138296 which only 21C38.

i wanna know if somebody has done something similar to this. and which instruction d i have to use.

Any help would be much appreciated

I think your first example is 16 bit and the second example is 20 bit?

I'm taking a guess here, making a couple of assumptions:
- you read your RFID card into an array tag. I'll use RFRead, that is 8 SINTs
- The order is RFRead[7] = 7 in your second example
- you clear the tag after you process it so that it is all 0's
- you don't have leading 0's on your cards

A suggestion for your condition is that RFRead[7] and RFRead[6] are 0 for 32 bit, and they are not 0 for 40 bit

NEQ RFRead[7] 0 NEQ RFRead[6] 0

Copying the SINTs into a 32 bit INT requires mixing up the low and high bytes, I can't remember how to do that properly off the top of my head. You would use the COP instruction to move the data into a DINT tag and the SWAP instruction to change the order of the bytes. You can SWAP bytes within a 16 bit INT and INTs within a 32 bit DINT - they are separate instructions.

Is this the sort of thing you are looking to do?
 
Hi, thanks for the answer,
the card reader sends informations throught 38 bytes of SINTs and it uses only the 34, 35,36.37 registers to send data of the cards that's how it's set up, i'm using 4 BTD instruction to gather all thoses registers (4 SINTs registers)in a tag named CARD NUMBER which is DINT.
so if i take the first example: C8659D which is 24 bits, i would need only 16 bits to get my card number which is 26013.
second example: 7FD21C38 is 32 bits, in that case i would need 20 bits to get the number printed on the card.
so i want to know if there is a way to the PLC to pick only 16 bits in the case of scaning 24 bits card and omit the 8 bits left
SECOND: pick up only 20 bits from 32 bits when scaning 32 bits card number

thanks for the help
 
Welcome to the forum!

Please list the PLC hardware, and specific brand and model number of RFID reader...

How far have you got? Is the PLC communicating to the RFID and you just don't know how to code to interpret the result?
Hi the_msp

the PLC hardware is a ControlLogix and the RFID is PcProx plus, model RDR-805W1AKB-P
the reader is communicating with the PLC over Ethernet, please read what i've posted before about what i want to do in the PLC

thanks
 

Similar Topics

We have a PLC system running a conveyor. The PLC system includes Turck BL20-GW with RFID-2 card. I am about to add a DI card to the BL20-GW...
Replies
4
Views
4,494
We have a product we are now building and are planning on using RFID tags to ID trays of product as they move through the process (5 individual...
Replies
6
Views
1,415
Hi. I was wondering if any of you guys have a problem with the RFID reader/write BIS M-4A7-082-401-07-S4 from Balluff. The problem we are...
Replies
0
Views
649
Good afternoon! For the past several days, I have been trying to set up this Balluff BIS018A RFID head to communicate with a Do-more BRX DM1E-M-D...
Replies
10
Views
5,550
Good Afternoon, I am currently designing an HMI application that needs a screen that shows about 20 of the latest RFID [stored in PLC] and have a...
Replies
3
Views
2,712
Back
Top Bottom