G30 / G28 Bad Command



  • Hello everybody,

    I tried to get my BL touch sensor running and unfortunately I come across problems.

    The sensor itself works and does what it should. It is even possible to determine the offset value.

    But unfortunately he always says G30 or G28 Bad Command.

    Duet Board 1.04c
    BL Touch Sensor V3.1

    This is my pinning:
    Pinning.JPG

    Firmware:
    Firmware.JPG

    Webinterface:
    Web Interface.JPG

    Config:

    ; Drives
    M569 P0 S0                                     	; physical drive 0 goes backwards
    M569 P1 S0                                     	; physical drive 1 goes backwards
    M569 P2 S1                                     	; physical drive 2 goes forwards
    M569 P3 S0                                     	; physical drive 3 goes backwards
    M569 P4 S1                                     	; physical drive 4 goes forwards
    M584 X0 Y1 Z2 E3:4                             	; set drive mapping
    M350 X16 Y16 Z16 E16:16 I1                     	; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E100.00:400.00       	; set steps per mm
    M566 X600.00 Y600.00 Z18.00 E300.00:18.00      	; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E6000.00:180.00 	; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z100.00 E1500.00:100.00   	; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800:800 I30               	; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        	; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y-6 Z0 S1                              	; set axis minima
    M208 X230 Y235 Z210 S0                         	; set axis maxima
    
    ; Endstops
    M574 X1 Y1 S1                                  	; set active high endstops
    M574 Z1 S2					; set endstops controlled by probe
    M558 P9 H5 F100 T2000				; Set Z probe type/mode 5. H=Dive Height. F=Speed the bed moves
    G31 X-23 Y0 Z0 P25				; set Z probe trigger value, offset and trigger height
    
    ; Z-Probe
    M307 H3 A-1 C-1 D-1				; Disable the 7th Heater to free up PWM channel 5 on the Duex board
    
    ; Heaters
    M305 P0 T100000 B4138 R4700                    	; set thermistor + ADC parameters for heater 0
    M143 H0 S120                                   	; set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 R4700                    	; set thermistor + ADC parameters for heater 1
    M143 H1 S280                                   	; set temperature limit for heater 1 to 280C
    
    ; Fans
    M106 P0 S0 I0 F500 H-1                         	; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45                      	; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    
    ; Tools
    M563 P0 D0 H1 F0                               	; define tool 0
    G10 P0 X0 Y0 Z0                                	; set tool 0 axis offsets
    G10 P0 R0 S0                                   	; set initial tool 0 active and standby temperatures to 0C
    
    ; Custom settings
    M584 X0 Y1 Z2:4 E3                             	; Set Z motors on drives 2 and 4
    

    Home Z:

    G91              ; relative positioning
    G1 Z5 F6000 S2   ; lift Z relative to current position
    G90              ; absolute positioning
    G1 X15 Y15 F6000 ; go to first probe point
    G30              ; home Z by probing the bed
    
    ; Uncomment the following lines to lift Z after probing
    ;G91             ; relative positioning
    ;G1 S2 Z5 F100   ; lift Z relative to current position
    ;G90             ; absolute positioning
    

    Home All:

    G91                     ; relative positioning
    G1 Z5 F6000 S2          ; lift Z relative to current position
    G1 S1 X-235 Y-215 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
    G1 X5 Y5 F6000          ; go back a few mm
    G1 S1 X-235 Y-215 F360  ; move slowly to X and Y axis endstops once more (second pass)
    G90                     ; absolute positioning
    G1 X15 Y15 F6000        ; go to first bed probe point and home Z
    G30                     ; home Z by probing the bed
    
    ; Uncomment the following lines to lift Z after probing
    ;G91                    ; relative positioning
    ;G1 S2 Z5 F100          ; lift Z relative to current position
    ;G90                    ; absolute positioning
    

    Deployprobe:

    M280 P3 S10 I1
    

    Retractprobe:

    M280 P3 S90 I1
    

    Actually, I kept the instructions one to one. Unfortunately, I can not continue at this point, because I'm quite new to the topic.

    Sorry for the whole text, but I hope you can help me.

    Thank you very much



  • there seems to be a problem with the deploy and retract script.

    can you execute the command manually in the console and check for extra characters in the script.



  • @Veti

    Yes, all work fine. Pin Down, Pin Up, Selfe Test ON and OFF.

    Test.JPG

    also the Z Probe value (1000) is displayed in the test



  • what is the size in bytes of the deploy and retract script



  • @Veti

    here the whole content of the files

    Deploy:

    ; deployprobe.g
    ; called to deploy a physical Z probe
    ;
    ; generated by RepRapFirmware Configuration Tool v2.0.4 on Thu Sep 26 2019 16:26:18 GMT+0200 (Mitteleuropäische Sommerzeit)
    M280 P3 S10 I1
    

    Retract:

    ; retractprobe.g
    ; called to retract a physical Z probe
    ;
    ; generated by RepRapFirmware Configuration Tool v2.0.4 on Thu Sep 26 2019 16:26:18 GMT+0200 (Mitteleuropäische Sommerzeit)
    M280 P3 S90 I1
    


  • @Veti said in G30 / G28 Bad Command:

    what is the size in bytes of the deploy and retract script

    200 Bytes Deploy
    202 Bytes Retract



  • can you issue the commands M401 and M402?



  • @Veti said in G30 / G28 Bad Command:

    can you issue the commands M401 and M402?

    Yes, Pin is moving out and in.

    But:

    16:49:18M402
    Error: Bad command:
    16:49:11M401
    Error: Bad command:



  • there is something wrong with your deploy and retract scripts.

    delete everything and type the commands per hand



  • @Veti said in G30 / G28 Bad Command:

    there is something wrong with your deploy and retract scripts.
    delete everything and type the commands per hand

    now this happend.
    Test1.JPG

    if i type M280 P3 S10 I1 it works. But M401 not



  • @Veti
    libary.JPG

    this is my library



  • Delete the probe files and create new ones with just the M280 command,

    Perhaps there is something in the existing file that is causing the problem.

    Frederick



  • @fcwilt

    Same problem

    M401
    Error: Bad command: M280 P3 S10 I1

    Their is only the M280 command in the file.



  • Okay. now it works fine.
    I deleted all again and created again. Thank you very much!!

    🙂


Log in to reply