bdring / FluidNC

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

Problem: Run Macro $X when Alarm #1368

Open agoy507 opened 2 weeks ago

agoy507 commented 2 weeks ago

Wiki Search Terms

Run Macro Via Switch

Controller Board

ESP32 Dev Controller V4

Machine Description

Router using External driver & without Display for control

Input Circuits

No response

Configuration file

name: "ESP32 Dev Controller V4"
board: "ESP32 Dev Controller V4"

stepping:
  engine: RMT
  idle_ms: 250
  dir_delay_us: 1
  pulse_us: 2
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: NO_PIN

  x:
    steps_per_mm: 800
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 25
    soft_limits: true
    max_travel_mm: 790
    homing:
      cycle: 2
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
      positive_direction: false

    motor0:
      limit_neg_pin: gpio.2:low:pu
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      stepstick:
        direction_pin: gpio.12
        step_pin: gpio.13
        disable_pin: NO_PIN
    motor1:
      null_motor:

  y:
    steps_per_mm: 800
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 25
    max_travel_mm: 790
    soft_limits: true
    homing:
      cycle: 2
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
      positive_direction: false

    motor0:
      limit_neg_pin: gpio.4:low:pu
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      stepstick:
        direction_pin: gpio.27
        step_pin: gpio.14
        disable_pin: NO_PIN
    motor1:
      null_motor:

  z:
    steps_per_mm: 800
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 25
    max_travel_mm: 150
    soft_limits: true
    homing:
      cycle: 2
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
      positive_direction: false

    motor0:
      limit_neg_pin: gpio.16:low:pu
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      stepstick:
        direction_pin: gpio.25
        step_pin: gpio.26
        disable_pin: NO_PIN
    motor1:
      null_motor:

  a:
    steps_per_mm: 800
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 25
    homing:
      cycle: 0
      feed_mm_per_min: 100.000
      seek_mm_per_min: 500.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100
      positive_direction: false

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      stepstick:
        direction_pin: gpio.32
        step_pin: gpio.33
        disable_pin: NO_PIN
    motor1:
      null_motor:

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

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN

coolant:
  flood_pin: NO_PIN
  mist_pin:  NO_PIN

control:
  safety_door_pin: gpio.35:low
  reset_pin: NO_PIN
  feed_hold_pin: gpio.36:low
  cycle_start_pin: gpio.39:low
  macro0_pin: gpio.34:low
  macro1_pin: NO_PIN
  macro2_pin: gpio.17:low:pu
  macro3_pin: NO_PIN
  fault_pin: NO_PIN
  estop_pin: NO_PIN

macros:
  startup_line0:
  startup_line1:
  macro0:$H&90&G53G0Z-1&G0X0Y0
  macro1:$SD/Run=drill.nc
  macro2:$X
  macro3:$Alarm/Disable

probe:
  pin: NO_PIN

start:
  must_home: false
  deactivate_parking: false
  check_limits: false

status_outputs:
  report_interval_ms: 500
  idle_pin: gpio.15
  run_pin: gpio.21:low
  hold_pin: NO_PIN
  alarm_pin: gpio.22

Startup Messages

09:44:09.501 -> ets Jul 29 2019 12:21:46
09:44:09.501 -> 
09:44:09.501 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
09:44:09.501 -> configsip: 0, SPIWP:0xee
09:44:09.501 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
09:44:09.535 -> mode:DIO, clock div:1
09:44:09.535 -> load:0x3fff0030,len:1184
09:44:09.535 -> load:0x40078000,len:13260
09:44:09.535 -> load:0x40080400,len:3028
09:44:09.535 -> entry 0x400805e4
09:44:10.179 -> [MSG:INFO: uart_channel0 created]
09:44:10.179 -> [MSG:RST]
09:44:10.179 -> [MSG:INFO: FluidNC v3.8.3 https://github.com/bdring/FluidNC]
09:44:10.179 -> [MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
09:44:10.179 -> [MSG:INFO: Local filesystem type is littlefs]
09:44:10.213 -> [MSG:INFO: Configuration file:4axis.yaml]
09:44:10.213 -> [MSG:INFO: Machine ESP32 Dev Controller V4]
09:44:10.213 -> [MSG:INFO: Board ESP32 Dev Controller V4]
09:44:10.213 -> [MSG:INFO: SPI SCK:gpio.18 MOSI:gpio.23 MISO:gpio.19]
09:44:10.213 -> [MSG:INFO: SD Card cs_pin:gpio.5 detect:NO_PIN freq:8000000]
09:44:10.213 -> [MSG:INFO: Stepping:RMT Pulse:2us Dsbl Delay:0us Dir Delay:1us Idle Delay:250ms]
09:44:10.247 -> [MSG:INFO: Axis count 4]
09:44:10.247 -> [MSG:INFO: Axis X (0.000,790.000)]
09:44:10.247 -> [MSG:INFO:   Motor0]
09:44:10.247 -> [MSG:INFO:     stepstick Step:gpio.13 Dir:gpio.12 Disable:NO_PIN]
09:44:10.247 -> [MSG:INFO:  X Neg Limit gpio.2:low:pu]
09:44:10.247 -> [MSG:INFO:   Motor1]
09:44:10.247 -> [MSG:INFO: Axis Y (0.000,790.000)]
09:44:10.247 -> [MSG:INFO:   Motor0]
09:44:10.247 -> [MSG:INFO:     stepstick Step:gpio.14 Dir:gpio.27 Disable:NO_PIN]
09:44:10.281 -> [MSG:INFO:  Y Neg Limit gpio.4:low:pu]
09:44:10.281 -> [MSG:INFO:   Motor1]
09:44:10.281 -> [MSG:INFO: Axis Z (0.000,150.000)]
09:44:10.281 -> [MSG:INFO:   Motor0]
09:44:10.281 -> [MSG:INFO:     stepstick Step:gpio.26 Dir:gpio.25 Disable:NO_PIN]
09:44:10.281 -> [MSG:INFO:  Z Neg Limit gpio.16:low:pu]
09:44:10.281 -> [MSG:INFO:   Motor1]
09:44:10.281 -> [MSG:INFO: Axis A (0.000,1000.000)]
09:44:10.281 -> [MSG:INFO:   Motor0]
09:44:10.281 -> [MSG:INFO:     stepstick Step:gpio.33 Dir:gpio.32 Disable:NO_PIN]
09:44:10.315 -> [MSG:INFO:   Motor1]
09:44:10.315 -> [MSG:INFO: safety_door_pin gpio.35:low]
09:44:10.315 -> [MSG:INFO: feed_hold_pin gpio.36:low]
09:44:10.315 -> [MSG:INFO: cycle_start_pin gpio.39:low]
09:44:10.315 -> [MSG:INFO: macro0_pin gpio.34:low]
09:44:10.315 -> [MSG:INFO: macro1_pin gpio.17:low:pu]
09:44:10.315 -> [MSG:INFO: Kinematic system: Cartesian]
09:44:10.315 -> [MSG:INFO: STA SSID is not set]
09:44:10.519 -> [MSG:INFO: AP SSID FluidNC IP 192.168.0.1 mask 255.255.255.0 channel 1]
09:44:10.519 -> [MSG:INFO: AP started]
09:44:10.519 -> [MSG:INFO: WiFi on]
09:44:10.519 -> [MSG:INFO: Captive Portal Started]
09:44:10.519 -> [MSG:INFO: HTTP started on port 80]
09:44:10.655 -> [MSG:INFO: Telnet started on port 23]
09:44:10.689 -> [MSG:INFO: Status outputs Interval:500 Idle:gpio.15 Cycle:gpio.21:low Hold:NO_PIN Alarm:gpio.22]
09:44:10.689 -> 
09:44:10.689 -> Grbl 3.8 [FluidNC v3.8.3 (wifi) '$' for help]

User Interface Software

No response

What happened?

I am trying to clear the Alarm (unlock) Using CMD, the command is $X. if I want to clear the Alarm using a switch control connected to the macro Pin. However, when the alarm is triggered and I press the switch, the alarm does not clear—perhaps this is related to permissions in the firmware. Is there another way to clear the alarm (unlock) using a switch?

GCode File

No response

Other Information

No response