New Modbusmq project: Testers needed!

Well finally i figured it out, i'm not a programmer so i'n not sure if this is the right way to do it, but here is my code may it help somebody
in this code
PWM pins 3,5,6,9 are mapped to Holding register 40001-4
Analogue pins 0-5 are mapped as input registers 30001-6
Digital pins 2,4 are mapped as input status 10001-2
Digital pins 7,8,13 are mapped as coil status 00001-2

NB. arduino couldn't handle 2 concurrent tcp connections