How to solve the problem that step motors run out of sync?
Posted: Tue Aug 11, 2020 1:40 am
Dear Dynomiton,
We use five step motors without any encoder module to constitute an open loop gantry system now. When I run a c program to initialize and seek the home position, both the two step motors in vertical direction (in my frame, up is the positive direction of z-axis, down is negative direction of z) work synchronously and fine. And when I first single-step run your example gcode program named as “Dynomotion.ngc”, the two step motors in vertical direction work synchronously and fine too. But if I run the gcode program continuously, the two step motors in vertical direction always run out of sync so the gantry is stuck. Then I realigned the gantry system and single-step run the gcode again, but this time the two vertical motors also run out of sync.The corresponding gcode is:
G1 X-37.939 Y8.793 Z16.000
G1 X-37.939 Y8.793 Z6.000
G1 X-35.617 Y8.793 Z6.000
G1 X-34.780 Y8.748 Z6.000
G1 X-34.060 Y8.622 Z6.000
G1 X-33.448 Y8.379 Z6.000
It must be pointed out that I have use the configuration “Ch->MasterAxis=” to configure one motor as slave and another as master in the initialization c program. But there is a load weighting about 5 kg on the crossbar. And sometimes the load is not in the middle position of the crossbar. This means the two step motors in vertical direction may not be under the same force.
I think this may because the two z-axis step motors move too quickly due to the gcode, isn’t it? Because in initialization c program they work fine. And they always work fine too when I click the green jog button of KmotionCNC. But how can I solve it? I think maybe I should reduce the motion speed of z-axis, but how can I do it without change the gcode program? I guess I should change the configuration in: “Tool setup-trajectory planner-Axis parameters”, is this right? In addition to this method, can we add some encoders in z-axis to constitute a close loop system and use the configuration of “Ch->MaxFollowingError” to limit the out of sync? Now this option is set as:1000000000 because there are no encoders now.
The third method I think maybe I can change the frame to make the vertical direction as y axis and z axis is a horizontal direction. I guess the author of “Dynomotion.ngc” program uses the y-axis as a vertical axis and z-axis as a horizontal axis, isn’t it? But this method can’t solve the problem of out of sync when the gantry moves fast in vertical direction.
Findally, I attach my trajectory planner screen here: Thank you very much for your kind reply.
Yours,
Huang Lei
08-10-2020
We use five step motors without any encoder module to constitute an open loop gantry system now. When I run a c program to initialize and seek the home position, both the two step motors in vertical direction (in my frame, up is the positive direction of z-axis, down is negative direction of z) work synchronously and fine. And when I first single-step run your example gcode program named as “Dynomotion.ngc”, the two step motors in vertical direction work synchronously and fine too. But if I run the gcode program continuously, the two step motors in vertical direction always run out of sync so the gantry is stuck. Then I realigned the gantry system and single-step run the gcode again, but this time the two vertical motors also run out of sync.The corresponding gcode is:
G1 X-37.939 Y8.793 Z16.000
G1 X-37.939 Y8.793 Z6.000
G1 X-35.617 Y8.793 Z6.000
G1 X-34.780 Y8.748 Z6.000
G1 X-34.060 Y8.622 Z6.000
G1 X-33.448 Y8.379 Z6.000
It must be pointed out that I have use the configuration “Ch->MasterAxis=” to configure one motor as slave and another as master in the initialization c program. But there is a load weighting about 5 kg on the crossbar. And sometimes the load is not in the middle position of the crossbar. This means the two step motors in vertical direction may not be under the same force.
I think this may because the two z-axis step motors move too quickly due to the gcode, isn’t it? Because in initialization c program they work fine. And they always work fine too when I click the green jog button of KmotionCNC. But how can I solve it? I think maybe I should reduce the motion speed of z-axis, but how can I do it without change the gcode program? I guess I should change the configuration in: “Tool setup-trajectory planner-Axis parameters”, is this right? In addition to this method, can we add some encoders in z-axis to constitute a close loop system and use the configuration of “Ch->MaxFollowingError” to limit the out of sync? Now this option is set as:1000000000 because there are no encoders now.
The third method I think maybe I can change the frame to make the vertical direction as y axis and z axis is a horizontal direction. I guess the author of “Dynomotion.ngc” program uses the y-axis as a vertical axis and z-axis as a horizontal axis, isn’t it? But this method can’t solve the problem of out of sync when the gantry moves fast in vertical direction.
Findally, I attach my trajectory planner screen here: Thank you very much for your kind reply.
Yours,
Huang Lei
08-10-2020