Need advice on timelapse

I am toying with the timelapse function.  My printer is a Mendelmax 3 so it moves the bed in the Y axis.  So I need to take pictures when the Y coordinate is in the same position - otherwise the model is jumping all over the place in the video and it is hard to see how the model grows.
I have set the timelapse to take pictures on each layer change AND I have set some g-code in my slicer (S3D) so that it will go to the same Y position on a layer change.  This I thought would align the pictures.  BUT there is a lag between the layer change and the picture feed so whatever the trigger is (probably a Z move?) then the printer has already started the next layer and moved the Y axis by the time the picture is taken.

What is the trigger for the taking of the picture when the timelapse is set to "per layer"?  Is it any Z move?  Is it when there is any Z value in the g-code?  Or is it when there is the word "layer" in the g-code comments?

It would be really good if there was another option in the Timelapse which you could set the trigger as anytime there is a matching command in the g-code comments like "; take picture now" - then I could put that in the layer change script with a slow X move that would keep the model still for a few seconds as it took a picture.

Any advice for what to do?

Comments

  • Timelapses with moving beds have always been a problem for exactly that issue.

    The problem you have is move buffering. If you have a 16 buffer cache the printer has 16 moves stored + 2-8 commands in serial buffer, while server takes the photo on first print move after z change. With your own command you would have the same problem of timing.

    One solution would be with your layer switch script, but t should be

    Go to position
    M400 ; Wait all moves to be executed
    M105 ; Clean buffer abit, need enough to make M400 execute
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105
    M105

    next moves send will add the print move but that will be send before executed so it should now be nearly at the point where you want.
  • That seems to have helped tremendously.  I inserted this into the layer change script in my slicer.  The printer now moves the Y axis to the same location and pauses and a picture is taken (mostly).

    However, I have noticed that sometimes on some layers it will move to the Y picture position and then immediately move to the print and do a few lines and then pause (on the print), sometimes it will pause at the Y picture position and then move to the print and then pause again (on the print) - in both of these cases when there is a pause over the print then it can cause a undesirable mark on the print.
  • I think the intermittant pauses are to do with a different issue - I think I am having communications issues.
  • On further investigation, I think the M400 commands are causing an intermittent communications problem.  It seems that my printer returns "ok" responses rather than "ok and line number".  In another thread I see that this relates to some communications problems and a communications reset - this results in long pauses and sometimes a failure to resume a print.  This is exactly what I have experienced.  When I take the code out then it works fine.  I have also tried M117 commands rather than M105 commands and it still has intermittent pauses - it is definitely related to the M400 command.

    Can you suggest any workaround or alternative course of action?
  • G4 P0 
    is the same as M400 since dwell always waits for end of moves.

    What firmware are you using? Repetier always returns line numbers with ok except for resend requests.
  • M115 response:

    FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6
    FIRMWARE_URL:http://makerstoolworks.com/ PROTOCOL_VERSION:1.0
    MACHINE_TYPE:MendelMax 3 EXTRUDER_COUNT:2
    UUID:00000000-0000-0000-0000-000000000000
  • Marlin normally does not include line numbers anyway. I'm currently hunting methods that can make Marlin fail. So far this only happens if a resend also fails so a second resend becomes necessary. This gets catched after some time outs, but could be better. Next release will have a solution for this that should work much faster.

    I'm not too familiar with Marlin so I can not say about specific behavior on G4 there.
Sign In or Register to comment.