terjeio / ioSender

A GCode Sender for Grbl and grblHAL written in C# (Windows only).
BSD 3-Clause "New" or "Revised" License
207 stars 65 forks source link

Settings restore - errors #363

Closed boboxx closed 3 months ago

boboxx commented 4 months ago

When doing a restore of grblhal config using ioSender (latest) there are lots of errors.

Settings: $170=0.000 returned error:53 $172=0.000 returned error:53 $370=2 returned error:52 $395=1 returned ALARM:14

GrblHAL 1.1f ['$' or '$HELP' for help] [MSG:'$H'|'$X' to unlock] [VER:1.1f.20240226:] [OPT:VNMZHSL2,100,1024,3,0] [AXS:3:XYZ] [NEWOPT:ENUMS,RT+,HOME,REBOOT,SED,RTC,WIFI,FTP,SD] [FIRMWARE:grblHAL] [SIGNALS:RHSP] [NVS STORAGE:*FLASH] [FREE MEMORY:139K] [DRIVER:ESP32] [DRIVER VERSION:240224] [DRIVER OPTIONS:4.3.2] [BOARD:MKS Tinybee V1.0] [AUX IO:1,0,0,0] [WIFI MAC:] [IP:1.1.1.228] [PLUGIN:MODBUS v0.15] [PLUGIN:HUANYANG VFD v0.11] [PLUGIN:SDCARD v1.13] [PLUGIN:FS macro plugin v0.07] [SPINDLE:Huanyang v1] [G54:0.000,0.000,0.000] [G55:0.000,0.000,0.000] [G56:0.000,0.000,0.000] [G57:0.000,0.000,0.000] [G58:0.000,0.000,0.000] [G59:0.000,0.000,0.000] [G59.1:0.000,0.000,0.000] [G59.2:0.000,0.000,0.000] [G59.3:0.000,0.000,0.000] [G28:0.000,0.000,0.000] [G30:0.000,0.000,0.000] [G92:0.000,0.000,0.000] [HOME:0.000,0.000,0.000:0] [TLO:0.000,0.000,0.000] [PRB:0.000,0.000,0.000:0]

terjeio commented 4 months ago

This has (mostly) nothing to do with ioSender. Different grblHAL configurations may have different settings available, e.g. $170 is related to backlash If backlash is not enabled in grblHAL an attempt to set the $170 will result in an error.

$395 sets the default spindle, if the number of spindles or types of spindles has been changed in the configuretion this can lead to stiuations llike his where an alarm is raised. Alarm 14 is due to communication failure with a VFD spindle.

An issue that could be resolved in ioSender is that some settings are interdependent and might be numbered in the wrong order, this can be solved by reorder the sending of settings to the controller. Or by restoring them twice. And for some of the errors the sender may query the controller about its configuration and not try to set them if not available. I guess this could be done by comparing the settings reported from the controller with the restore file content...

terjeio commented 3 months ago

New edge versions are now up that will count mismatches between the controller and the backup file for settings not supported at all and report the count when the restore is completed. Note that some settings may have different number of flags (bits) available, these may still be causing an error message to be shown,