Is it possible to delay the movement of all axes but one?
-
I want to use a duet 3d board to control the movements of an exhibit with multiple axis. The Object will be projected on from different perspectives using digtal projectors. The projected content matches the moves of the exhibit.
I would like to have a extra "virtual" axis that advances one mm per frame to use this axis as a time code for the projectors. That way the projected images would always match the current position of the axis of the exhibit.
Problem:
All digital Projectors have a image processing delay of about 20 ms (or even more). Therefore I would like to delay all movements on all axes except the "timecode axis". Ist this possible?I looked into the CAN expansion board. In the documentation is a M953 command that allows to shift time. Seems like this command is not (yet?) implemented?
-
@rschrem M953 is not implemented and the delay is designed to tune the performance of the CAN-Fd bus, not necessarily the timing of the motions themselves.
are each of the moves in the exhibit discrete with stops in between or is the motion continuous?
-
@t3p3tony The motions are somewhat continuous , but not all the time and on all axes.
I want to generate for each Frame of the pre-rendered animation one line of g-code from within the application, that is used to generated the projected images (Cinema 4D).
The g-code would be generated so the time code axis would advance by 1 mm for each frame. I build a small Mikrocontroller that counts the pulses of the time code axis (no motor connected there) and generates MIDI time code from these impulses. The MIDI timecode ist then received by a beefy PC that can replay multiple 4k video stream simultaneously to the projectors in sync to the MIDI time code. I tested this and this works very nice, even when the system needs to slow down because of mechanical acceleration limits of the motion system - I just have the issue, that the projectors introduce a delay of about 30 ms. So currently the projections always lag behind the actual moves by an almost constant delay.
Introducing a constant negative delay for the projectors does NOT work. AT best one can achieve a situation where the delay in sometimes to small and sometimes to large, depending on the effects of the (hard to forsee in cinema 4d) acceleration limits of all axes within the duet.
So I would like to sync the video playback to the actual move as they can be made respecting the acceleration and speed limits as defined in the duet 3d system.
I'm an experienced software developer myself and already looked at the firmware where I would have to delay the commands before they are send to the motor controllers. So far I'm not sure where I would introduce the delay for best results.
-
-
-
@rschrem If you're looking into modifying the firmware, I think what you REALLY want is to be able to generate a pulse on an output line 20-30 milliseconds before a move ends.
I guess it would be cool to add an Mxxx code to configure which output pin gets toggled, and how many MS before the end of the move it gets toggled.
Now, how to do that in the firmware, I don't know, but I can take a look and see.
If @dc42 has any tips about how the movement generators work, it would be helpful for me before I attempt to figure out how everything works. -
@alankilian I think a single impulse before end of each move would not work. As I understand the code several Moves will be merged and planned together. It's documented here:
-
@rschrem I suggest you take a look at the M670 command.