[FluidNC Issue#1556] Problem: Alarm when i use control pins

未分类 bolang 4个月前 (10-14) 44次浏览

Issue #1556 | 状态: 进行中 | 作者: Cyberhornet34 | 创建时间: 2025-08-31


Wiki Search Terms

control pins
Alarm 11

Controller Board

Custom board

Machine Description

DM542, VFD,…

Input Circuits

-Probe/reset/start/hold on R/C filters, internal pullups activated
-Endstops on TLP521 optocouplers

Configuration file

name: CNC V3 VFD XYYZ
stepping:
  engine: I2S_STREAM
  idle_ms: 250
  pulse_us: 4
  dirdelayus: 0
  disabledelayus: 0
start:
  must_home: false
  check_limits: true
axes:
  x:
    stepspermm: 200
    maxratemmpermin: 2500
    accelerationmmper_sec2: 50
    maxtravelmm: 700
    homing:
      cycle: -1
      positive_direction: false
    motor0:
      limitallpin: gpio.36
      limitnegpin: NO_PIN
      limitpospin: NO_PIN
      hard_limits: true
      pulloff_mm: 1
      standard_stepper:
        step_pin: i2so.3
        direction_pin: i2so.2
        disable_pin: i2so.1
  y:
    stepspermm: 200
    maxratemmpermin: 2500
    accelerationmmper_sec2: 50
    maxtravelmm: 700
    homing:
      cycle: -1
      positive_direction: false
    motor0:
      limitallpin: gpio.39
      limitnegpin: NO_PIN
      limitpospin: NO_PIN
      hard_limits: true
      pulloff_mm: 1
      standard_stepper:
        step_pin: i2so.6
        direction_pin: i2so.5
        disable_pin: i2so.4
    motor1:
      limitallpin: NO_PIN
      limitnegpin: gpio.35
      limitpospin: NO_PIN
      hard_limits: true
      pulloff_mm: 1
      standard_stepper:
        step_pin: i2so.13
        direction_pin: i2so.12
        disable_pin: i2so.11
  z:
    stepspermm: 200
    maxratemmpermin: 1000
    accelerationmmper_sec2: 50
    maxtravelmm: 150
    homing:
      cycle: -1
    motor0:
      limitallpin: NO_PIN
      limitnegpin: NO_PIN
      limitpospin: gpio.34
      hard_limits: true
      pulloff_mm: 1
      standard_stepper:
        step_pin: i2so.10
        direction_pin: i2so.9
        disable_pin: i2so.7
i2so:
  bck_pin: gpio.22
  data_pin: gpio.21
  ws_pin: gpio.17
probe:
  pin: gpio.27:pu:low
  toolsetterpin: NOPIN
  checkmodestart: false
  hard_stop: false
spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18
sdcard:
  carddetectpin: NO_PIN
  cs_pin: gpio.5
10V:
  forward_pin: gpio.15
  reverse_pin: gpio.4
  pwm_hz: 5000
  output_pin: gpio.2
  enablepin: NOPIN
  directionpin: NOPIN
  disablewiths0: false
  s0withdisable: true
  spinup_ms: 0
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0.000% 1000=0.000% 24000=100.000%
  offonalarm: false
Laser:
  tool_num: 1
  output_pin: gpio.14
coolant:
  flood_pin: I2SO.8
  mistpin: NOPIN
  delay_ms: 0
control:
  reset_pin: gpio.26:pu:low
  feedholdpin: gpio.33:pu:low
  cyclestartpin: gpio.25:pu:low

Startup Messages

[MSG:INFO: uart_channel0 created]

[MSG:RST] [MSG:INFO: FluidNC v3.9.8 https://github.com/bdring/FluidNC] [MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty] [MSG:INFO: Local filesystem type is littlefs] [MSG:INFO: Configuration file:CNCV3VFDXYYZ412.yaml] [MSG:INFO: Machine CNC V3 VFD XYYZ] [MSG:INFO: Board None] [MSG:INFO: I2SO BCK:gpio.22 WS:gpio.17 DATA:gpio.21Min Pulse:2us] [MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19] [MSG:INFO: SD Card cspin:gpio.5 detect:NOPIN freq:8000000] [MSG:INFO: Stepping:I2S_STREAM Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:250ms] [MSG:INFO: Axis count 3] [MSG:INFO: Axis X (0.000,700.000)] [MSG:INFO: Motor0] [MSG:INFO: standard_stepper Step:I2SO.3 Dir:I2SO.2 Disable:I2SO.1] [MSG:INFO: All Limit gpio.36] [MSG:INFO: Axis Y (0.000,700.000)] [MSG:INFO: Motor0] [MSG:INFO: standard_stepper Step:I2SO.6 Dir:I2SO.5 Disable:I2SO.4] [MSG:INFO: All Limit gpio.39] [MSG:INFO: Motor1] [MSG:INFO: standard_stepper Step:I2SO.13 Dir:I2SO.12 Disable:I2SO.11] [MSG:INFO: Neg Limit gpio.35] [MSG:INFO: Axis Z (-150.000,0.000)] [MSG:INFO: Motor0] [MSG:INFO: standard_stepper Step:I2SO.10 Dir:I2SO.9 Disable:I2SO.7] [MSG:INFO: Pos Limit gpio.34] [MSG:INFO: reset_pin gpio.26:low:pu] [MSG:INFO: feedholdpin gpio.33:low:pu] [MSG:INFO: cyclestartpin gpio.25:low:pu] [MSG:INFO: Kinematic system: Cartesian] [MSG:INFO: STA SSID is not set] [MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1] [MSG:INFO: AP started] [MSG:INFO: WiFi on] [MSG:INFO: Captive Portal Started] [MSG:INFO: HTTP started on port 80] [MSG:INFO: Telnet started on port 23] [MSG:INFO: 10V Spindle Ena:NOPIN Out:gpio.2 Dir:NOPIN Fwd:gpio.15 Rev:gpio.4 Freq:5000Hz Period:8191] [MSG:INFO: Laser Ena:NO_PIN Out:gpio.14 Freq:5000Hz Period:8191] [MSG:INFO: Flood coolant I2SO.8] [MSG:INFO: Probe gpio.27:low:pu]

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help] [MSG:ERR: reset_pin is active at startup] [MSG:ERR: cyclestartpin is active at startup] [MSG:INFO: ALARM: Control Pin Initially On] ALARM:11 ok [VER:3.9 FluidNC v3.9.8:] [OPT:PHS] [MSG:Machine: CNC V3 VFD XYYZ] [MSG:Mode=AP:SSID=FluidNC:IP=192.168.0.1:MAC=4C-C3-82-BE-DE-B1] ok

User Interface Software

No response

What happened?

Hi,
At startup, i get this message:
[MSG:ERR: reset_pin is active at startup]
[MSG:ERR: cyclestartpin is active at startup]
[MSG:INFO: ALARM: Control Pin Initially On]
ALARM:11
my control pins and probe are mounted with R/C filters
If i desactivate the alarm, i get the same alarm when i push on the reset switch
If i put reset button on the optocoupler circuit instead of a limit switch, i don’t get Alarm at startup, but i still get the same alarm when i touch the reset button.
I use this board for 4 years with “GRBL esp32” with no problem, i only get this problem since i installed FluidNC.
All my switches work well in the “calibrate” section of the FluidNC installer .
I tried with another ESP vroom32, with older FluidNC version, same result.
Thank for your help ;)

GCode File

No response

Other Information

No response


评论 (18)

#1 – bdring 于 2025-08-31

You have a switch that is active at startup. All switches except for the door switch should be momentary that activate when pushed.

You can see what is active with the ? command.

Change the :low to :high in the switch config values.

http://wiki.fluidnc.com/en/config/control#initial-state


#2 – Cyberhornet34 于 2025-08-31

Thanks for fast reply,
I would love that would be so simple !
here my ? command:
if i define :high, all switches are trigered ! :low is a good configuration


#3 – Cyberhornet34 于 2025-08-31

Sometimes i don’t get Alarm at startup, i get IDLE but when i touch reset switch, even few minutes after startup, i get:
[MSG:ERR: reset_pin is active at startup]
[MSG:INFO: ALARM: Control Pin Initially On]
ALARM:11


#4 – MitchBradley 于 2025-08-31

Are you using external pullups on the control pins, or depending on the internal pullups? If you are using the internal pullups, the RC time constant could be quite long. What is the filter capacitor value?


#5 – Cyberhornet34 于 2025-08-31

Hi Mitch,
Yes i’m using internal pullups on control pins
I’m using a R/C filter (low pass) with a 100R resistors and 100nf capacitors.

here’s my old config that worked well in GRBL ESP32

// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
// normally-closed switches on the specified pins, rather than the default normally-open switches.
// The mask order is ...
// Macro3 | Macro2 | Macro 1| Macr0 |Cycle Start | Feed Hold | Reset | Safety Door
// For example B1101 will invert the function of the Reset pin.
#define INVERTCONTROLPIN_MASK B00001111

#define ENABLECONTROLSW_DEBOUNCE // Default disabled. Uncomment to enable. #define CONTROLSWDEBOUNCE_PERIOD 32 // in milliseconds default 32 microseconds


#6 – MitchBradley 于 2025-08-31

FluidNC has a fixed debounce period of 5 ms. The internal pullup can be as high as 100K, which results in a 10 ms time constant. Using an internal pullup for any signal that is potentially connected to an external device is problematic. Add 10K pullups to your circuit.


#7 – Cyberhornet34 于 2025-08-31

I just tested to add 10K pullups instead of internal one, i get the same issue…
By the way, when i put reset pin on the opto circuit (who as external 10k pullup), i never get Alarm at startup, but i still get Alarm11 when i trigger reset switch after startup.
I’m going to go crazy !

!Image


#8 – bdring 于 2025-08-31

Show the console text on the reset.

I cannot test until late tomorrow.


#9 – MitchBradley 于 2025-08-31

We probably need to special-case the check for reset active on restart.


#10 – Cyberhornet34 于 2025-08-31

when i trigger reset switch, i get this:

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help]
[MSG:ERR: reset_pin is active at startup]
[MSG:INFO: ALARM: Control Pin Initially On]
ALARM:11

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help]

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help]


#11 – MitchBradley 于 2025-08-31

I think I know what is happening. It will take me awhile to fix it because I am working on something else right now.


#12 – Cyberhornet34 于 2025-09-01

Thank you for everything you do, Bart and you.


#13 – bdring 于 2025-09-01

I did a little testing and the control pins appear to be working as designed.

Try sending the $message/level=debug command. It will show you all switch state changes. This will show you if the state is changing due to noise, etc.


#14 – Cyberhornet34 于 2025-09-01

Hi Bart,
The startup issue i got cames from noise on R/C entries and FLuidNC who have not the same level of debounce than GRBL ESP32. (i’ll redo a new board with all opto entries)
I put probe/reset/start/hold on opto entries of my board (instead of endstops) and i don’t get any issue at startup, BUT, when i’m triggering the reset switch, i still get the Alarm

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help]
ok
[MSG:DBG: reset_pin 1]

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help] [MSG:ERR: reset_pin is active at startup] [MSG:DBG: reset_pin 0] [MSG:INFO: ALARM: Control Pin Initially On] ALARM:11

A friend with a different board get the same issue when triggering reset_pin, its board has entries with opto+shmidt triggers, external pullups…. well protected !
We only get issue with Reset_pin. No problem with probe,start, hold…


#15 – MitchBradley 于 2025-09-01

As I said, I think I know the cause of the problem. I just need to find time to fix it. I am doing many other things at the moment.


#16 – Cyberhornet34 于 2025-09-01

Thank you Mitch :)


#17 – HTheatre 于 2025-09-01

Hi Bart and Mitch,

I’m the Cyberhornet34’s friend. Don’t worry Mitch. we red you and understood you are working on many other things at the same time. We’ll be patient. So, my post is only for information which could help you and confirm your analisys.

Here is my controller board’s schematic.

Here is my config.yaml file.

board: SixDeCNC
name: XYZABC external drivers
meta: (09/01/2025) By HTheatre

arctolerancemm: 0.002 junctiondeviationmm: 0.010 verbose_errors: false report_inches: false enableparkingoverride_control: false uselinenumbers: false

start: must_home: false deactivate_parking: false check_limits: true

stepping: engine: I2S_STREAM idle_ms: 250 pulse_us: 4 dirdelayus: 0 disabledelayus: 0 segments: 12

axes: sharedstepperdisablepin: NOPIN x: stepspermm: 60.000 maxratemmpermin: 2500.000 accelerationmmper_sec2: 80.000 maxtravelmm: 550.000 soft_limits: false homing: cycle: 2 allowsingleaxis: true positive_direction: false mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.33:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.1 direction_pin: I2SO.3 step_pin: I2SO.5

y: stepspermm: 60.000 maxratemmpermin: 2500.000 accelerationmmper_sec2: 80.000 maxtravelmm: 570.000 soft_limits: false homing: cycle: 2 allowsingleaxis: true positive_direction: false mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.32:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.7 direction_pin: I2SO.9 step_pin: I2SO.11

z: stepspermm: 400.000 maxratemmpermin: 1000.000 accelerationmmper_sec2: 50.000 maxtravelmm: 100.000 soft_limits: false homing: cycle: 1 allowsingleaxis: true positive_direction: true mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.35:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.13 direction_pin: I2SO.14 step_pin: I2SO.15

a: stepspermm: 100.000 maxratemmpermin: 1000.000 accelerationmmper_sec2: 80.000 maxtravelmm: 300.000 soft_limits: false homing: cycle: 0 allowsingleaxis: false positive_direction: false mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.34:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.0 direction_pin: I2SO.2 step_pin: I2SO.4

b: stepspermm: 100.000 maxratemmpermin: 1000.000 accelerationmmper_sec2: 80.000 maxtravelmm: 300.000 soft_limits: false homing: cycle: 0 allowsingleaxis: false positive_direction: false mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.39:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.6 direction_pin: I2SO.8 step_pin: I2SO.10

c: stepspermm: 100.000 maxratemmpermin: 1000.000 accelerationmmper_sec2: 80.000 maxtravelmm: 300.000 soft_limits: false homing: cycle: 0 allowsingleaxis: false positive_direction: false mpos_mm: 0 seekmmper_min: 2000.000 feedmmper_min: 200.000 settle_ms: 250 seek_scaler: 1.100 feed_scaler: 1.100

motor0: limitnegpin: NO_PIN limitpospin: NO_PIN limitallpin: gpio.36:low hard_limits: false pulloff_mm: 2.000 standard_stepper: disable_pin: I2SO.12 direction_pin: I2SO.16 step_pin: I2SO.17

i2so: bck_pin: gpio.22 data_pin: gpio.21 ws_pin: gpio.17

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

sdcard: cs_pin: gpio.5 carddetectpin: NO_PIN

control: safetydoorpin: NO_PIN reset_pin: gpio.16:low feedholdpin: gpio.4:low cyclestartpin: gpio.26:low macro0pin: NOPIN macro1pin: NOPIN macro2pin: NOPIN macro3pin: NOPIN

coolant: flood_pin: I2SO.19 mist_pin: I2SO.18 delay_ms: 0

probe: pin: gpio.27 checkmodestart: true

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

SERVO RC

user_outputs: analog0_pin: gpio.25 analog1_pin: gpio.12 #analog2_pin: gpio.13 analog2pin: NOPIN #analog3_pin: gpio.15 analog3pin: NOPIN analog0_hz: 50 analog1_hz: 50 analog2_hz: 50 analog3_hz: 50 digital0_pin: I2SO.23 digital1_pin: I2SO.22 digital2pin: NOPIN digital3pin: NOPIN

SPINDLE

10V: forward_pin: I2SO.20 reverse_pin: I2SO.21 pwm_hz: 2000 output_pin: gpio.2 enable_pin: I2SO.24 directionpin: NOPIN disablewiths0: false s0withdisable: true spinup_ms: 0 spindown_ms: 0 tool_num: 0 speed_map: 0=0.000% 4999=0.000% 5000=5.000% 5001=10.000% 25000=100.000%

LASER

Laser: pwm_hz: 2000 output_pin: gpio.14:low enablepin: NOPIN disablewiths0: false s0withdisable: true tool_num: 100 speed_map: 0=0.000% 1000=100.000% offonalarm: true

Here is the start sequence of FluidNC: no error or warning messages. I only have something wrong on the Z endstop entry. I will fix it. This is probably due to a defective endstop switch.

[MSG:INFO: FluidNC v3.9.8 https://github.com/bdring/FluidNC]
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:config.yaml]
[MSG:INFO: Machine XYZABC external drivers]
[MSG:INFO: Board SixDeCNC]
[MSG:INFO: I2SO BCK:gpio.22 WS:gpio.17 DATA:gpio.21Min Pulse:2us]
[MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
[MSG:INFO: SD Card cspin:gpio.5 detect:NOPIN freq:8000000]
[MSG:INFO: Stepping:I2S_STREAM Pulse:4us Dsbl Delay:0us Dir Delay:0us Idle Delay:250ms]
[MSG:INFO: User Digital Output: 0 on Pin:I2SO.23]
[MSG:INFO: User Digital Output: 1 on Pin:I2SO.22]
[MSG:INFO: User Analog Output: 0 on Pin:gpio.25 Freq:50Hz]
[MSG:INFO: User Analog Output: 1 on Pin:gpio.12 Freq:50Hz]
[MSG:INFO: Axis count 6]
[MSG:INFO: Axis X (0.000,550.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.5 Dir:I2SO.3 Disable:I2SO.1]
[MSG:INFO:  All Limit gpio.33:low]
[MSG:INFO: Axis Y (0.000,570.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.11 Dir:I2SO.9 Disable:I2SO.7]
[MSG:INFO:  All Limit gpio.32:low]
[MSG:INFO: Axis Z (-100.000,0.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.15 Dir:I2SO.14 Disable:I2SO.13]
[MSG:INFO:  All Limit gpio.35:low]
[MSG:INFO: Axis A (0.000,300.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.4 Dir:I2SO.2 Disable:I2SO.0]
[MSG:INFO:  All Limit gpio.34:low]
[MSG:INFO: Axis B (0.000,300.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.10 Dir:I2SO.8 Disable:I2SO.6]
[MSG:INFO:  All Limit gpio.39:low]
[MSG:INFO: Axis C (0.000,300.000)]
[MSG:INFO:   Motor0]
[MSG:INFO:     standard_stepper Step:I2SO.17 Dir:I2SO.16 Disable:I2SO.12]
[MSG:INFO:  All Limit gpio.36:low]
[MSG:INFO: reset_pin gpio.16:low]
[MSG:INFO: feedholdpin gpio.4:low]
[MSG:INFO: cyclestartpin gpio.26:low]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: STA SSID is not set]
[MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1]
[MSG:INFO: AP started]
[MSG:INFO: WiFi on]
[MSG:INFO: Captive Portal Started]
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: 10V Spindle Ena:I2SO.24 Out:gpio.2 Dir:NO_PIN Fwd:I2SO.20 Rev:I2SO.21 Freq:2000Hz Period:32767]
[MSG:INFO: Laser Ena:NO_PIN Out:gpio.14:low Freq:2000Hz Period:32767]
[MSG:INFO: Flood coolant I2SO.19]
[MSG:INFO: Mist coolant I2SO.18]
[MSG:INFO: Probe gpio.27]
ok

And finally, here is the alarm message I get when I press the RESET button. I use momentary and normally closed switches on all the X, Y, Z, A, B, C (endstops), START and HOLD entries.


SixDeCNCschematic.pdf

SixDeCNCschematic.pdf

Grbl 3.9 [FluidNC v3.9.8 (wifi) '$' for help] $Report/Interval=300 [MSG:WARN:: Active limit switch on Z axis motor 0] [MSG:ERR: reset_pin is active at startup] [MSG:INFO: ALARM: Control Pin Initially On] ALARM:11 ALARM:11 [MSG:INFO: websocket auto report interval set to 300 ms] ok [GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]

Thank you for all the fantastic job you do guys!


#18 – Cyberhornet34 于 2025-09-20

Hi Mitch !
I come to get news after 3 weeks.
Did you take the time to take a look on the issue when reset button is pressed ?
Thank you :)


原始Issue: https://github.com/bdring/FluidNC/issues/1556

喜欢 (0)