Home > Forum > Discussions on general problems > Reading RFID TAGs with 1Wire connection
- This topic has 8 replies, 1 participant and was last updated 3 years, 11 months ago da Sergio Bertana.
-
AuthorPost
-
May 15, 2019 at 8: 56 am #47439AuthorlessIdle
Where can I find an example of reading through your RFID reader 1W-H3-05 M12 combined with CPU SlimLine, indicatively in the documentation I found the references to the library eLLab1WireLib_D100.
From what I understand, the FB OWRdTemperature reads the temperatures even from multiple sensors on the same BUS. While the OWRdIdentifier function only reads from a device connected to the BUS.
How can I read from four RFID readers mounted on the same BUS? I hope it is feasible.
May 15, 2019 at 9: 05 am #47443Sergio BertanaAdministrator ForumAll 1Wire device management is provided in the eLLab1WireLib_D100 library, for the various objects functions and function blocks on IEC61131-3 Programming Manual an example is shown, if you see on the example referring to the sOWRdIdentifier FB the reference (PTP120A600, FBD_OWRdIdentifier), this means you can import the program FBD_OWRdIdentifier from the demonstration PTP120A600.
In this article you can find information on how to use the libraries, and in the same way that you import the objects from the library you can import demonstration programs.
The 1Wire bus allows you to manage multiple devices all connected in parallel on the bus, this because each device has its own unique identifier that distinguishes it from the others. In the acquisition of TAGs both in contact and RFID, one acquires this identifier, therefore one uses the command 1Wire read ROM identifier that reads in broadcast, then si può avere 1 solo dispositivo connesso al bus.
If you use a MPS054 module as it has two RS1 ports as well as the 232Wire port, you can use two adaptor 1 1-Wire to RS232 to have the possibility to acquire 3 RFID readers in total. If you use a R3 RFID reader, you can connect it to the two digital inputs and so you can have an additional reader (article).
May 18, 2020 at 9: 15 am #55255JohnParticipantI am testing an identification system with 1Wire devices and I use the demonstration indicated, however I cannot find the PTP120A600, I have only found a PTP120A400, which contains the program FBD_OWRdIdentifier, with some differences though ...
the FB_OWireCore used in the manual example is different, FB_OWireCore_v1 and has an input pin DTCheck that the version FB_OWireCore she has not.
In the bookshop eLLab1WireLib_D100 I find the version of the FB present in the demonstration, not the one present in the manual, that is the FB_OWireCore
The tag reading is successful, only the pin Ok of FB_OWRdIdentifier after reading it activates for a loop several times, and not just once with the tag present, as I would expect ...
May 18, 2020 at 1: 48 pm #55266JohnParticipantI continued the tests and found that using the 1W port of the PLC the program works, even with the problem on the Ok bit, while using the converter 1-Wire to RS232 DS9097U connected to the door COM0 it doesn't work… if I test the OwBOk output it stays at 0 as if there were no 1W devices connected.
May 18, 2020 at 2: 03 pm #55277Sergio BertanaAdministrator ForumI recompiled the library now it is possible to download the new version of the ePLC1WireLib library (Sfr059e000) from the site with the new demonstration program Ptp120b000.
About the exit Ok of the FB OWRdIdentifier, if you use the example program shown in this article, it is normal for it to continue to activate. In fact, if you see the Done output, it removes the Enable and then resets the FB which then with Done FALSE restarts for a new reading of the TAG. So it is a continuous execution, with each execution that is positive (Ok to TRUE) or negative (Ok to FALSE) another acquisition is performed.
You will be on the Ok a TRUE to block the reading, or to continue it to notice when the TAG is removed from the reader.
May 19, 2020 at 3: 31 pm #55301JohnParticipantHowever I can't get the converter to work 1-Wire to RS232 DS9097U connected to the COM0 port. It seems to me that the only change with respect to the use of the 1W port of the CPU is to put COM0 in place of PCOM255.0… or not?
May 19, 2020 at 3: 32 pm #55303JohnParticipantI solved it by finding that the pinout of the DB9 connector of the 1-Wire to RS232 DS9097U it is indicated with the RXD and the TXD in reverse, so I attached the TXD of the DB9 to the TXD of the RJ45 SlimLine and the RXD of the DB9 to the RXD of the RJ45 SlimLine and so it works….
May 20, 2020 at 5: 05 pm #55356JohnParticipantOne more thing ... in the demonstration program Ptp120b000 the FBD_OWRdIdentifier is in the Boot task instead of in Back ... and it doesn't work ... putting it in Back it works regularly.
May 20, 2020 at 5: 13 pm #55363Sergio BertanaAdministrator ForumIn the example programs there are examples of all the FBs in the library, therefore there are several POUs that all use perhaps the same communication port and which cannot coexist in execution.
To better hide the demonstration program, we use it to verify that no errors are generated in the compilation of the library, therefore all the objects in the library must be instantiated. Since FBs access the same system resources I put in the task of Boot all programs and then moved from time to time into tasks Back the program I want to test.
Summarizing the purpose of the demonstration is to have all the useful programs inside to verify the functioning of the library objects, but IT MUST NOT BE USED as well as, MUST BE USED just to copy the various objects into your program.
-
AuthorPost
- You must be logged in to reply to this topic.