bdring / FluidNC

The next generation of motion control firmware
Other
1.6k stars 383 forks source link

Problem: Critical error "152: Configuration is invalid." [3.4.6] #464

Closed TorAllex closed 2 years ago

TorAllex commented 2 years ago

Controller Board

4 axis ESP32 CNC controller for daisy chained SPI stepper drivers

Help From Board Vendor

Machine Description

TAIG Lathe

Configuration file

board: 4 Axis SPI Daisy
name: 4 Axis SPI stealthChop +Relay
stepping:
  engine: RMT
  idle_ms: 254
  pulse_us: 2
  dir_delay_us: 1
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: NO_PIN
  x:
    steps_per_mm: 2400
    max_rate_mm_per_min: 500.000
    acceleration_mm_per_sec2: 3.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 2
      positive_direction: true
      mpos_mm: 0.000
      feed_mm_per_min: 20.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.36
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        cs_pin: gpio.17
        spi_index: 1
        r_sense_ohms: 0.110
        run_amps: 1.1
        hold_amps: 0.2
        microsteps: 8
        stallguard: 0
        stallguard_debug: false
        toff_disable: 1
        toff_stealthchop: 2
        toff_coolstep: 2
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.12
        direction_pin: gpio.14
        disable_pin: NO_PIN

  y:
    steps_per_mm: 4800.000
    max_rate_mm_per_min: 300.000
    acceleration_mm_per_sec2: 5.000
    max_travel_mm: 60.000
    soft_limits: false
    homing:
      cycle: 1
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.39
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 2
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.20
        microsteps: 16
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.27
        direction_pin: gpio.26
        disable_pin: NO_PIN

  z:
    steps_per_mm: 800.000
    max_rate_mm_per_min: 5000.000
    acceleration_mm_per_sec2: 100.000
    max_travel_mm: 300.000
    soft_limits: false
    homing:
      cycle: 4
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.34
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 3
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.20
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: false
        step_pin: gpio.15
        direction_pin: gpio.2
        disable_pin: NO_PIN

  a:
    steps_per_mm: 53.33333
    max_rate_mm_per_min: 180000.000
    acceleration_mm_per_sec2: 360.000
    max_travel_mm: 360.000
    soft_limits: false
    homing:
      cycle: 3
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 200.000
      settle_ms: 250
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: gpio.35
      hard_limits: false
      pulloff_mm: 1.000
      tmc_2130:
        spi_index: 4
        r_sense_ohms: 0.110
        run_amps: 1.2
        hold_amps: 0.50
        microsteps: 32
        stallguard: 0
        stallguard_debug: false
        toff_disable: 0
        toff_stealthchop: 5
        toff_coolstep: 3
        run_mode: stealthChop
        homing_mode: CoolStep
        use_enable: true
        step_pin: gpio.33
        direction_pin: gpio.32
        disable_pin: NO_PIN

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

sdcard:
  card_detect_pin: NO_PIN
  cs_pin: gpio.5

PWM:
  pwm_hz: 250
  output_pin: gpio.25
  enable_pin: gpio.4
  direction_pin: NO_PIN
  disable_with_s0: false
  s0_with_disable: true
  spinup_ms: 0
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0.000% 1=100%

probe:
  pin: NO_PIN
  check_mode_start: true

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

start:
  must_home: false

Startup Messages

Grbl 3.4 [FluidNC v3.4.6 (wifi) '$' for help]
[MSG:ERR: gpio.4]
[MSG:ERR: Critical error in run_once: Pin gpio.4 cannot be written]
[MSG:ERR: Stacktrace: _attributes.has(PinAttributes::Output) (@line 135): Pin gpio.4 cannot be written at: 0]

Grbl 3.4 [FluidNC v3.4.6 (wifi) '$' for help]
[MSG:INFO: Configuration is invalid. Check boot messages for ERR's.]
$SS
[MSG:INFO: FluidNC v3.4.6]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e]
[MSG:INFO: Local filesystem type is SPIFFS]
[MSG:INFO: Configuration file:TMC2130_Rel_testA.yaml]
[MSG:WARN: max_rate_mm_per_min value 180000.000 constrained to range (0.001,100000.000)]
[MSG:INFO: Machine 4 Axis SPI stealthChop +Relay]
[MSG:INFO: Board 4 Axis SPI Daisy]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN]
[MSG:INFO: Stepping:RMT Pulse:2us Dsbl Delay:0us Dir Delay:1us Idle Delay:254ms]
[MSG:INFO: Axis count 4]
[MSG:INFO: Axis X (-300.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.12 Dir:gpio.14 CS:gpio.17 Disable:NO_PIN Index:1 R:0.110]
[MSG:INFO:     All Limit gpio.36]
[MSG:INFO: Axis Y (0.000,60.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.27 Dir:gpio.26 CS:NO_PIN Disable:NO_PIN Index:2 R:0.110]
[MSG:INFO:     All Limit gpio.39]
[MSG:INFO: Axis Z (0.000,300.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.15 Dir:gpio.2 CS:NO_PIN Disable:NO_PIN Index:3 R:0.110]
[MSG:INFO:     All Limit gpio.34]
[MSG:INFO: Axis A (0.000,360.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     tmc_2130 Step:gpio.33 Dir:gpio.32 CS:NO_PIN Disable:NO_PIN Index:4 R:0.110]
[MSG:INFO:     All Limit gpio.35]
[MSG:ERR: Critical error in main_init: The requested attributes on gpio.17 conflict with previous settings]
[MSG:INFO: Connecting to STA SSID:OpenWrt]
[MSG:INFO: Connecting.]
[MSG:INFO: Connected - IP is 192.168.1.134]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://TaigGRBL.local/]
[MSG:INFO: SSDP Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]

User Interface Software

WebUI

What happened?

3.4.5 works Ok, 3.4.6 - error:152 (152: Configuration is invalid.)

Other Information

No response

MitchBradley commented 2 years ago

We have already discovered this problem and are preparing the fix.

MitchBradley commented 2 years ago

Reference #465

bdring commented 2 years ago

The config loads for me with the latest, v3.4.7, release.

TorAllex commented 2 years ago

The config loads for me with the latest, v3.4.7, release.

Thanks! Looks as a charm :) $SS [MSG:INFO: FluidNC v3.4.7] [MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e] [MSG:INFO: Local filesystem type is SPIFFS] [MSG:INFO: Configuration file:TMC2130_Rel_testA.yaml] [MSG:WARN: max_rate_mm_per_min value 180000.000 constrained to range (0.001,100000.000)] [MSG:INFO: Machine 4 Axis SPI stealthChop +Relay] [MSG:INFO: Board 4 Axis SPI Daisy] [MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19] [MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN] [MSG:INFO: Stepping:RMT Pulse:2us Dsbl Delay:0us Dir Delay:1us Idle Delay:254ms] [MSG:INFO: Axis count 4] [MSG:INFO: Axis X (-300.000,0.000)] [MSG:INFO: Motor0] [MSG:INFO: tmc_2130 Step:gpio.12 Dir:gpio.14 CS:gpio.17 Disable:NO_PIN Index:1 R:0.110] [MSG:INFO: All Limit gpio.36] [MSG:INFO: Axis Y (0.000,60.000)] [MSG:INFO: Motor0] [MSG:INFO: tmc_2130 Step:gpio.27 Dir:gpio.26 CS:NO_PIN Disable:NO_PIN Index:2 R:0.110] [MSG:INFO: All Limit gpio.39] [MSG:INFO: Axis Z (0.000,300.000)] [MSG:INFO: Motor0] [MSG:INFO: tmc_2130 Step:gpio.15 Dir:gpio.2 CS:NO_PIN Disable:NO_PIN Index:3 R:0.110] [MSG:INFO: All Limit gpio.34] [MSG:INFO: Axis A (0.000,360.000)] [MSG:INFO: Motor0] [MSG:INFO: tmc_2130 Step:gpio.33 Dir:gpio.32 CS:NO_PIN Disable:NO_PIN Index:4 R:0.110] [MSG:INFO: All Limit gpio.35] [MSG:INFO: X Axis driver test passed] [MSG:INFO: Y Axis driver test passed] [MSG:INFO: Z Axis driver test passed] [MSG:INFO: A Axis driver test passed] [MSG:INFO: Kinematic system: Cartesian] [MSG:INFO: PWM Spindle Ena:gpio.4 Out:gpio.25 Dir:NO_PIN Freq:250Hz Res:18bits] [MSG:INFO: Using spindle PWM] [MSG:INFO: Connecting to STA SSID:OpenWrt] [MSG:INFO: Connecting.] [MSG:INFO: Connected - IP is 192.168.1.134] [MSG:INFO: WiFi on] [MSG:INFO: Start mDNS with hostname:http://TaigGRBL.local/] [MSG:INFO: SSDP Started] [MSG:INFO: HTTP started on port 80] [MSG:INFO: Telnet started on port 23] ok