Control IO RFID Example

Have you read into the documentation?
I would suggest that you try the whole thing in a static environment. Place a part in front of the reader (so it doesn’t move and you don’t have to deal with timing) force the tags of the reader from the simulation (no PLC involved at this stage)

  1. If you have a box correctly aligned (with the small white RFID tag in the red detection zone of the reader) and you set the “Execute Command” on TRUE (with no other tag changed) you should get a “Status” of 0 and the “Command ID” should increment by 1.
    Congrats, you just successfully detected if a RFID tag is in front of the reader!
  2. Now move the box with your cursor so the RFID tag is out of the detection zone. If you now trigger the “Execute Command” from FALSE to TRUE again you should get a “Status” of 1, which indicates that no tag was found and the “Command ID” increments by 1.
    You just detected an error!
  3. Put the box back in place and change the “Command” integer from 0 to 1 (“Read serial number”).
    Execute the command again and you should now see a number in the “Read Data” tag.
    Congrats, you just read some data from the RFID tag!
  4. Now change the “Command” from 1 to 3 (“Write Data”) and input a number to the “Write Data” tag. Execute the command.
    Don’t panic now, you will see that nothing except the “Command ID” has changed.
    Now change the “Command” to 2 (“Read Data”) and execute the command again.
    You should now see the number you have previously typed into the “Write Data” tag in the “Read Data” tag.
    You have just wrote and read data to and from the Memory of the RFID tag!

If you were paying attention you may have noticed that we haven’t even touched the “Memory Index” tag. You can play around with it and write data to and from different places in the memory of the RFID tag (range for “Memory Index” is 0-127 because you got 128 DWORD of memory). Just repeat step 4 from above with different memory indices and see what results you get.

Feel free to reply to this thread again if you got stuck anywhere.

3 Likes