Oops sorry I though I alread replied to this...
I am trying to understand your code a bit better.
// adjust xy to be zero at neutral home position
x = -x + L - S;
y += R3;
I can see why we would need this the first time through, but doesnt forcing the X/Y variables every cycle mess up the actual position?
I'm not sure I understand the question, but when parameters are passed into a function, they are a copy of the caller's values, so they can be changed and not have any effect on the values outside the function. In C if you want to change a variable outside of a function then the address of that variable must be passed to the function. Then the function can modify the variable indirectly.
// find angles for each motor
This line is right underneath. What is this line of code doing?
This would perform any Geometric Correction as described here
. You might find that useful. If the motor positions, link arm lengths, joint angles, etc etc are not mechanically perfect there may be some distortion/imperfection in the XY positions. A calibration using a table of measured positions could be used to correct this. Unfortunately this would need to be implemented in the reverse kinematics also which is somewhat complicated and not currently handled by your code. The normal method of doing the reverse kinematics numerically handles this automatically. I'm guessing the required accuracy of a paint sprayer is not extremely high so probably wont be needed. If a Geometric Correction table file is not specified the function does nothing.
As far as installing this software on multiple computers, I do the normal install with drivers, and then just replace folder with my library instead of the one that installs with KMotionCNC?
You should only need to copy the \KMotion\Release\GCodeInterpreter.dll file to the other computer as it contains the kinematics changes. You might also copy the \KMotion\Data directory to get all the same settings and the Kinematics.txt file that turns on your Kinematics
Waiting for Video