Communication between PLC and Arduino using IO-Link
Perhaps this can be usefule to you
https://github.com/unref-ptr/hardcoded-iolink
Disclaimer: I am the author of the repo.
Its a hardcoded IO-Link device stack but can be used as a starting point.