i have got the following issues. I want to Read/Write on a Rfid-Tag and lock this block afterwards.
I have the following hardware:
- AL1330, IFM Io-link Master https://www.ifm.com/mounting/80284123DE.pdf
- DTI513, IFM IO-Link Rfid-REader/Writer https://www.ifm.com/mounting/11458695DE.pdf
- Beckhoff, PLC CX5230
- Rfid-Tag, ICode Slix, https://www.nxp.com/docs/en/data-sheet/SL2S2002_SL2S2102.pdf
I can read the Uid, can write and Read Data Bytes on the RFID. I fail to lock the Block afterwards. I tried various ways with CoE Communication.
I divide the Problem into 3 steps:
Step 1:
Craft the CMD responsible for the Lock on the Tag.
- This leads me for example to this Command
Step2 : Calculating the CRC -For the CRC in the Norm there is one Example (CRC Iso/IEC 13239)
- 0x22 0x20 0x01 0x23 0x45 0x67 0x89 0xab 0x04 0xe0 0x0b this command shall lead to CRC BAE3. My Oscat Lib Block Basic.CRC_Gen with this Parameter returns this value
Same as http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
With more testing, the crc calucaltions differ, and i do not know why and how, and which one is correct.
Edit: - More testing and i recognized, the Oscat Library FB Basic.CRC_Gen fills any Input, shorter than 4 bytes, with 0x00. - there should be the workaround, to use addressed commands with the optional Uid.
Step3:
- Writing the Command with the appended CRC to Tag via CoE - i use the Beckhoff FBs to access CoE
- I can acces the different IDs with Subids and get Results, so this works
- i found the IO-Acyclic Command, which i think is the right one, to issue commands to the tag
- the docu in the AL1330 shows this
I tried a lot of different stuff, but cannot make it happen. Problem is, i am not sure, if the CMD is correct or not, the CRC is wrong or how to make the Acyclic Command to work.
I tried for days and found no solution. So i would be very glad for tips and hints in the right direction.
Thanks
I hope i do not violate any rules