configuring stepper motor driver
-
Greetings
We are using an Duet 3 Main Board 6HC with Duet 3 Exapansion board 3HC for a three axis cartesian setup for custom process. This process doesn´t need an extruder, instead a simple stepper motor to drive out the filament from the spool i.e., pull the filament from the spool and drive out from the stepper motor. Hence a an additional axis ¨U¨ is created the configuration file for the same is pasted below,
Config.g file
M569 P0.0 S0 ; Main board.Z0 drive (Z1 Motor) 0.0 goes backwards
M569 P0.1 S0 ; Main board.Z1 drive (Z2 Motor) 0.1 goes backwards
M569 P0.2 S0 ; Main board.Z2 drive (Z3 Motor) 0.2 goes backwards
M569 P0.3 S0 ; Main board.Z3 drive (Z4 Motor) 0.3 goes backwards
M569 P0.4 S1 ; Main board.Z4 drive (Feeder Motor) 0.4 goes forward
M569 P1.0 S0 ; Expansion board.X drive (X Motor) 1.0 goes backwards
M569 P1.1 S0 ; Expansion board.Y1 drive (Y1 Motor) 1.1 goes backwards
M569 P1.2 S0 ; Expansion board.Y2 drive (Y2 Motor) 1.2 goes backwards
M584 X1.0 Y1.1:1.2 Z0.0:0.1:0.2:0.3 U0.4 ; set drive mapping, 4-Z Motors,2-Y Motors,1-X Motor & 1-U Motor
M671 X5:5:545:545 Y70:455:455:70 S5.0 ; leadscrews at Front left, Rear Left, Rear Right and Front right
M350 X16 Y16 Z16 U16 I1 ; configure microstepping with interpolation
M92 X400.00 Y400.00 Z400.00 U400.00 ; set steps per mm
M566 X300.00 Y300.00 Z180.00 U300.00 ; set maximum instantaneous speed changes (mm/min)
M203 X3000.00 Y3000.00 Z600.00 U300.00 ; set maximum speeds (mm/min)
M201 X100.00 Y100.00 Z20.00 U100.00 ; set accelerations (mm/s^2)
M906 X2520 Y2520 Z2520 U2520 I100 ; set motor currents (mA) and motor idle factor in per centIf a linear motion by using a G1 command is needed example,
G1 X90.6 Y13.8 Z20.0 U23.4 ; move 90.6mm in X axis, 13.8mm in Y axis, 20.0mm in Z axis and 23.4mm in U axisDoes the above configuration file fullfills the requisite? Any modifications to be done?
And if i want to change the feedrate for the U axis only is it possible? -
Hi everyone,
Requesting your kind support for this issue......
-
@SANJR Your config.g looks okay to me. You will need to test to see if your speeds and accelerations are achievable, I know nothing about your machine. Your accelerations are very low, however, so I'm guessing you are moving a lot of weight around.
And if i want to change the feedrate for the U axis only is it possible?
You set the feedrate for the coordinated move, eg
G1 X90.6 Y13.8 Z20.0 U23.4 F1000
A G1 command that has more than axis movement coordinates this movement so that all axes start and finish at the same time, and stay in synchronisation through the move.
The axes will move together at the speed of the slowest axis, set by M566, M203 and M201. If you want to change this, either send the G1 command with a lower feedrate (F parameter), or change the maximum speed/acceleration/jerk with the axis you want to change, eg
You can't send a separate G1 U command at a different speed at the same time as the other moves; it wouldn't be coordinated, unless you start getting into multiple motion systems, see https://docs.duet3d.com/en/User_manual/RepRapFirmware/Multiple_motion_systems.
You can change the steps per mm of the axis (M92), to change the amount of extrusion, without having to rehome the axis, which would effectively change the feedrate of the U axis relative to the other axes.
Is that what you mean?
Ian
-
Thanks for the feedback.
As u rightly predicted I am trying to move heavier stuff. Th new U axis needs to operated independently of the other X, Y and Z axis. Meaning the U axis feedrate should be cordinated, has to operate the when the remaining X, Y & Z axis moves but not synchronized meaning same feedrate for all the axes.
The example in the multiple motion system is adaptable to the situation. I will go through and try to understand the context.
Once again thank you ur timely feedback ...
-
Hello everyone,
I have built a custom cartesian motion machine using Duet 3D Mainboard 6HC and a Duet 3D Expansion board 3HC. Three axes X,Y and Z for movement and U axis for feeder motor (Unlike a extruder where the filament is heated, this feeder motor only supplies the filament) only when the print head is switched ON, for this print head is controlled by a 5 V normaly relay connected to OUT_9 (IO Pin) of the MainBoard.
Two macro files to control the Printhead ON and OFF and will be called using the M98 command in the print file.
The requirement is the U axis feeder motor
- To control the feedrate independently of the other axes (i.e., X,Y & Z axes)
- To synchronize with the Printhead ON and OFF state/conditions
Various files for this attached for reference,
-
config.g file -> commands including the U axis is pasted
; Drives
M569 P0.4 S1 ; Main board.04 drive (feeder Motor) 0.4 goes forward
M584 X1.0 Y1.1:1.2 Z0.0:0.1:0.2:0.3 U0.4 ; set board.drive mapping, expansion board : X & Y axes, main board : Z axis & Feeder motor
M350 X16 Y16 Z16 U16 I1 ; configure microstepping with interpolation
M92 X400.00 Y400.00 Z400.00 U400.00 ; set steps per mm
M566 X300.00 Y300.00 Z180.00 U180.00 ; set maximum instantaneous speed changes (mm/min)
M203 X3000.00 Y3000.00 Z600.00 U3000.00 ; set maximum speeds (mm/min)
M201 X100.00 Y100.00 Z20.00 U100.00 ; set accelerations (mm/s^2)
M906 X2520 Y2520 Z2520 U2520 I100 ; set motor currents (mA) and motor idle factor in per cent
M84 S3600 ; Set idle timeout -
; Printhead state -> global variable in the miscellaneous section of the config.g file
global PrintHeadState = 0 ; Assume initially off, change to 1 for ON -
Two macros file -> switch ON and OFF the printhead, These two macros are tested by using the M98 in the print file.
; Print Head ON
M42 P3 S0 ; turns on the relay
; set Print Head state to ON
global.PrintHeadState = 1; Print Head OFF
M42 P3 S1 ; turns off the relay
; set Print Head state to OFF
global.PrintHeadState = 0- daemon.g file -> to place in the system folder. continuous loop to check the status of the PrintHead
; daemon.g
; Check the state of the weld torch
if exists(global.PrintHeadState) && global.PrintHeadState == 1
; Printhead is ON, turn on feeder motor
G91 ; Use relative extrusion
G1 H2 U999 F1000 ;selects the U axis & sets the feedrate
else
; Printhead is OFF, turn off feeder motor
G92 U0 ; Set U axis position to zero
M5 P0.4 ; Stop the motor
M400 ; wait for all moves to complete; Run this script again (loop)
M98 P"0:/sys/daemon.g"Does the above configuration setup is valid for the requirement? Any modifications is needed?
Request your insights plz.......
-
Hello everyone,
Requesting your insights plzzz.....
Ur support would be much appreciated
-
Hello,
If any additional information needed for the requested above. Please let me know, I would be glad to provide.