Arthur, thanks for the feedback/help. Per your suggestion of flashing the default firmware and config, I decided to do them one at a time to (rather than simultaneously) to see if that could determine the particular culprit in this case.
I decided to first try swapping the config file. I replaced my config file with the latest config file from the smoothie site. Here is my original config file which would not allow me to communicate to the M4 driver. This site won’t allow me to post both complete config files because it is limiting me to 40,000 characters for this post, so I will eliminate some of the (I assume) superfluous contents:
# NOTE Lines must not exceed 132 characters
# Robot module configurations : general handling of movement G-codes and slicing into moves
default_feed_rate 4000 # Default rate ( mm/minute ) for G1/G2/G3 moves
default_seek_rate 4000 # Default rate ( mm/minute ) for G0 moves
mm_per_arc_segment 0.5 # Arcs are cut into segments ( lines ), this is the length for
# these segments. Smaller values mean more resolution,
# higher values mean faster computation
mm_per_line_segment 0 # Lines can be cut into segments ( not usefull with cartesian
# coordinates robots ).
# Arm solution configuration : Cartesian robot. Translates mm positions into stepper positions
alpha_steps_per_mm 500.0000 # Steps per mm for alpha stepper
beta_steps_per_mm 500.0000 # Steps per mm for beta stepper
gamma_steps_per_mm 500.0000 # Steps per mm for gamma stepper
delta_steps_per_mm 500.0000 # Steps per mm for gamma stepper
# Planner module configuration : Look-ahead and acceleration configuration
planner_queue_size 32 # DO NOT CHANGE THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING
acceleration 500 # Acceleration in mm/second/second.
z_acceleration 3000 # Acceleration for Z only moves in mm/s^2, 0 uses acceleration which is the default. DO NOT SET ON A DELTA
acceleration_ticks_per_second 1000 # Number of times per second the speed is updated
junction_deviation 0.05 # Similar to the old "max_jerk", in millimeters,
# see https://github.com/grbl/grbl/blob/master/planner.c
# and https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8
# Lower values mean being more careful, higher values means being
# faster and have more jerk
#z_junction_deviation 0.0 # for Z only moves, -1 uses junction_deviation, zero disables junction_deviation on z moves DO NOT SET ON A DELTA
#minimum_planner_speed 0.0 # sets the minimum planner speed in mm/sec
# Stepper module configuration
microseconds_per_step_pulse 1 # Duration of step pulses to stepper drivers, in microseconds
base_stepping_frequency 180000 # Base frequency for stepping, higher gives smoother movement
# Cartesian axis speed limits
x_axis_max_speed 30000 # mm/min
y_axis_max_speed 30000 # mm/min
z_axis_max_speed 30000 # mm/min
a_axis_max_speed 30000 # mm/min
# Stepper module pins ( ports, and pin numbers, appending "!" to the number will invert a pin )
alpha_step_pin 2.0 # Pin for alpha stepper step signal
alpha_dir_pin 0.5 # Pin for alpha stepper direction
alpha_en_pin 0.4 # Pin for alpha enable pin
alpha_current 1.5 # X stepper motor current
alpha_max_rate 30000.0 # mm/min
beta_step_pin 2.1 # Pin for beta stepper step signal
beta_dir_pin 0.11 # Pin for beta stepper direction
beta_en_pin 0.10 # Pin for beta enable
beta_current 1.5 # Y stepper motor current
beta_max_rate 30000.0 # mm/min
gamma_step_pin 2.2 # Pin for gamma stepper step signal
gamma_dir_pin 0.20 # Pin for gamma stepper direction
gamma_en_pin 0.19 # Pin for gamma enable
gamma_current 1.5 # Z stepper motor current
gamma_max_rate 30000.0 # mm/min
delta_step_pin 2.3 # Pin for delta stepper step signal
delta_dir_pin 0.22 # Pin for delta stepper direction
delta_en_pin 0.21 # Pin for delta enable
delta_current 1.5 # A stepper motor current
delta_max_rate 30000.0 # mm/min
# Serial communications configuration ( baud rate default to 9600 if undefined )
uart0.baud_rate 115200 # Baud rate for the default hardware serial port
second_usb_serial_enable false # This enables a second usb serial port (to have both pronterface
# and a terminal connected)
#leds_disable true # disable using leds after config loaded
#play_led_disable true # disable the play led
pause_button_enable true # Pause button enable
#pause_button_pin 2.12 # pause button pin. default is P2.12
#kill_button_enable false # set to true to enable a kill button
#kill_button_pin 2.12 # kill button pin. default is same as pause button 2.12 (2.11 is another good choice)
#msd_disable false # disable the MSD (USB SDCARD) when set to true (needs special binary)
#dfu_enable false # for linux developers, set to true to enable DFU
# Extruder module configuration
#extruder.hotend.enable true # Whether to activate the extruder module at all. All configuration is ignored if false
#extruder.hotend.steps_per_mm 140 # Steps per mm for extruder stepper
#extruder.hotend.default_feed_rate 600 # Default rate ( mm/minute ) for moves where only the extruder moves
#extruder.hotend.acceleration 500 # Acceleration for the stepper motor, as of 0.6, arbitrary ratio
#extruder.hotend.max_speed 50 # mm/s
#extruder.hotend.step_pin 2.3 # Pin for extruder step signal
#extruder.hotend.dir_pin 0.22 # Pin for extruder dir signal
#extruder.hotend.en_pin 0.21 # Pin for extruder enable signal
# extruder offset
#extruder.hotend.x_offset 0 # x offset from origin in mm
#extruder.hotend.y_offset 0 # y offset from origin in mm
#extruder.hotend.z_offset 0 # z offset from origin in mm
# firmware retract settings when using G10/G11, these are the defaults if not defined, must be defined for each extruder if not using the defaults
#extruder.hotend.retract_length 3 # retract length in mm
#extruder.hotend.retract_feedrate 45 # retract feedrate in mm/sec
#extruder.hotend.retract_recover_length 0 # additional length for recover
#extruder.hotend.retract_recover_feedrate 8 # recover feedrate in mm/sec (should be less than retract feedrate)
#extruder.hotend.retract_zlift_length 0 # zlift on retract in mm, 0 disables
#extruder.hotend.retract_zlift_feedrate 6000 # zlift feedrate in mm/min (Note mm/min NOT mm/sec)
delta_current 1.5 # First extruder stepper motor current
Here is the latest config file I grabbed from the smoothie site:
# Smoothieboard configuration file, see http://smoothieware.org/configuring-smoothie
# NOTE Lines must not exceed 132 characters, and '#' characters mean what follows is ignored
## Robot module configurations : general handling of movement G-codes and slicing into moves
# Basic motion configuration
default_feed_rate 4000 # Default speed (mm/minute) for G1/G2/G3 moves
default_seek_rate 4000 # Default speed (mm/minute) for G0 moves
mm_per_arc_segment 0.0 # Fixed length for line segments that divide arcs, 0 to disable
#mm_per_line_segment 5 # Cut lines into segments this size
mm_max_arc_error 0.01 # The maximum error for line segments that divide arcs 0 to disable
# note it is invalid for both the above be 0
# if both are used, will use largest segment length based on radius
# Arm solution configuration : Cartesian robot. Translates mm positions into stepper positions
# See http://smoothieware.org/stepper-motors
alpha_steps_per_mm 80 # Steps per mm for alpha ( X ) stepper
beta_steps_per_mm 333.3333 # Steps per mm for beta ( Y ) stepper
gamma_steps_per_mm 1600 # Steps per mm for gamma ( Z ) stepper
# Planner module configuration : Look-ahead and acceleration configuration
# See http://smoothieware.org/motion-control
acceleration 3000 # Acceleration in mm/second/second.
#z_acceleration 500 # Acceleration for Z only moves in mm/s^2, 0 uses acceleration which is the default. DO NOT SET ON A DELTA
junction_deviation 0.05 # See http://smoothieware.org/motion-control#junction-deviation
#z_junction_deviation 0.0 # For Z only moves, -1 uses junction_deviation, zero disables junction_deviation on z moves DO NOT SET ON A DELTA
# Cartesian axis speed limits
x_axis_max_speed 30000 # Maximum speed in mm/min
y_axis_max_speed 30000 # Maximum speed in mm/min
z_axis_max_speed 30000 # Maximum speed in mm/min
# Stepper module configuration
# Pins are defined as ports, and pin numbers, appending "!" to the number will invert a pin
# See http://smoothieware.org/pin-configuration and http://smoothieware.org/pinout
alpha_step_pin 2.0 # Pin for alpha stepper step signal
alpha_dir_pin 0.5 # Pin for alpha stepper direction, add '!' to reverse direction
alpha_en_pin 0.4 # Pin for alpha enable pin
alpha_current 1.5 # X stepper motor current
alpha_max_rate 30000.0 # Maximum rate in mm/min
beta_step_pin 2.1 # Pin for beta stepper step signal
beta_dir_pin 0.11 # Pin for beta stepper direction, add '!' to reverse direction
beta_en_pin 0.10 # Pin for beta enable
beta_current 1.5 # Y stepper motor current
beta_max_rate 30000.0 # Maxmimum rate in mm/min
gamma_step_pin 2.2 # Pin for gamma stepper step signal
gamma_dir_pin 0.20 # Pin for gamma stepper direction, add '!' to reverse direction
gamma_en_pin 0.19 # Pin for gamma enable
gamma_current 1.5 # Z stepper motor current
gamma_max_rate 30000.0 # Maximum rate in mm/min
## Extruder module configuration
# See http://smoothieware.org/extruder
extruder.hotend.enable true # Whether to activate the extruder module at all. All configuration is ignored if false
extruder.hotend.steps_per_mm 140 # Steps per mm for extruder stepper
extruder.hotend.default_feed_rate 600 # Default rate ( mm/minute ) for moves where only the extruder moves
extruder.hotend.acceleration 500 # Acceleration for the stepper motor mm/sec²
extruder.hotend.max_speed 50 # Maximum speed in mm/s
extruder.hotend.step_pin 2.3 # Pin for extruder step signal
extruder.hotend.dir_pin 0.22 # Pin for extruder dir signal ( add '!' to reverse direction )
extruder.hotend.en_pin 0.21 # Pin for extruder enable signal
# Extruder offset
#extruder.hotend.x_offset 0 # X offset from origin in mm
#extruder.hotend.y_offset 0 # Y offset from origin in mm
#extruder.hotend.z_offset 0 # Z offset from origin in mm
# Firmware retract settings when using G10/G11, these are the defaults if not defined, must be defined for each extruder if not using the defaults
#extruder.hotend.retract_length 3 # Retract length in mm
#extruder.hotend.retract_feedrate 45 # Retract feedrate in mm/sec
#extruder.hotend.retract_recover_length 0 # Additional length for recover
#extruder.hotend.retract_recover_feedrate 8 # Recover feedrate in mm/sec (should be less than retract feedrate)
#extruder.hotend.retract_zlift_length 0 # Z-lift on retract in mm, 0 disables
#extruder.hotend.retract_zlift_feedrate 6000 # Z-lift feedrate in mm/min (Note mm/min NOT mm/sec)
delta_current 1.5 # First extruder stepper motor current
Good news: upon JUST using the latest config file, everything worked, including the M4 driver, as follows:
long complex jobs which used thousands of G-codes formatted as G0 X1234 Y4321
result: worked great, M1 and M2 axis both work
long complex jobs which used thousands of G-codes formatted as G0 E1234 Y4321
result: worked great, M4 and M2 axis both work, M4 replacing M1 as expected
long complex jobs which used thousands of G-codes formatted as G0 X1234 E4321
result: worked great, M1 and M4 axis both work, M4 replacing M2 as expected
So everything seems to be working fine, upon merely using latest config file from site
In going through the config file differences to determine the “culprit”, it seems to me (I could be wrong) that the main difference is this:
My original config file:
# Extruder module configuration
#extruder.hotend.enable true # Whether to activate the extruder module at all. All configuration is ignored if false
#extruder.hotend.steps_per_mm 140 # Steps per mm for extruder stepper
#extruder.hotend.default_feed_rate 600 # Default rate ( mm/minute ) for moves where only the extruder moves
#extruder.hotend.acceleration 500 # Acceleration for the stepper motor, as of 0.6, arbitrary ratio
#extruder.hotend.max_speed 50 # mm/s
#extruder.hotend.step_pin 2.3 # Pin for extruder step signal
#extruder.hotend.dir_pin 0.22 # Pin for extruder dir signal
#extruder.hotend.en_pin 0.21 # Pin for extruder enable signal
Notice that the extruder is disabled in my original config file.
Now, the config file I just grabbed from smoothie site:
## Extruder module configuration
# See http://smoothieware.org/extruder
extruder.hotend.enable true # Whether to activate the extruder module at all. All configuration is ignored if false
extruder.hotend.steps_per_mm 140 # Steps per mm for extruder stepper
extruder.hotend.default_feed_rate 600 # Default rate ( mm/minute ) for moves where only the extruder moves
extruder.hotend.acceleration 500 # Acceleration for the stepper motor mm/sec²
extruder.hotend.max_speed 50 # Maximum speed in mm/s
extruder.hotend.step_pin 2.3 # Pin for extruder step signal
extruder.hotend.dir_pin 0.22 # Pin for extruder dir signal ( add '!' to reverse direction )
extruder.hotend.en_pin 0.21 # Pin for extruder enable signal
Notice that the default config from site has extruder enabled, AND step/dir pins set to 2.3 and 0.22
So, as far as I can tell, having the config file set to enable Extruder with pins set for M4 driver, allows G-godes to successfully drive the M4 axis, either replacing the X or Y axis per desire.
The curious thing, is why adding the Delta sequence to my original config file:
delta_step_pin 2.3 # Pin for delta stepper step signal
delta_dir_pin 0.22 # Pin for delta stepper direction
delta_en_pin 0.21 # Pin for delta enable
delta_current 1.5 # A stepper motor current
delta_max_rate 30000.0 # mm/min
…doesn’t add the capability of referencing the M4 driver via A axis g-codes.