@jay_s_uk Thanks, I've joined the discord, need to be a member 10 mins before I can post while I wait. Are you able to confirm if you have a specific mode that you need to put the VFD in to receive Modbus commands?

Posts made by Firky_CNC
-
RE: Modbus CNC Spindle Control (3.6 RC2) Shihlin SL3
-
Modbus CNC Spindle Control (3.6 RC2) Shihlin SL3
Very interested in the use of MODBUS on the Duet platform. While the duet mini 5 + doesn't support Modbus directly, using a UART on Aux 1 to a TTL to RS485 Adapter Module 3.3V ( Youmile). However, I'm not able to control the VFD from the Duet.
I have found only one thread that discusses the options of using a converter. Here's where I am so far:
In config.g
M575 P2 B9600 S7 ; Enable IO_1 for MODBUS RTU at 9600 baud, 8E1
Wiring :
Duet Pins-------------->Youmile Pins
Pin 1 (3.3V)--------------> VCC
Pin 3 (GND)-------------> GND
Pin 4 (IO_1_out = TX) ---> RXD
Pin 2 (IO_1_in = RX) -----> TXDSL3 configuration
07-00 Communication control enable 0 Enables MODBUS
07-01 Station number (device ID) 1 Match Duet G-code A1
07-02 Baud rate 1 9600 bps
07-07 Format 4 RTU mode (1,8,E,1)The TX light on the converter flashes when sending M261.1 P2 A1 F3 R0 B1 V"reg0"; however returns Error: M261.1: no or bad response from Modbus device.
The RX light on the converter only flashed when the VFD is first started.
See below my Config.g file. This is just a test situation with one axis somewhat configured.
; Configuration file for Duet 3 Mini 5+ (firmware version 3.6.0-rc.2+2)
; Config Version: 1.1 - Updated 2025-04-14
; • Fixed invalid string concatenation for error messages
; • Added full MODBUS spindle control and safety interlock; General preferences
; M952 B121 A51 ; change the CAN address of expansion board 121 to 51
G90 ; send absolute coordinates
M83 ; ...but relative extruder moves
M550 P"Tiny_Mill" ; set printer name
M453 ; select CNC device mode; Drives
M569 P0.0 S1 ; physical drive 0.0 goes forwards
M569 P51 S1 D4 ; physical drive 121.0 goes forwards
M569.1 P51 T2 C5 E0.1:2.0 H0.8 ; Stepper driver closed loop configuration
M569 P0.2 S1 ; physical drive 0.2 goes forwards
M569 P0.3 S1 ; physical drive 0.3 goes forwards
M584 X0.0 Y51 Z0.2 E0.3 ; set drive mapping
M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
M92 X80.00 Y80.00 Z400.00 E420.00 ; set steps per mm
M566 X900.00 Y900.00 Z60.00 E120.00 ; set max instantaneous speed changes (mm/min)
M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set max speeds (mm/min)
M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2)
M906 X800 Y2000 Z800 E800 I30 ; set motor currents (mA) and idle factor in %
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; set axis minima
M208 X230 Y210 Z200 S0 ; set axis maxima; Endstops
M574 Y1 S1 P"51.io0. in" ; endstop for low end on Y; Z-Probe
M558 P0 H5 F120 T6000 ; disable Z probe, set dive height/speeds
M557 X15:215 Y15:195 S20 ; define mesh grid; Heaters
M140 H-1 ; disable heated bed; Tools
M563 P0 D0 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; tool 0 axis offsets
G10 P0 R0 S0 ; tool 0 standby and active temps; RS485 MODBUS for SL3 VFD (via M260.1 and M261.1)
M950 P0 T2 ; Define logical spindle 0 for object model access (spindles[0])
M575 P2 B9600 S7 ; Enable IO_1 for MODBUS RTU at 9600 baud, 8E1; Example MODBUS write commands using M260.1:
; Start forward (write 0x0002 to H1001 = register 4097)
; M260.1 P2 A1 R4097 B2
; Start reverse (write 0x0004 to H1001)
; M260.1 P2 A1 R4097 B4
; Stop (write 0x0000 to H1001)
; M260.1 P2 A1 R4097 B0
; Emergency stop (write 0x007F to H1001)
; M260.1 P2 A1 R4097 B127
; Set frequency: write value (e.g. 30000 = 300.00 Hz) to H1002
; M260.1 P2 A1 R4098 B30000; Optional Read Monitoring (manual trigger or used in macros)
; Read spindle state (5 registers starting at H1001)
M261.1 P2 A1 F3 R4097 B5 V"spindleState"
; Read output frequency (H1003)
M261.1 P2 A1 F3 R4099 B1 V"spindleFreq"
; Read output power (H101B)
M261.1 P2 A1 F3 R4123 B1 V"spindlePower"
; Read fault/error codes (H1003-H1004)
M261.1 P2 A1 F3 R4103 B2 V"spindleErrors"; Safety Interlocks & Error Handling
if { exists(global.spindleErrors) && global.spindleErrors != null && global.spindleErrors[0] != 0 }
M118 S"[MODBUS] VFD error detected." L1
M118 S{"VFD error code = " ^ global.spindleErrors[0]} L1
abort "VFD Error - Operation halted."; These values can be accessed in object model via global variables after being read.
-
Maestro Z_PROBE_MOD (zprobe.mod Pin 3 Servo pin 11)
Hello,
I have been looking to maximise the IO on my Duet Maestro board.
I have set up two relay modules connected to zprobe.mod and Servo
using the closest GND ,+5V to pins 3 (zprobe.mod) and pin 11 (Servo)
The problem I'm having is both relays come on with zprobe.mod and servo doesn't respond to any code.
using
M42 P3 S1
brings Both relays on along with the diag LED (diag LED is directly connected to zprobe.mod)
M42 P4 S1 or S0 has no effect.
it seems to me that they are directly tied to each other, is there any way to separate them?
Snippet from my config.g below.
Thanks
;Tool Hight
M950 P3 C"zprobe.mod" Q100 ; servo/gpio 3 is Z probe MOD pin Air blast for tool probe
M558 K1 P5 C"zprobe.in" ; create probe #1 for use with M585, Switch connected to Z probe IN pin, free up MOD pin;Spindle 48V DC 12000RPM
M950 P11 C"nil" ; free up associated pin (P11)
M950 P4 C"SERVO" Q100 ; servo/gpio 3 is Servo pin Spindle enable
M453 S0 C"e0heat+SERVO" R0:12000 F100 T0 ; Spindle index 0 spindle PWM on heater 0 pin, on/off on SERVO, PWM frequency 100Hz define tool 0 -
RE: "DuetMaestroFirmware.bin" is not valid for this electronics
Thanks for your help, Seems to be a Safari/ Mac M1 issue. Safari unzipped the download by default must have changed something in the process.
After downloading the Zip on a Rpi4 it worked as expected via the web interface and M115 now reports 3.2.2.
This issue is now resolved.
-
RE: Gcode postproces with fusion 360
Hello,
I use the Reprap post processor. its an option from fusion 360. this allows me to use the M3 and M7 for spindle and mist cooling.
Good luck.
-
RE: "DuetMaestroFirmware.bin" is not valid for this electronics
I removed DuetMaestroFirmware.bin from the sys folder then downloaded DuetMaestroFirmware.bin separately from GitHub, uploaded via web interface.
This time no error mentioned and seemed to install However M115 reports 3.1.1? as below.
FIRMWARE_NAME: RepRapFirmware for Duet 2 Maestro FIRMWARE_VERSION: 3.1.1 ELECTRONICS: Duet Maestro 1.0 FIRMWARE_DATE: 2020-05-19b2
-
"DuetMaestroFirmware.bin" is not valid for this electronics
Hello,
Following the release of Release 3.2.2 I wanted to update my Duet Maestro. currently running 3.1.1.
the zip download from git hub uploaded in to the system folder via the web interface and unzipped okay the web interface then asked me if I wanted to install the new firmware when pressing yes I receive this message.
"Firmware binary "DuetMaestroFirmware.bin" is not valid for this electronics"
Double checking the spelling re-downloading and running M997 S0 I have not been able to install the firmware I have rebooted and tried a fed more times with the same error.
Thanks for any help.
Cheers