MB6HC with two expansion boards stepper direction problem
-
I am going crazy here !!
Mainboard
Setup is
X (2 motors)
Y
Z
ExtruderMotor direction easy to configure using M569 and S1 or S0
First Expansion Board
U
VMotor direction easy to configure using M569 and S1 or S0
Second expansion board
A
BMotor direction is impossible to control in software, irrespective of the "S" setting in M569 command the motor will only run in one direction when given a positive position to go to.
Swopping over the expansion boards gives exactly the same result.
Have upgraded firmware on main and expansion boards from 3.2.2 to 3.3beta3, that makes no difference
Any idea of what it might be?
-
Post your full config.g please.
Are you treating A and B as rotational or linear axis?
https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping
-
Good morning - Thanks for your reply.
I have posted the latest revision of config.g below, please note that following your post I note that the original code contained a single line of instruction for M584 - so yes, A and B were defaulting to rotational axis.
I have tried putting a separate M584 line below the main line and then tried two variants of that, the first being just R0 at the end of the line and the second having R0 and S0 at its end. Neither allow changing the A or B motor direction using the M569 instructions.
Below is the third variant (R0 and S0 at the end of the M584 line for the A and B stepper motors)
I have also tried keeping all of the M584 motors on a single line and have tried R0, S0 and R0 S0 at the end of a single line - none allow the direction of A and B to be set using the M569 command
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"xxxxxx" ; set printer name; Network
M551 P"xxxx" ; set password
M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet; Drives (set direction)
M569 P0.0 S1 ; X (1)
M569 P0.1 S1 ; Y
M569 P0.2 S0 ; Z
M569 P0.3 S1 ; Extruder
M569 P0.4 S0 ; U (second X)
M569 P1.0 S0 ; V
M569 P1.1 S0 ; W
M659 P2.0 S0 ; A
M659 P2.1 S0 ; B; set drive mapping
M584 X0.0:0.4 Y0.1 Z0.2 E0.3 U0.4 V1.0 W1.1 A2.0 B2.1 R0
;M584 A2.0 B2.1 R0 S0 ; Set A and B to linear mode (default for A and B is rotational)
M350 X16 Y16 Z16 E16 U16 V16 W16 A16 B16 I1 ; configure microstepping with interpolation
M92 X357.19 Y80.00 Z636.00 E420.00 U357.19 V636.00 W636.00 A636.00 B636.00 ; set steps per mm
M566 X900.00 Y900.00 Z600.00 E120.00 U900.00 V600.00 W600.00 A600.00 B600.00 ; set maximum instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z1000.00 E1200.00 U6000.0 V1000.00 W1000.00 A1000.00 B1000.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z200.00 E250.00 U500.00 V200.00 W200.00 A200.00 B200.00 ; set accelerations (mm/s^2)
M906 X800 Y800 Z1000 E800 U800 I60 V1000 W1000 A1000 B1000 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 U0 V0 W0 A0 B0 S1 ; set axis minima
M208 X1170 Y1050 Z740 U1170 V740 W740 A740 B740 S0 ; set axis maxima; Endstops
M574 X0 S1 P"io1.in+io4.in" ; configure active-high endstop for low end on X via pin io1.in
M574 Y0 S1 P"io2.in" ; configure active-high endstop for low end on Y via pin io2.in
M574 Z0 S1 P"io3.in" ; configure active-high endstop for low end on Z via pin io3.in
;M574 U0 S1 P"io4.in"
M574 V0 P"1.io0.in"
M574 W0 P"1.io1.in"
M574 A0 P"2.io0.in"
M574 B0 P"2.io1.in"; Z-Probe
M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
M557 X15:215 Y15:195 S20 ; define mesh grid; Heaters
M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1
M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H1 S280 ; set temperature limit for heater 1 to 280C; Fans
M950 F0 C"out4" Q500 ; create fan 0 on pin out4 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"out5" Q500 ; create fan 1 on pin out5 and set its frequency
M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on; Tools
M563 P0 D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C; Custom settings are not defined
; Miscellaneous
M575 P1 S1 B57600 ; enable support for PanelDue
M501 ; load saved parameters from non-volatile memory
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss -
@kj3d You've got a couple of typos in your config.g. You've used M659 for the A and B motors rather than M569.
If correcting those doesn't work, try moving your M584 to before the M569 commands.
You haven't said what the UVA and B axes are for but you'll likely need to use P7 at the end of your M584 if you want to control the additional UVAB axes independently. And you might need to use an M669 to define the kinematics for those additional axes.
For info, here this is the relevant M584 from my six extruder CoreXYUVAB and the M669 that is used.
M584 X3.2 Y3.1 Z3.0 U0.0 V0.1 A0.2 B0.3 E1.0:1.1:1.2:2.0:2.1:2.2 R0 P7; M669 K8 A0:0:0:0:0:1:1 B0:0:0:0:0:1:-1; CoreXYUV plus AB force cancelling gantry
-
Brilliant - thanks for that , now trying your suggestions. Thanks again
-
Thanks Deckingman - you are spot on, the typo was the result of the issue.
The separation of the V,W, A,B axis was simply for configuration. In operation it sees all 4 as a single axis, which its now doing very well. Levels through with no issues and simply works just as intended.
Now off to Specsavers for some new glasses and a stop at the pie shop for a big helping of humble pie!"!
M569 P1.0 S0 ; V
M569 P1.1 S0 ; W
M569 P2.0 S1 ; A
M569 P2.1 S1 ; B; set drive mapping
M584 X0.0:0.4 Y0.1 Z0.2 E0.3 U0.4 V1.0:1.1:2.0:2.1 R0
M350 X16 Y16 Z16 E16 U16 V16 W16 A16 B16 I1 ; configure microstepping with interpolation
M92 X357.19 Y80.00 Z636.00 E420.00 U357.19 V636.00 W636.00 A636.00 B636.00 ; set steps per mm
M566 X900.00 Y900.00 Z600.00 E120.00 U900.00 V600.00 W600.00 A600.00 B600.00 ; set maximum instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z1000.00 E1200.00 U6000.0 V1000.00 W1000.00 A1000.00 B1000.00 ; set maximum speeds (mm/min)
M201 X500.00 Y500.00 Z200.00 E250.00 U500.00 V200.00 W200.00 A200.00 B200.00 ; set accelerations (mm/s^2)
M906 X800 Y800 Z1000 E800 U800 I60 V1000 W1000 A1000 B1000 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 U0 V0 W0 A0 B0 S1 ; set axis minima
M208 X1170 Y1050 Z740 U1170 V740 W740 A740 B740 S0 ; set axis maxima; Endstops
M574 X0 S1 P"io1.in+io4.in" ; configure active-high endstop for low end on X via pin io1.in
M574 Y0 S1 P"io2.in" ; configure active-high endstop for low end on Y via pin io2.in
M574 Z0 S1 P"io3.in" ; configure active-high endstop for low end on Z via pin io3.in
;M574 U0 S1 P"io4.in"
M574 V0 P"1.io0.in+1.io1.in+2.io0.in+2.io1.in" -
@kj3d No worries - I've appreciated a second pair of eyes many times myself. Glad the issue is fixed - that's the main thing.