I have a two axis (z and x) servo motor setup for end effector movement. There is a third rotation axis that will sit at 45 degrees for simplicity. I need to have two significant movements from this new prime z axis, that would seeminglly provide a velocity based movement on z’ and a positional base movement on x’.
I have the dilemma that as we move both axis, I want the z’ axis to be a PID relation to a voltage reading we receive from the end effector. The x’ movement will be a positional movement with a seemingly constant velocity. How may I achieve this new movement control using the MC_ function blocks within Twincat?
I have the idea to poll these calls at a rate dependent on their velocities and make both cases velocity based function blocks while toggling the MC_ axis (two for each true Z and X axis) and simply watch the position on the Positional movement with a constant velocity, while making the z’ movements using the PID.
Am I on the proper train of thought, is there a motion package that will simplify this idea, or am I wasting my time?
If I do go the polling route my PID value will constantly be changing, so the polling rate of the axis movement will also seemingly be indetermined until my value is measured. I will be rapidly raising and lowering the velocities based of fractions of the velocities given to both movements.
I have not yet tried this theory as there may be a more simple answer.