Axis moves wrong direction if USB cable is connected on startup
-
Hello, this is a strange one, so please bare with me.
I have a CoreXY machine that works well but behaves differently if there is a USB cable connected between the Duet3 board and host computer when the Duet board is powered up. If the connection is present, then the X and Y axes move opposite of their configured directions. If I power up the board and then connect the USB cable then the axes move in the correct direction. This change in behavior happens if the cable is connected, regardless of if I have an open connection.
Scenario 1: USB connected after board powers up:
- G28: Machine properly homes
- G92 to set position / G0 for manual move and everything moves in the right direction
Scenario 2: USB connected before board powers up:
- G28: Z axis correctly raises, X and Y attempt to home in the wrong directions. I have tried flipping the order of the X and Y home and the same thing happens
- G92 to set position / G0 for manual move and both X and Y move in the opposite direction
- Happens regardless of if the cable is just connected or if there is a serial connection open
I added an M118 command at the end of my config.g file to confirm everything was getting executed and I see this in the serial monitor before executing any commands.
Any suggestions on how to troubleshoot this?
- Boards: Two Duet3 MB6HC connected via CAN bus
- Connection: USB connection into CAN bus board 0
- Firmware: 3.5.4 (both boards)
- Steppers:
** Board 0: Z steppers
** Board 1: X and Y steppers
The config.g and homeall.g are attached for Board 0. Board 1 config.g only contains "M954 A1"
-
@ArtifexAlpha what I think is happening is that when you have the USB cable connected, the main board is powered via the USB cable. So the main board starts up and runs config.g . However the expansion board is not powered, so it can't process the configuration commands that the main board tries to send it.
-
Thanks @dc42 that definitely makes sense to me. Is there any way to not power the board from USB? I did not see anything in the docs about a jumper or trace to change this behavior.
In absence of a hardware solution, it looks like if I issue M999 as my first command then Board 1 gets properly initialized.
-
I found the M999 solution caused some issues with the host software, so instead I split config.g up into variable definitions and I/O configuration, calling the I/O config from config.g. After I connect from the host it issues a command to run just the I/O config and everything works now.
@dc42 Thanks for pointing me in the right direction!
-
-