Hello,
I designed a whole PLC with all sort of clients.
I cam build the board with accordance to modbus protocol and apply communication with any modbus master (or for that case any protocol that you choose)
The PLC designed by me has rich peripheral that includes: all sort of discrete I/O's , ADC, DAC, 4-20mA , communication etc...
If you want an example, please let me know.
Best regards,
Amir