I don't know if the modbus coms are going to be as fast as you like

They are slow!!!!!
if I was to do this project I think I would make a script that looked like this :
'M25 Cycle Punch
ActivateSignal(OUTPUT3) '//tun on output 3 to cycle the punch
Code"G4 P.2" '//Keep the output on for .2 sec
DeActivateSignal( OUTPUT3 ) '//Turn the output off
While(GetModoutput(2)) '//see if the up has been hit
Code"G4 P.5" '//if the up has not been hit dwell for .5 sec
wend
None of this is tested but it will give you a start

Thanks
Brian