Hi, I have problem here which is wrecking my head! I have a 17c42a as the heart of a control system which controls 2 motors via 2 dacs. The motors are driving a large load via a gearbox. Feedback is by means of a 12 bit absolute position encoder on each load. I have implemented position control where the loads are driven to a desired position and stop. I have also implemented speed control where the requested speeds are compared with the actual speeds every 250mS (in a timer routine) and the Dac outputs are modified to regulate the average speed. The above is done for each motor independently and works very well. The problem I have now is as follows. I need to run the motors not just so that the speed is constant, but also so that the position deviation relative to each other will be minimised. i.e. if both motors are started whth a given position difference between them, then I want that position difference to be mantained. I thought the following would work by controlling both position and speed. 1. Before starting the motors store the positions in position tracking regs. 2. In the timer routine add (or subtract depending on direction) the speeds requested (encoder counts/timer interval) to the position tracking regs for each motor. 3. Subtract the actual position from the position tracking reg to get the position error. This value will be + or -. 4. Either a)Add or subtract a constant from the dac value to reduce the error. or b)Add the error value to the dac value to reduce the error. I have tried this with no success. Does anyone have any better ideas? If you have read this far, thanks Joe P.J. McCauley Tel. 353-1-6082218 Dept. Of Pure and Applied Physics, Fax. 353-1-6711759 Trinity college, Dublin 2, Ireland.