Not too hard.
Gar has the right idea.
You need some form of numerical processor. You could do analog, but thats last century stuff.
1). Get the X and Y encoder counts/direction/etc into the processor.
2). Calulate H = sqrt (X squared + Y squared)
3). Stitches = H multiplied by a number related to stitch length required.
4). Digital to analog conversion output to control speed of motor proportional to the error from Stiches required minus stiches done.
5). Output to enable motor to be driven.
6). An input pulse for each stitch done.
7). The Cpu enables the motor output until the number of stitches have completed.
Something like that will get it going.
Figure out the easiest way to read the encoders at the maximum speed.
A PC will end up the most expedient, unless you have a microprocessor development system.
A few things to consider.
Is the table is pushed manually, or is it to be driven, like with Mach3
If it is driven, then the maximum speed of movement can be controlled.
If manual, what stops it being fed too fast.
If it was all driven with Mach3 in CNC mode, a whole new strategy is needed.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.