The two examples that I use the most are Modbus TCP and RTU, and an example of the code to use the librar ...
www.mesta-automation.com