I am working hard at creating a requirements document for the robot's control software. This will help me organize my code and stay focused on the goals. There are a lot of "neat features" that are not critical to the function of the robot but will be fun to try to invent.
Likely the most challenging will be a routine which continuously calculates the robot's workspace based on the tool offsets and orientation, then looks at the robot's position and velocity to determine if the robot is going to exceed the working space or crash into an avoidance zone that has been defined. If this is true, then it will activate a maximum rate stop to keep the robot from entering a singularity or otherwise crashing into an object I wish to avoid.
I am also designing the motion control architecture which will allow me to accomplish my goals. Here is the one I have designed for the V33 software:
There are 3 coordinate systems (blue), 4 real motors/servo drives (grey), 4 analog servo cards (red), and 10 virtual axes (green). These are linked with background motion instructions (purple) and commanded motion instructions (orange).
Without going too deep into how this works, The red analog cards send commands to the grey servo drives - simple. The 4 red analog axes are grouped into a robot coordinate system (blue). This is linked through the Motion Coordinated Transform with Orientation (MCTO) to the cartesian coordinate system (blue) with six virtual (non motor controlling) axes. 3 axes are for the cardinal directions X, Y, Z, and the other 3 control rotation about those cardinal axes. My robot does not support rotation about X or Y so those are essentially unused. The command Motion Coordinated Path Move (MCPM) controls this coordinate system and supports linear motion with coordinated orientation control (change tool rotation while moving).
In order to support circular motion, a 3rd coordinate system (Command CS) is added with 3 cardinal virtual axes (green). These link to the Cartesian coordinate system cardinal axes through 1:1 electronic gearing (Motion Axis Gear - MAG). The non-orientation controlling coordinated instructions Motion Coordinated Linear Move (MCLM) and Motion Coordinated Circular Move (MCCM) can now be used. All of this is linked to a master speed reference virtual axis using Master Driven Coordinated Control (MDCC) and Master Driven Axis Control (MDAC). This is the most complicated part but it allows me to turn one knob and adjust the overall speed of the robot. This can accomplish speed override and feed hold very easily. The master speed is set by the Motion Axis Jog (MAJ) command against the Master Axis.
Orientation of the tool can be controlled in coordination with a linear move using the MCPM instruction or independently using a Motion Axis Move (MAM) instruction while another instruction is running. I can issue commands only from the orange blocks.
This is probably the most complicated motion structure I have ever worked with and will be the first thing I actually program.
Once I get the requirements specification a little more polished, I will share it with everyone.