Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FluidNC Config File not compatible with latest version of fluidnc #4

Open
TacyPW opened this issue Apr 26, 2024 · 2 comments
Open

FluidNC Config File not compatible with latest version of fluidnc #4

TacyPW opened this issue Apr 26, 2024 · 2 comments

Comments

@TacyPW
Copy link

TacyPW commented Apr 26, 2024

The way that fluidnc wants uart channels to be set up has changed, see this page of the wiki.

Trinamic UART devices like TMC2208 and TMC2209 no longer support the subordinate "uart:" subsection (making that work was just too hard); you must use the external UART section with "uart_num: N":

the solution is to put the uart definition at the top level of the config file and then refer to it in each motor config.

this is the uart section:

uart2:
  txd_pin: gpio.22
  rxd_pin: gpio.21
  baud: 115200
  mode: 8N1

and this is one of the motor configs:

 motor0:
      limit_pos_pin: gpio.34:high
      hard_limits: true
      pulloff_mm: 10.000
      tmc_2209:
        uart_num: 2
        addr: 1
        r_sense_ohms: 0.110
        run_amps: 1.200
        hold_amps: 0.800
        microsteps: 4
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: true
        step_pin: gpio.27
        direction_pin: gpio.26:high
        disable_pin: NO_PIN

i have this up and running on my machine and it seems to work just fine.

@TacyPW
Copy link
Author

TacyPW commented Apr 26, 2024

for reference here is my whole config file:

name: "PlotterXY"
board: "FYSETC E4"

stepping:
  engine: RMT
  idle_ms: 255
  dir_delay_us: 2
  pulse_us: 2
  disable_delay_us: 0
  segments: 20

kinematics:
  corexy:

uart2:
  txd_pin: gpio.22
  rxd_pin: gpio.21
  baud: 115200
  mode: 8N1

# 20t pulley
# steps per mm/microsteps   80/16   40/8    20/4    10/2    5/1
# resolution in mm          0.0125  0.025   0.050   0.100   0.200

# 16t pulley
# steps per mm/microsteps   100/16  50/8    25/4    12.5/2  6.25/1
# resolution in mm          0.010   0.020   0.050   0.080   0.160

# 1/4 microsteps gives best torque for a wide range of speeds

# Board stepper driver address and gpio
# axis  add   step  dir
# x     1     27    26
# y     3     33    32
# z     0     14    12
# e     2     16    17

axes:

  x:
    steps_per_mm: 20
    max_rate_mm_per_min: 24000
    acceleration_mm_per_sec2: 2400
    max_travel_mm: 431
    soft_limits: true
    homing:
      cycle: 2
      allow_single_axis: true
      mpos_mm: 431
      positive_direction: true
      seek_mm_per_min: 4000
      feed_mm_per_min: 600
      settle_ms: 200
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_pos_pin: gpio.34:high
      hard_limits: true
      pulloff_mm: 10.000
      tmc_2209:
        uart_num: 2
        addr: 1
        r_sense_ohms: 0.110
        run_amps: 1.200
        hold_amps: 0.800
        microsteps: 4
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: true
        step_pin: gpio.27
        direction_pin: gpio.26:high
        disable_pin: NO_PIN

  y:
    steps_per_mm: 20
    max_rate_mm_per_min: 24000
    acceleration_mm_per_sec2: 2400
    max_travel_mm: 279
    soft_limits: true
    homing:
      cycle: 1
      allow_single_axis: true
      mpos_mm: 279
      positive_direction: true
      seek_mm_per_min: 4000
      feed_mm_per_min: 600
      settle_ms: 200
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_pos_pin: gpio.35:high
      hard_limits: true
      pulloff_mm: 10.000
      tmc_2209:
        uart_num: 2
        addr: 0
        r_sense_ohms: 0.110
        run_amps: 1.200
        hold_amps: 0.800
        microsteps: 4
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: StealthChop
        homing_mode: StealthChop
        use_enable: true
        step_pin: gpio.14
        direction_pin: gpio.12:high
        disable_pin: NO_PIN

  z:
    steps_per_mm: 80
    max_rate_mm_per_min: 64000
    acceleration_mm_per_sec2: 4800
    max_travel_mm: 5
    
    motor0:
      solenoid:
        output_pin: gpio.2
        pwm_hz: 30000
        off_percent: 0.000
        pull_percent: 100.000
        hold_percent: 40.000
        pull_ms: 50
        direction_invert: false

spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN

# run a fan off the 24V/5V fan header – switch on and off with the WebUI mist button or by issuing an M8 command, turn off with M9
coolant:
  mist_pin: gpio.13
  delay: 0

macros:
  startup_line0:
  startup_line1:
  macro0:
  macro1:
  macro2:
  macro3:

start:
  must_home: true

@jamescarruthers
Copy link
Owner

Thank you, Tacy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants