So after sitting here for days playing with this .
Ive learned allot.
This system works 100% as is.
To get pin 10 analog input off lets say A0 . Your port address (1024) would be a variable as described in the manual. Modbus address would be 30. That refers to pin 10 . If you wanted a different pin ,looking the register map on PG16 45 would be input analog pin a15 and so on .
When configured in Mach 3 the cfg must match what line being used . Input for an input there's no corresponding bit to match. If you had of chosen bit 1 it would have flash high low high low so on .
The first example given in the manual was spindle flash. If you want to change pins on your ardunio. You would choose the proper register where the pin was in the port adress section 0 (0-15) , 1 (16-31) ,2 (32-45), 3 (46-63)or 4 (A0-A15) NOW THESE ARE DIGITAL I/O only. Under Modbus address choose your pin. So if I wanted pin 33 that was digital I would choose register two in port address and pin 33 under modbuss address .
All this has to correspond with the sketch uploaded to your arduino. make sure you turn your inputs on and off as described in the manual.
I use the Arduino Mega and noticed a few things that had to be changed in the sketch. There what level of importance is im unsure of. The first set of input output registries says 01233 , it should say 01234. Pin total says 14 for a uno mine should say 63. Match your Baud to your pc to mach . Besides that your good to go.
Ive looked over a few Modbus sketches and really like this one.