Duet 6XD output not initiating
-
Hello,
I'm building a CNC router using a Duet 6XD board. I am currently trying to wire a VFD to control the spindle.
my current code is
; Spindles M950 R0 C"out0+out6+out7" Q500 L100:24000 ; configure spindle #0 ; Tools M563 P0 S"Spindel0" R0 ; create tool #0 M568 P0 R0 M453; select CNC mode
when I turn on the spindle from DWC and set RPM to 1000 pin OUT0, it lights up but out6+out7 does not send any voltage to initiate a relay I'm not sure if there is a problem with my code or using the pin names incorrectly I placed a voltmeter on pins Out6&Out7 when I set spindle in reverse or forward I get no voltage.
thank you
m122 === Diagnostics === RepRapFirmware for Duet 3 MB6XD version 3.5.1 (2024-04-19 14:39:48) running on Duet 3 MB6XD v1.0 (SBC mode) Board ID: 08DLM-956DA-M2NS4-6JKD6-3S86T-1B32S Used output buffers: 1 of 40 (17 max) === RTOS === Static ram: 153624 Dynamic ram: 85396 of which 0 recycled Never used RAM 106972, free system stack 214 words Tasks: SBC(2,ready,0.6%,463) HEAT(3,nWait 6,0.0%,368) Move(4,nWait 6,0.0%,335) CanReceiv(6,nWait 1,0.0%,940) CanSender(5,nWait 7,0.0%,334) CanClock(7,delaying,0.0%,339) MAIN(2,running,99.3%,128) IDLE(0,ready,0.1%,30), total 100.0% Owned mutexes: HTTP(MAIN) === Platform === Last reset 00:04:26 ago, cause: software Last software reset at 2024-05-29 05:13, reason: User, Gcodes spinning, available RAM 106972, slot 0 Software reset code 0x6003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 MCU temperature: min 43.3, current 43.7, max 43.9 Supply voltage: min 24.9, current 24.9, max 24.9, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0 Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: ok Driver 1: ok Driver 2: ok Driver 3: ok Driver 4: ok Driver 5: ok Date/time: 2024-05-29 05:17:30 Slowest loop: 1.18ms; fastest: 0.06ms === Storage === Free file entries: 20 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, height map offset 0.000, max steps late 0, min interval 0, bad calcs 0, ebfmin 0.00, ebfmax 0.00 no step interrupt scheduled Moves shaped first try 0, on retry 0, too short 0, wrong shape 0, maybepossible 0 === DDARing 0 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === DDARing 1 === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Movement locks held by null, null HTTP* is doing "M122" in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 File2 is idle in state(s) 0 Queue2 is idle in state(s) 0 Q0 segments left 0, axes/extruders owned 0x0000000 Code queue 0 is empty Q1 segments left 0, axes/extruders owned 0x0000000 Code queue 1 is empty === CAN === Messages queued 1333, received 0, lost 0, errs 1254251, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 50 (min 50), ts 1333/0/0 Tx timeouts 0,0,1332,0,0,0 last cancelled message type 30 dest 127 === SBC interface === Transfer state: 5, failed transfers: 0, checksum errors: 0 RX/TX seq numbers: 10262/10262 SPI underruns 0, overruns 0 State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x25e00 Buffer RX/TX: 0/0-0, open files: 0 === Duet Control Server === Duet Control Server version 3.5.1 (2024-04-19 16:20:35, 32-bit) HTTP+Executed: > Executing M122 Code buffer space: 4096 Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0 Full transfers per second: 39.45, max time between full transfers: 42.1ms, max pin wait times: 41.4ms/6.1ms Codes per second: 0.11 Maximum length of RX/TX data transfers: 4362/532
; Configuration file for RepRapFirmware on Duet 3 Main Board 6XD ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.5.0 on Mon May 27 2024 23:55:03 GMT-0500 (Central Daylight Time) ; General G90 ; absolute coordinates M83 ; relative extruder moves M550 P"duet3" ; set hostname ; Accessories M575 P1 S0 B57600 ; configure PanelDue support ; Wait a moment for the CAN expansion boards to become available G4 S2 ; External Drivers M569 P0.0 S1 R0 T5:5:2.5:2.5 ; driver 0.0 goes forwards and requires an active-low enable signal (Y axis) M569 P0.1 S1 R0 T5:5:2.5:2.5 ; driver 0.1 goes forwards and requires an active-low enable signal (Y axis) M569 P0.2 S1 R0 T5:5:10:0 ; driver 0.2 goes forwards and requires an active-low enable signal (Z axis) ; Axes M584 X0.3 Y0.0:0.1 Z0.2 ; set axis mapping M92 X160 Y160 Z320 ; configure steps per mm M208 X0:1500 Y0:1500 Z0:200 ; set minimum and maximum axis limits M566 X3000 Y3000 Z180 ; set maximum instantaneous speed changes (mm/min) M203 X6000 Y6000 Z180 ; set maximum speeds (mm/min) M201 X4000 Y500 Z20 ; set accelerations (mm/s^2) ; Kinematics M669 K0 ; configure Cartesian kinematics ; Probes ;M558 K0 P1 C"io6.in" H5 F120 T6000 ; configure analog probe via slot #0 ;G31 P500 X0 Y0 Z0.7 ; set Z probe trigger value, offset and trigger height ;M558 K1 P1 C"io7.in" H5 F120 T6000 ; configure analog probe via slot #1 ;G31 P500 X0 Y0 Z0.7 ; set Z probe trigger value, offset and trigger height ; Endstops M574 X1 P"!io5.in" S1 ; configure X axis endstop M574 Y1 P"!io2.in+!io3.in" S1 ; configure Y axis endstop M574 Z1 P"io4.in" S1 ; configure Z axis endstop ; Spindles M950 R0 C"out0+out6+out7" Q500 L100:24000 ; configure spindle #0 ; Tools M563 P0 S"Spindel0" R0 ; create tool #0 M568 P0 R0 M453; select CNC mode
-
If you send M98 P"config.g" do you get any error messages?
-
When I send M98 P"config,g" that's what I get
5/28/2024, 11:31:39 PM: : Tool 0: spindle 0@0rpm 5/28/2024, 11:31:39 PM: M98 P"config.g"
So basically Im not getting any error at this point
-
@moe-adams9093 If your VFD is similar to mine (typical huanyang VFD...) the forward and reverse pin on it need to be shorted, not sent a signal like you are trying to do with the outputs. For that to work you need to use a relay with the duet output on the command side and the VFD DCom + For/Rev on the other. I used this kind of relays: https://www.amazon.fr/gp/product/B07BVXT1ZK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 and it worked fine for me. Also as there is two outputs (one is NC and the other NO) you don't need to use two outputs on the Duet, you can use just one and write the NC to FOR and NO to REV (or the other way around, I don't remember which one I did, but it's an easy fix).
To control the speed I used a PWM to 10V converter that is plugged to the VFD output of the duet.
My Duet spindle configuration then looks like this:
; Define the Spindle VFD M950 R0 C"vfd+nil+io4.out" Q2000 L0:24000 K0:1
(the vfd output sets the speed, the output 4 sets the direction).
It took me ages to find the correct setup but now it works beautifully.
PS: I'm on a Duet3 6HC, so there may be differences to what you use.. You can see the rest of my config with a rapid change ATC here: https://github.com/meeloo/Duet3Config
-
Thank you for the response and sharing your config Im using HY VFD i have a relay board that control the Revers pin and Forward pin basically my setup is out0 for PWM it goes to a PWM -analog converter and out 6 it goes to the relay for forward ,out7 it goes to reverse relay the problem im having that Output 6 and 7 not working they don't send voltage to activate relay I don’t know if its a problem with my 6XD or my pin name incorrect. Thats the issue Im having.
Thank you