bdring / FluidNC

The next generation of motion control firmware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem: M5 will still report a spindle speed

breiler opened this issue · comments

Wiki Search Terms

N/A

Using this documentation:
http://wiki.fluidnc.com/en/config/config_spindles#pwm

Controller Board

ESP32 CNC Dev Controller V4.1

Machine Description

Just hooked up to a couple of LEDs

Input Circuits

No response

Configuration file

name: New configuration
axes:
  x:
    steps_per_mm: 800
    max_rate_mm_per_min: 1200
    acceleration_mm_per_sec2: 15
    max_travel_mm: 1000
    homing:
      cycle: 2
    motor0:
      limit_all_pin: gpio.17:pu:low
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 2
      standard_stepper:
        step_pin: gpio.12
        direction_pin: gpio.14:low
        disable_pin: NO_PIN
  y:
    steps_per_mm: 800
    max_rate_mm_per_min: 1200
    acceleration_mm_per_sec2: 15
    max_travel_mm: 1000
    homing:
      cycle: 2
      positive_direction: false
    motor0:
      limit_all_pin: gpio.4:pu:low
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 2
      standard_stepper:
        step_pin: gpio.26
        direction_pin: gpio.15
        disable_pin: NO_PIN
  shared_stepper_disable_pin: gpio.13
  shared_stepper_reset_pin: NO_PIN
  z:
    steps_per_mm: 800
    max_rate_mm_per_min: 1200
    acceleration_mm_per_sec2: 15
    max_travel_mm: 1000
    homing:
      cycle: 1
    motor0:
      limit_all_pin: gpio.16:pu:low
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1
      standard_stepper:
        step_pin: gpio.27
        direction_pin: gpio.33:low
        disable_pin: NO_PIN
probe:
  pin: gpio.32:low:pu
  toolsetter_pin: NO_PIN
  check_mode_start: false
stepping:
  engine: RMT
  idle_ms: 250
  pulse_us: 4
  dir_delay_us: 0
  disable_delay_us: 0
PWM:
  output_pin: gpio.2
  enable_pin: gpio.22
  direction_pin: NO_PIN
  speed_map: 0=0% 12000=100%
  s0_with_disable: true
  disable_with_s0: false

Startup Messages

> $Startup/Show
[MSG:INFO: FluidNC v3.7.16 https://github.com/bdring/FluidNC]]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.4]]
[MSG:INFO: Local filesystem type is littlefs]]
[MSG:INFO: Configuration file:config.yaml]]
[MSG:INFO: Machine New configuration]]
[MSG:INFO: Board None]]
[MSG:INFO: Stepping:RMT Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:250ms]]
[MSG:INFO: Axis count 3]]
[MSG:INFO: Shared stepper disable gpio.13]]
[MSG:INFO: Axis X (-1000.000,0.000)]]
[MSG:INFO:   Motor0]]
[MSG:INFO:     standard_stepper Step:gpio.12 Dir:gpio.14:low Disable:NO_PIN]]
[MSG:INFO:  X All Limit gpio.17:low:pu]]
[MSG:INFO: Axis Y (0.000,1000.000)]]
[MSG:INFO:   Motor0]]
[MSG:INFO:     standard_stepper Step:gpio.26 Dir:gpio.15 Disable:NO_PIN]]
[MSG:INFO:  Y All Limit gpio.4:low:pu]]
[MSG:INFO: Axis Z (-1000.000,0.000)]]
[MSG:INFO:   Motor0]]
[MSG:INFO:     standard_stepper Step:gpio.27 Dir:gpio.33:low Disable:NO_PIN]]
[MSG:INFO:  Z All Limit gpio.16:low:pu]]
[MSG:INFO: Kinematic system: Cartesian]]
[MSG:INFO: PWM Spindle Ena:gpio.22 Out:gpio.2 Dir:NO_PIN Freq:5000Hz Period:8191]]
[MSG:INFO: Using spindle PWM]]
[MSG:INFO: Probe Pin: gpio.32:low:pu]]
[MSG:INFO: Connecting to STA SSID:----]]
[MSG:INFO: Connecting.]]
[MSG:INFO: Connecting..]]
[MSG:INFO: Connecting...]]
[MSG:INFO: Connected - IP is -------]]
[MSG:INFO: WiFi on]]
[MSG:INFO: Start mDNS with hostname:http://fluidnc.local/]]
[MSG:INFO: SSDP Started]]
[MSG:INFO: HTTP started on port 80]]
[MSG:INFO: Telnet started on port 23]]
ok

User Interface Software

UGS and FluidNC Web Installer terminal

What happened?

This is more of a cosmetic problem as the behaviour of the spindle is correct, it is just the status report that doesn't reflect the current state.

When the option s0_with_disable: true is configured I am expecting the spindle speed to become 0 in the status report when I issue the M5 command. The spindle will turn off, it is just the status report that still shows the spindle speed.

> ?
<Idle|MPos:0.000,0.000,0.000|FS:0,0|Pn:Y>
ok

> M3 S12000
ok

> ?
<Idle|MPos:0.000,0.000,0.000|FS:0,12000|Pn:Y>

> M5
ok

> ?
<Idle|MPos:0.000,0.000,0.000|FS:0,12000|Pn:Y>
ok

GCode File

No response

Other Information

No response

That might be hard to change because it is handled by logic deep inside the spindle type specific driver code. The name is somewhat misleading. It doesn’t really force the S variable to 0 but rather forces the spindle type specific control signal that the S value orherwise maps to to the same setting that S0 would cause. That control signal could be a voltage or a PWM duty cycle or a vfd command packet or … we used s0 in the name for lack of a better way of saying it in a manageable number of characters.