No, we don't use the Galil CR command. Mach plans the trajectory for the circle and sends it down via LI or CD commands, depending on what the user has chosen to use in the Galil plugin (Linear Interpolation or Contour mode). Whether it is a straight line with a single axis or a circle with multiple axes, it does not matter. The same thing is happening. The Galil gets the trajectory data from Mach and then the Galil is in charge of following it. No matter what plans the trajectory, it NEVER gets planned more than once. NEVER. I don't know of any machine controller on the planet that does this. Fanuc, Fidia, EMC, etc... Why would they? The trajectory is computed and then it has to be followed. If the machine cannot follow the trajectory and it has to have the trajectory re-planned, that is a bit like having the tail wag the dog. That is one messed up dog!
Here is a sample of what we are sending to the Galil (A lathe in this case). The moves are incremental and it is using Linear Interpolation in this example. Mach plans the LI data points. The BG S command tells the Galil to start executing the trajectory:
LM AC
VT 1.000
VD 30000000
VA 30000000
LI -170,,-57<11206
LI -341,,-114<22470
LI -204,,-68<13438
LI -1,,-1<88
BG S
LE
If the movement is complete and the table is not at the correct position, then the PID parameters need to be looked at. The real-time component in a servo motion system is used to look at the incoming position data and adjust the servo drive command inputs (via the PID filter) to maintain an acceptable following error. The target positions and target velocities have not changed. If the following error is too great, then the PID loop may specify more voltage on the command inputs of the drive. (Stepping on the gas). If it gets too aggressive, then the PID loop may specify less voltage on the command inputs of the drive. (Stepping on the brakes).
The car/driver analogy fits very well. Say you plan your route to get to the hardware store. This route includes a lot of starts and stops and some curves. This route planning is what Mach does. Accel to slew, slew (Speed limit), and decel to stop. Turn right, accel to slew, slew, and decel to stop, etc... You, as the driver of the car, are responsible for following the route. You are the motion controller! If you accell too much, you may get a speeding ticket. Also, if you fail to decel, you make get a ticket for failing to stop. You manage all of this by looking at the speedometer and visual judgements (encoders) and adjusting how much gas or brakes (PID loop) it takes to command the car. This is the real-time component. What happens if you hit the brakes too much and you don't reach the stop sign at the intersection? Do you re-plan your route? No. Because the route has not changed. The road has not gotten any longer and the target stop sign hasn't moved. You just failed to command the car correctly. In this case you need to go back to driving school (update your PID values).
With the Mach/Galil combo, Mach is the HMI, G code interpreter, and trajectory planner. The Galil controls the motion to follow that trajectory. That system will make beautiful parts with high accuracy and repeatability if the machine hardware is up to it. In fact, it puts the original YASNAC controller on my Matsuura mill to shame.
Steve