Motion Control Systems have a Motion Control Trajectory Generator as part of the system. In your example, you're wanting to mimic a control feature that the control is not optioned with. The approach of most using User Macro to mimic, say a helical path, or conical path would be to do so using short linear segments. The smaller these segments, the smoother and closer to the required shape will be the result. However, for each linear move, there will be a trajectory generated with a start and end and the associated Acceleration/ Deceleration incurred with each move. Smarts in the control can smooth this out to an extent, but there are no free lunches. The Trajectory Generator can't be accessed by the User Macro application. All that can be done with it is to calculate a point to go to, then the Control Makes it happen via the Motion Control System, which includes the Trajectory Generator.
In a test I did some years ago, with AI turned off I programmed:
1. a 1000mm move at 1000mm/minute Feed Rate. As expected, it took one minute to complete.
2. a 1000mm move at 1000mm/minute Feed Rate made up of 10,000 x 0.1mm linear, incremental moves. As expected, this took many minutes to complete the same actual distance.
With AI turned on, the above two tests were repeated and again as I expected, both tests took one minute to complete. In addition to the above two tests carried out with AI turned on, I carried out the following test.
3. a 1000mm move at 1000mm/minute Feed Rate made up of 10,000 x 0.1mm linear, incremental moves, dithering alternatively in the plus and minus direction. As expected, this took many minutes to complete the same actual distance. The reason why is that was a maximum change in direction for each move and therefore, there was no opportunity for the Acceleration/Deceleration to be optimized for each move. Like the piston in an internal combustion engine, the axis must come to a complete stop when the direction is changed.
If the control you're using to run the Macro Program on has AI or other profound Look Ahead function, it can be used in conjunction with the moves calculated by the Macro Program to enhance the overall motion performance. Mostly the next move is calculated Just In Time andi expected therefore, there will also be overhead caused by the calculations being carried out by the Macro Program.
Regards,
Bill