Problem axis z during execution g-code

edited July 2016 in Bug Reports
Hello,

i have this simple g code:

M106
G 21
M111 S6
M220 S100
G90
G28
M340 P0 S2100
G1 X10 Y20
G1 Z4
M114
G1 Z0

the problem is that crash the system. The execution of the command works only in part. The final command G1 Z0 is sent and recieve the response ok but the axis don't return to the position 0. If i try to send the z axis home after this g-code the axis don't return to the zero position but it stop in a different height. 

What could be the problem? Thanks

I use the repetier host to send the command and the firmware 0.92.9
.

Comments

  • Ok i have find that removing the command for the servo all the z moving works .... there is a bag in the servo command?

    Thanks
  • Noone can help me?

    Thanks

  • Does the servo command move servo?

    Some notes: 
    - Use R<time in ms> to auto turn off servo motor after moving. This will save servo live time and if used for z probe will remove jittering from correction.
    - Do not use board 5V for servo - most servos draw too much current crashing the cpu. Servos need a stable and good power line for them self.
    - G 21 should be G21 no space between it!
  • Hello,

    i have tried this solutions but nothing. Could be that when i use the servo it is associated to the z-probe ? 


  • No, servos are never assiciated to anything. You can set a activation code for z probe containing servo commands, thats all.
  • Ok then i don't know what could be the problem. If you can send me a mail i can send you a video of the machine with the script that i use so you can understand better. 

    Thanks 
  • I have do two video. In the first i execute this g-code:

    M106
    M340 P0 S2100
    G21
    M111 S6
    M220 S100
    G90
    G28
    G1 X10 Y20 T0
    G1 Z6
    M114
    G1 Z0

    and this is how it move, the z axis don't return up:

    removing the servo command it work fine:
  • What's the idea of
    G1 X10 Y20 T0
    T0 is nothing we interpret.

    In the working video I see the move up but am missing the move down form last line of code or am I missing something here.

    M340 only sets position, following codes get executed in parallel. But what exactly happens after the problem triggers? Does the servo move at all? Or is the servo pin wrong and when it gets set it causes problems crashing firmware?
  • Hello,

    yes T0 was add only for a test. It can be remove without change. 
    Yes the axis z don't move to G1 Z0. It can move only at a position greater than the last. 
    So if a move z to G1 Z6 after that the axis can go only to G1 Z(6+x), the other command are not executed also the z homing.

    If i remove the servo command instead all works. 
  • Sounds like servo pin is z min pin.

    You didn't answer if servo moves at all and if firmware still responds after that, except not going to 0.
  • Hello, 

    yes the servo move without problem and the movement x and y work fine. Only the axis z have problem. 
    Here is the firmware that i sue: https://1drv.ms/u/s!AoqasgMdWbbjj6UagxxdLFa7XTLDfA
  • Hello, i think that the problem is connected to the z-probing. I don't have this feature so in configuration.h i have:

    #define Z_PROBE_Z_OFFSET 0
    #define Z_PROBE_Z_OFFSET_MODE 0
    #define UI_BED_COATING 0
    #define FEATURE_Z_PROBE 0
    #define Z_PROBE_BED_DISTANCE 10
    #define Z_PROBE_PIN -1
    #define Z_PROBE_PULLUP 0

    but i think that this create problem with the z axis because i use the servo. Clould be?
  • edited August 2016

  • No if the feature is disabled as in your case the code is not compiled. Also probe pin is -1 so how can it interfere with servo pin.

    Have you checked the log? Normally if servo command works and the rest also works the combination also works, unless servo creates some electrical problems making the board crash (brown out, loose usb connection). Many users have z probes activated by servos, my printer switches extruder using a servo like yours and all work.
  • To rule out electrical problems use servo command but remove servo physical.
  • edited August 2016
    I have sconnect the servo and now work fine. The servo is power by a 5V power supply different from the board power supply. The only pin connected to the board is the control pin... Could it create so many problem?

    I use the pin 45 of my megatronics v3

    Thanks
  • Do both power supplies share same mass potential? Not that electronics is what I understand so well:-)
Sign In or Register to comment.