Pokeys 57Cnc will do everything you need. Comes with 8 axis and 4 Analog 0-10V for controlling Spindle speed. Got lots of I/O that can be programmed to work in pretty much any way you need.

USB and Ethernet connection.

https://www.poscope.com/product/pokeys57cnc/

To help with G-code will need more information to what your trying to achieve exactly. If you don't want to post this publicly then feel free to contact me via PM and anything told to me will stay strictly between us.