Category: HAL
Thanks for your reply!
I went through the topic you referred to and it seems quite suitable for my needs. In essence, this is very similar to what the other commentator has suggested. But as compared to MPG these external offsets can actually rely on coordinated motion planners when modifying g-code controlled motion.
Now answering your question, this stream of coordinates is the only source of movement commands for the rotating platform. Hence, I can implement it the way the original author of the topic you referred to has done (i.e. 'M66' + 'G1' g-code commands in loop) or just issuing python/c++ MDI commands in a loop. In my understanding the algorithm might look like this:
1. Run G1 command in loop. Target point is the last available position received
2. If new data comes and the motion is still ongoing (e.g. check 'motion.motion-type') -> compensate the target position with 'eoffset-counts'
3. If new data comes and the motion has stopped -> signal to M66 input
4. If new data comes and the target position has not changed -> do nothing
The only thing I am not sure about is what would be my final position with offsets enabled. Say I finish one G1 command with the offset, and for the next one in the loop the same offset will still apply, right? So I have to set it manually to zero (e.g. with 'eoffset-clear'). Please let me know if you think it makes sense what I have written and whether you have any additional comments/suggestions. Thanks!