Wiki Search Terms
IO Expanders
Controller Board
MKS DLC32
Machine Description
3-axis engraver
Input Circuits
Configuration file
board: MKS-DLC32 V2.1
name: CNC3018
meta: (31.07.2023) by DmiZar
stepping:
engine: I2S_STATIC
idle_ms: 255
pulse_us: 4
dirdelayus: 1
disabledelayus: 0
segments: 12uart1:
txd_pin: gpio.0
rxd_pin: gpio.4
rtspin: NOPIN
ctspin: NOPIN
baud: 1000000
mode: 8N1
passthrough_baud: 0
passthrough_mode: 8E1
uart2:
txd_pin: gpio.25
rxd_pin: gpio.33
rtspin: NOPIN
ctspin: NOPIN
baud: 115200
mode: 8N1
passthrough_baud: 0
passthrough_mode: 8E1
uart_channel1:
reportintervalms: 200
uart_num: 1
message_level: Info
i2so:
bck_pin: gpio.16
data_pin: gpio.21
ws_pin: gpio.17
minpulseus: 2
spi:
miso_pin: gpio.12
mosi_pin: gpio.13
sck_pin: gpio.14
sdcard:
cs_pin: gpio.15
carddetectpin: gpio.39
frequency_hz: 8000000
kinematics:
Cartesian:
axes:
sharedstepperdisable_pin: I2SO.0
sharedstepperresetpin: NOPIN
homing_runs: 2
x:
stepspermm: 800.000000
maxratemmpermin: 3000.000000
accelerationmmper_sec2: 200.000000
maxtravelmm: 262.000000
soft_limits: true
homing:
cycle: 2
allowsingleaxis: true
positive_direction: true
mpos_mm: 0.000000
feedmmper_min: 50.000000
seekmmper_min: 3000.000000
settle_ms: 100
seek_scaler: 1.100000
feed_scaler: 1.100000
motor0:
limitnegpin: uart_channel1.4:low
limitpospin: gpio.36
limitallpin: NO_PIN
hard_limits: true
pulloff_mm: 2.000000
tmc_2209:
addr: 0
cspin: NOPIN
uart_num: 2
step_pin: I2SO.1
direction_pin: I2SO.2:low
disablepin: NOPIN
rsenseohms: 0.110000
run_amps: 1.300000
hold_amps: 0.500000
microsteps: 16
toff_disable: 0
toff_stealthchop: 5
use_enable: false
run_mode: CoolStep
homing_mode: CoolStep
homing_amps: 0.500000
stallguard: 0
stallguard_debug: false
toff_coolstep: 3
y:
stepspermm: 800.000000
maxratemmpermin: 3000.000000
accelerationmmper_sec2: 200.000000
maxtravelmm: 178.000000
soft_limits: true
homing:
cycle: 2
allowsingleaxis: true
positive_direction: true
mpos_mm: 0.000000
feedmmper_min: 50.000000
seekmmper_min: 3000.000000
settle_ms: 100
seek_scaler: 1.100000
feed_scaler: 1.100000
motor0:
limitnegpin: uart_channel1.5:low
limitpospin: gpio.35
limitallpin: NO_PIN
hard_limits: true
pulloff_mm: 3.500000
tmc_2209:
addr: 1
cspin: NOPIN
uart_num: 2
step_pin: I2SO.5
direction_pin: I2SO.6:low
disablepin: NOPIN
rsenseohms: 0.110000
run_amps: 1.300000
hold_amps: 0.500000
microsteps: 16
toff_disable: 0
toff_stealthchop: 5
use_enable: false
run_mode: CoolStep
homing_mode: CoolStep
homing_amps: 0.500000
stallguard: 0
stallguard_debug: false
toff_coolstep: 3
z:
stepspermm: 800.000000
maxratemmpermin: 3000.000000
accelerationmmper_sec2: 200.000000
maxtravelmm: 79.000000
soft_limits: true
homing:
cycle: 1
allowsingleaxis: true
positive_direction: true
mpos_mm: 0.000000
feedmmper_min: 50.000000
seekmmper_min: 3000.000000
settle_ms: 100
seek_scaler: 1.100000
feed_scaler: 1.100000
motor0:
limitnegpin: uart_channel1.6:low
limitpospin: gpio.34
limitallpin: NO_PIN
hard_limits: true
pulloff_mm: 2.000000
tmc_2209:
addr: 2
cspin: NOPIN
uart_num: 2
step_pin: I2SO.3
direction_pin: I2SO.4
disablepin: NOPIN
rsenseohms: 0.110000
run_amps: 1.300000
hold_amps: 0.500000
microsteps: 16
toff_disable: 0
toff_stealthchop: 5
use_enable: false
run_mode: CoolStep
homing_mode: CoolStep
homing_amps: 0.500000
stallguard: 0
stallguard_debug: false
toff_coolstep: 3
control:
safetydoorpin: gpio.23
resetpin: NOPIN
feedholdpin: gpio.18
cyclestartpin: gpio.19
macro0pin: NOPIN
macro1pin: NOPIN
macro2pin: NOPIN
macro3pin: NOPIN
faultpin: NOPIN
estoppin: uartchannel1.3
homingbuttonpin: NO_PIN
coolant:
flood_pin: gpio.5:low
mistpin: uartchannel1.8
delay_ms: 0
probe:
pin: gpio.22
toolsetterpin: uartchannel1.2
checkmodestart: true
hard_stop: true
macros:
startup_line0:
startup_line1:
Macro0: G21G91&G38.2Z-80F100&G0Z1&G38.2Z-2F10&G92Z0.00&G0Z1&G90
Macro1:
Macro2:
Macro3:
after_homing: M64P0&G4P0.1&M65P0&$Report/Interval=200
after_reset:
after_unlock: M64P0&G4P0.1&M65P0&$Report/Interval=200
start:
must_home: true
deactivate_parking: false
check_limits: false
parking:
enable: true
axis: Z
targetmposmm: 0.000000
ratemmper_min: 2000.000000
pulloutdistancemm: 5.000000
pulloutratemmpermin: 500.000000
user_outputs:
analog0pin: uartchannel1.16
analog1pin: uartchannel1.17
analog2pin: NOPIN
analog3pin: NOPIN
analog0_hz: 5000
analog1_hz: 5000
analog2_hz: 5000
analog3_hz: 5000
digital0_pin: I2SO.7
digital1pin: uartchannel1.9
digital2pin: uartchannel1.10
digital3pin: NOPIN
digital4pin: uartchannel1.12
digital5pin: uartchannel1.13
digital6pin: uartchannel1.14
digital7pin: uartchannel1.15
user_inputs:
analog0pin: NOPIN
analog1pin: NOPIN
analog2pin: NOPIN
analog3pin: NOPIN
digital0pin: uartchannel1.0:low
digital1pin: NOPIN
digital2pin: NOPIN
digital3pin: NOPIN
digital4pin: NOPIN
digital5pin: NOPIN
digital6pin: NOPIN
digital7pin: NOPIN
atc_manual:
safezmpos_mm: 0.000000
probeseekratemmper_min: 500.000000
probefeedratemmper_min: 50.000000
changemposmm: -260.000 -170.000 0.000
etsmposmm: -250.000 -7.000 -50.000
etsrapidzmposmm: -0.000000
PWM:
pwm_hz: 1000
directionpin: uartchannel1.11
output_pin: gpio.32
enablepin: NOPIN
disablewiths0: false
spinup_ms: 1000
spindown_ms: 1000
tool_num: 0
speed_map: 0=0.00% 0=30.00% 10000=100.00%
offonalarm: true
atc: atc_manual
m6_macro:
s0withdisable: true
Laser:
pwm_hz: 1000
output_pin: gpio.26
enablepin: NOPIN
disablewiths0: false
tool_num: 100
speed_map: 0=0.00% 255=100.00%
offonalarm: true
atc:
m6_macro:
s0withdisable: true
arctolerancemm: 0.002000
junctiondeviationmm: 0.010000
verbose_errors: true
report_inches: false
enableparkingoverride_control: false
uselinenumbers: false
planner_blocks: 16
Startup Messages
[MSG:ERR: Showing startup log from previous panic]
[MSG:INFO: FluidNC v3.9.9 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:MyMKSDLC32212209_Exp.yaml]
[MSG:INFO: Machine CNC3018]
[MSG:INFO: Board MKS-DLC32 V2.1]
[MSG:INFO: UART1 Tx:gpio.0 Rx:gpio.4 RTS:NO_PIN Baud:1000000]
[MSG:INFO: UART2 Tx:gpio.25 Rx:gpio.33 RTS:NO_PIN Baud:115200]
[MSG:INFO: uart_channel1 created at report interval: 200]
[MSG:INFO: IO Expander BOARD:Airedale v1.1,FW:v1.0]
[MSG:INFO: I2SO BCK:gpio.16 WS:gpio.17 DATA:gpio.21Min Pulse:2us]
[MSG:INFO: SPI SCK:gpio.14 MOSI:gpio.13 MISO:gpio.12]
[MSG:INFO: SD Card cs_pin:gpio.15 detect:gpio.39 freq:8000000]
[MSG:INFO: Stepping:I2S_STATIC Pulse:4us Dsbl Delay:0us Dir Delay:1us Idle Delay:255ms]
[MSG:INFO: User Digital Output: 0 on Pin:I2SO.7]
[MSG:INFO: User Digital Output: 1 on Pin:uart_channel1.9]
[MSG:INFO: User Digital Output: 2 on Pin:uart_channel1.10]
[MSG:INFO: User Digital Output: 4 on Pin:uart_channel1.12]
[MSG:INFO: User Digital Output: 5 on Pin:uart_channel1.13]
[MSG:INFO: User Digital Output: 6 on Pin:uart_channel1.14]
[MSG:INFO: User Digital Output: 7 on Pin:uart_channel1.15]
[MSG:INFO: User Analog Output: 0 on Pin:uart_channel1.16 Freq:5000Hz]
[MSG:INFO: User Analog Output: 1 on Pin:uart_channel1.17 Freq:5000Hz]
[MSG:INFO: User Digital Input: digital0pin on Pin uartchannel1.0:low]
[MSG:INFO: Axis count 3]
[MSG:INFO: Shared stepper disable I2SO.0]
[MSG:INFO: Axis X (-262.000,0.000)]
[MSG:INFO: Motor0]
[MSG:INFO: tmc2209 UART2 Addr:0 CS:NOPIN Step:I2SO.1 Dir:I2SO.2:low Disable:NO_PIN R:0.110]
[MSG:INFO: Neg Limit uart_channel1.4:low]
[MSG:ERR: IO Expander is unresponsive]
[MSG:ERR: Critical error in maininit: Expander pin configuration failed: uartchannel1 io.4=in,low]
User Interface Software
No response
What happened?
I made an IO Expander based on BluePill. When I start FluidNC, I get the error:
[MSG:ERR: IO Expander is unresponsive]
[MSG:ERR: Critical error in maininit: Expander pin configuration failed: uartchannel1 io.4=in,low].
I assumed that the expander wasn’t responding to FluidNC’s request in time. But perhaps there’s a different reason.
However, I tried increasing the delay time in UartChanel.cpp from delayus(100) to delayms(100):
bool UartChannel::setAttr(int index, bool* value, const std::string& attrString) {
out(attrString, “EXP:”);
_ackwait = 1;
for (int i = 0; i < 20; i++) {
pollLine(nullptr);
if (_ackwait < 1) {
return _ackwait == 0;
}
delayms(100); // delayus(100)
}
_ackwait = 0;
log_error(“IO Expander is unresponsive”);
return false;
}
The error no longer appears:
[MSG:INFO: FluidNC v3.9.9 https://github.com/bdring/FluidNC.git%5D
[MSG:INFO: Compiled with ESP32 SDK:v4.4.7-dirty]
[MSG:INFO: Local filesystem type is littlefs]
[MSG:INFO: Configuration file:MyMKSDLC32212209_Exp.yaml]
[MSG:INFO: Machine CNC3018]
[MSG:INFO: Board MKS-DLC32 V2.1]
[MSG:INFO: UART1 Tx:gpio.0 Rx:gpio.4 RTS:NO_PIN Baud:1000000]
[MSG:INFO: UART2 Tx:gpio.25 Rx:gpio.33 RTS:NO_PIN Baud:115200]
[MSG:INFO: uart_channel1 created at report interval: 200]
[MSG:INFO: IO Expander BOARD:Airedale v1.1,FW:v1.0]
[MSG:INFO: I2SO BCK:gpio.16 WS:gpio.17 DATA:gpio.21Min Pulse:2us]
[MSG:INFO: SPI SCK:gpio.14 MOSI:gpio.13 MISO:gpio.12]
[MSG:INFO: SD Card cs_pin:gpio.15 detect:gpio.39 freq:8000000]
[MSG:INFO: Stepping:I2S_STATIC Pulse:4us Dsbl Delay:0us Dir Delay:1us Idle Delay:255ms]
[MSG:INFO: User Digital Output: 0 on Pin:I2SO.7]
[MSG:INFO: User Digital Output: 1 on Pin:uart_channel1.9]
[MSG:INFO: User Digital Output: 2 on Pin:uart_channel1.10]
[MSG:INFO: User Digital Output: 4 on Pin:uart_channel1.12]
[MSG:INFO: User Digital Output: 5 on Pin:uart_channel1.13]
[MSG:INFO: User Digital Output: 6 on Pin:uart_channel1.14]
[MSG:INFO: User Digital Output: 7 on Pin:uart_channel1.15]
[MSG:INFO: User Analog Output: 0 on Pin:uart_channel1.16 Freq:5000Hz]
[MSG:INFO: User Analog Output: 1 on Pin:uart_channel1.17 Freq:5000Hz]
[MSG:INFO: User Digital Input: digital0pin on Pin uartchannel1.0:low]
[MSG:INFO: Axis count 3]
[MSG:INFO: Shared stepper disable I2SO.0]
[MSG:INFO: Axis X (-262.000,0.000)]
[MSG:INFO: Motor0]
[MSG:INFO: tmc2209 UART2 Addr:0 CS:NOPIN Step:I2SO.1 Dir:I2SO.2:low Disable:NO_PIN R:0.110]
[MSG:INFO: Neg Limit uart_channel1.4:low]
[MSG:INFO: Pos Limit gpio.36]
[MSG:INFO: Axis Y (-178.000,0.000)]
[MSG:INFO: Motor0]
[MSG:INFO: tmc2209 UART2 Addr:1 CS:NOPIN Step:I2SO.5 Dir:I2SO.6:low Disable:NO_PIN R:0.110]
[MSG:INFO: Neg Limit uart_channel1.5:low]
[MSG:INFO: Pos Limit gpio.35]
[MSG:INFO: Axis Z (-79.000,0.000)]
[MSG:INFO: Motor0]
[MSG:INFO: tmc2209 UART2 Addr:2 CS:NOPIN Step:I2SO.3 Dir:I2SO.4 Disable:NO_PIN R:0.110]
[MSG:INFO: Neg Limit uart_channel1.6:low]
[MSG:INFO: Pos Limit gpio.34]
[MSG:INFO: X Axis driver test passed]
[MSG:INFO: Y Axis driver test passed]
[MSG:INFO: Z Axis driver test passed]
[MSG:INFO: safetydoorpin gpio.23]
[MSG:INFO: feedholdpin gpio.18]
[MSG:INFO: cyclestartpin gpio.19]
[MSG:INFO: estoppin uartchannel1.3]
[MSG:INFO: Kinematic system: Cartesian]
[MSG:INFO: Connecting to STA SSID:Keenetic-7527]
[MSG:INFO: Connecting.]
[MSG:INFO: Connecting..]
[MSG:INFO: Connected – IP is 192.168.2.120]
[MSG:INFO: WiFi on]
[MSG:INFO: Start mDNS with hostname:http://fluidnc.local/%5D
[MSG:INFO: HTTP started on port 80]
[MSG:INFO: Telnet started on port 23]
[MSG:INFO: ATC:atc_manual]
[MSG:INFO: PWM Spindle Ena:NOPIN Out:gpio.32 Dir:uartchannel1.11 Freq:1000Hz Period:65535 atc:atc_manual]
[MSG:INFO: Laser Ena:NO_PIN Out:gpio.26 Freq:1000Hz Period:65535]
[MSG:INFO: Flood coolant gpio.5:low]
[MSG:INFO: Mist coolant uart_channel1.8]
[MSG:INFO: Probe gpio.22]
[MSG:INFO: Toolsetter uart_channel1.2]
Grbl 3.9 [FluidNC v3.9.9 (wifi) ‘$’ for help]
[MSG:INFO: ALARM: Unhomed]
ALARM:14
[MSG:INFO: uart_channel1 auto report interval set to 200 ms]
The machine is working correctly.
There may be better ways to resolve this error.
Thank you for your attention to this issue.
GCode File
No response
Other Information
No response