For the introduction of Modbus and DNP3 protocols, please refer to:
https://scadahacker.com/library/Documents/ICS_Protocols/Triangle%20Microworks%20-%20Modbus-DNP3%20Comparison.pdf
There are some open source projects or software/tools. Here are some for your reference.
For Modbus,
For the Modbus Master/Slave simulators:
For DNP3,