Closed ikhwan-ma closed 3 days ago
This is hard to reproduce on my test fixtures.
There should probably be a protocol_buffer_sync(...)
here to complete all buffered gcode.
Probably right before spindle->stop();
if (gc_state.selected_tool != gc_state.tool) {
bool stopped_spindle;
Spindles::Spindle::switchSpindle(gc_state.selected_tool, Spindles::SpindleFactory::objects(), spindle, stopped_spindle);
if (stopped_spindle) {
spindle->stop(); // stop the new spindle
gc_state.spindle_speed = 0.0;
gc_block.modal.spindle = SpindleState::Disable;
}
spindle->tool_change(gc_state.selected_tool, false, false);
...
Hi.. thanks for your reply.
I went into the source code and saw this function call as well. But not pursuing where this function originates from because I think I'd spend the time to test on another gcode file.
Found out everything went well for another file (and combined operations), and did the same thing again on the same 'problem' file, even after I rebooted the machine and restart UGS on my laptop.
I understand this is hard to replicate on your setup but can you at least share with me what kind of situation that might contribute to this erratic problems..? Let me know if you need more info on my setup or whatever it is to narrow this down.
On Sat, 9 Nov 2024, 23:11 bdring, @.***> wrote:
This is hard to reproduce on my test fixtures.
There should probably be a protocol_buffer_sync(...) here to complete all buffered gcode.
Probably right before spindle->stop();
if (gc_state.selected_tool != gc_state.tool) { bool stopped_spindle; Spindles::Spindle::switchSpindle(gc_state.selected_tool, Spindles::SpindleFactory::objects(), spindle, stopped_spindle); if (stopped_spindle) { spindle->stop(); // stop the new spindle gc_state.spindle_speed = 0.0; gc_block.modal.spindle = SpindleState::Disable; } spindle->tool_change(gc_state.selected_tool, false, false); ...
— Reply to this email directly, view it on GitHub https://github.com/bdring/FluidNC/issues/1375#issuecomment-2466252652, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMYQYMZFWCPLOQ42BNZM3ALZ7YQ3BAVCNFSM6AAAAABROY6XQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWGI2TENRVGI . You are receiving this because you authored the thread.Message ID: @.***>
We are discussing it here. There are some fixes on a PR. I still need to test multiple spindle systems and macro users.
https://discord.com/channels/780079161460916227/1304881649439473748
Try this pull request.
thanks for the update.
On Mon, Nov 11, 2024 at 3:57 AM bdring @.***> wrote:
Try this pull request.
1374 https://github.com/bdring/FluidNC/pull/1374
— Reply to this email directly, view it on GitHub https://github.com/bdring/FluidNC/issues/1375#issuecomment-2466877111, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMYQYM7R5SHQ7JUO3CEC2BDZ763CJAVCNFSM6AAAAABROY6XQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWHA3TOMJRGE . You are receiving this because you authored the thread.Message ID: @.***>
-- Ikhwan Mohd Ahir +60-19-6636359
Try this pull request.
1374
I need some help with this.
I'll create a pre release with the new code. Is that the help you need?
Yes, please! I very much appreciate your help on that mstter. Thank you!
On Tue, 12 Nov 2024, 21:32 bdring, @.***> wrote:
I'll create a pre release with the new code. Is that the help you need?
— Reply to this email directly, view it on GitHub https://github.com/bdring/FluidNC/issues/1375#issuecomment-2470539148, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMYQYM55ASXWW7757NHDFZ32AH7NPAVCNFSM6AAAAABROY6XQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZQGUZTSMJUHA . You are receiving this because you authored the thread.Message ID: @.***>
Pre-release is done.
https://github.com/bdring/FluidNC/releases/tag/v3.9.2-pre1
Get it via Github or the Web Installer (be sure to enable pre-releases)
Awesome, thank you so much! I had to shutdown my machine yesterday after I can't progress with my work, no matter how I changed the milling operations or restarted the machine.
I'll make the update today and report the outcome accordingly.
Thanks again.
On Wed, 13 Nov 2024, 00:21 bdring, @.***> wrote:
Pre-release is done.
https://github.com/bdring/FluidNC/releases/tag/v3.9.2-pre1
Get is via Github or the Web Installer (be sure to enable pre-releases)
— Reply to this email directly, view it on GitHub https://github.com/bdring/FluidNC/issues/1375#issuecomment-2470973476, or unsubscribe https://github.com/notifications/unsubscribe-auth/BMYQYM65NDZOO3FGDJYC7Y32AITI5AVCNFSM6AAAAABROY6XQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZQHE3TGNBXGY . You are receiving this because you authored the thread.Message ID: @.***>
Happy to report that the 'early stop' spindle bug is gone. There's something else that i thought was part of the erratic problem from the current 3.9.1 release, but persist in the 3.9.2 pre-release. I'll keep an eye for the current state of update and notify if there any other problem.
I'll open another issue later base on my findings. Perhaps another video too to document the tool change procedure.
Thanks for this! I'll make a donation soon as a token of gratitude for all your work guys..
Wiki Search Terms
spindle stopped unexpectedly before tool change
Controller Board
6-pack External
Machine Description
Gantry router with external HBS860H all closed loop, dual X motor, single Y, single Z, Fuling/Fohlinn DB600 VFD 3.7KW, 3.5KW 8pole ATC spindle.
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
UGS 2.1.9
What happened?
The spindle stopped before the operation completes. I've uploaded a video to youtube.
The part has a round and oblong shape to pocket. In the youtube video link, I initially combined the 2 object into 1 pocket operation. So there are 2 tool change in the video. Last operation is chamfering.
In the gcode & output attached, I separated the 2 objects to run into separate pocket operations, having in total 3 tool changes. Last operation is chamfering. I did this to see if the spindle stopped in each intermediate tool change, but it only happens while in the oblong shape pocket operation. It did not happen in the round pocket operation.
The video can be seen here
GCode File
N100 (Exported by FreeCAD) N110 (Post Processor: grbl_post) N120 (Output Time:2024-11-09 10:52:23.858986) N130 (Begin preamble) N140 G17 G90 N150 G21 N160 (Begin operation: Fixture) N170 (Path: Fixture) N180 G54 N190 (Finish operation: Fixture) N200 (Begin operation: TC: 6mm_2F_EndMill002) N210 (Path: TC: 6mm_2F_EndMill002) N220 (TC: 6mm_2F_EndMill002) N230 (Begin toolchange) N240 M6 T2 N250 M3 S14500 N260 G4 P10 N270 (Finish operation: TC: 6mm_2F_EndMill002) N280 (Begin operation: Pocket_Shape) N290 (Path: Pocket_Shape) N300 (Pocket_Shape) N310 G0 Z5.000 N320 G0 X-31.821 Y28.179 N330 G0 Z3.000 N340 G1 X-31.821 Y28.179 Z-3.000 F450.000 N350 G3 X-36.127 Y29.353 Z-3.000 I-3.179 J-3.179 K0.000 F1650.000 N360 G3 X-39.353 Y23.873 Z-3.000 I1.127 J-4.353 K0.000 F1650.000 N370 G3 X-33.873 Y20.647 Z-3.000 I4.353 J1.127 K0.000 F1650.000 N380 G3 X-31.821 Y28.179 Z-3.000 I-1.127 J4.353 K0.000 F1650.000 N390 G0 Z5.000 N400 G0 X-32.883 Y27.117 Z5.000 N410 G0 X-32.883 Y27.117 Z3.000 N420 G1 X-32.883 Y27.117 Z-3.000 F450.000 N430 G3 X-35.751 Y27.899 Z-3.000 I-2.117 J-2.117 K0.000 F1650.000 N440 G3 X-37.899 Y24.249 Z-3.000 I0.751 J-2.899 K0.000 F1650.000 N450 G3 X-34.249 Y22.101 Z-3.000 I2.899 J0.751 K0.000 F1650.000 N460 G3 X-32.883 Y27.117 Z-3.000 I-0.751 J2.899 K0.000 F1650.000 N470 G0 Z5.000 N480 G0 X-33.945 Y26.055 Z5.000 N490 G0 X-33.945 Y26.055 Z3.000 N500 G1 X-33.945 Y26.055 Z-3.000 F450.000 N510 G3 X-35.374 Y26.445 Z-3.000 I-1.055 J-1.055 K0.000 F1650.000 N520 G3 X-36.445 Y24.626 Z-3.000 I0.374 J-1.445 K0.000 F1650.000 N530 G3 X-34.626 Y23.555 Z-3.000 I1.445 J0.374 K0.000 F1650.000 N540 G3 X-33.945 Y26.055 Z-3.000 I-0.374 J1.445 K0.000 F1650.000 N550 G0 Z5.000 N560 G0 Z5.000 N570 (Finish operation: Pocket_Shape) N580 (Begin operation: TC: 8mm_2F_EndMill) N590 (Path: TC: 8mm_2F_EndMill) N600 (TC: 8mm_2F_EndMill) N610 (Begin toolchange) N620 M6 T4 N630 M3 S15500 N640 G4 P10 N650 (Finish operation: TC: 8mm_2F_EndMill) N660 (Begin operation: Pocket_Shape001) N670 (Path: Pocket_Shape001) N680 (Pocket_Shape001) N690 G0 Z5.000 N700 G0 X60.992 Y-24.008 N710 G0 Z3.000 N720 G1 X60.992 Y-24.008 Z-3.000 F450.000 N730 G1 X60.869 Y-24.000 Z-3.000 F1650.000 N740 G1 X-10.869 Y-24.000 Z-3.000 F1650.000 N750 G1 X-10.992 Y-24.008 Z-3.000 F1650.000 N760 G1 X-11.000 Y-24.131 Z-3.000 F1650.000 N770 G1 X-11.000 Y-30.869 Z-3.000 F1650.000 N780 G1 X-10.992 Y-30.992 Z-3.000 F1650.000 N790 G1 X-10.869 Y-31.000 Z-3.000 F1650.000 N800 G1 X60.869 Y-31.000 Z-3.000 F1650.000 N810 G1 X60.992 Y-30.992 Z-3.000 F1650.000 N820 G1 X61.000 Y-30.869 Z-3.000 F1650.000 N830 G1 X61.000 Y-24.131 Z-3.000 F1650.000 N840 G1 X60.992 Y-24.008 Z-3.000 F1650.000 N850 G0 Z5.000 N860 G0 X59.000 Y-26.000 Z5.000 N870 G0 X59.000 Y-26.000 Z3.000 N880 G1 X59.000 Y-26.000 Z-3.000 F450.000 N890 G1 X-9.000 Y-26.000 Z-3.000 F1650.000 N900 G1 X-9.000 Y-29.000 Z-3.000 F1650.000 N910 G1 X59.000 Y-29.000 Z-3.000 F1650.000 N920 G1 X59.000 Y-26.000 Z-3.000 F1650.000 N930 G0 Z5.000 N940 G0 Z5.000 N950 (Finish operation: Pocket_Shape001) N960 (Begin operation: TC: 4mm_chamfer90deg) N970 (Path: TC: 4mm_chamfer90deg) N980 (TC: 4mm_chamfer90deg) N990 (Begin toolchange) N1000 M6 T3 N1010 M3 S12000 N1020 G4 P10 N1030 (Finish operation: TC: 4mm_chamfer90deg) N1040 (Begin operation: Deburr) N1050 (Path: Deburr) N1060 (Deburr) N1070 G0 Z5.000 N1080 G0 X-28.500 Y25.000 N1090 G0 Z3.000 N1100 G1 X-28.500 Y25.000 Z-2.000 F350.000 N1110 G3 X-28.500 Y25.000 Z-2.000 I-6.500 J0.000 K0.000 F950.000 N1120 G0 Z5.000 N1130 G0 Z5.000 N1140 G0 X-11.000 Y-21.000 N1150 G0 Z3.000 N1160 G1 X-11.000 Y-21.000 Z-2.000 F350.000 N1170 G3 X-14.000 Y-24.000 Z-2.000 I0.000 J-3.000 K0.000 F950.000 N1180 G1 X-14.000 Y-31.000 Z-2.000 F950.000 N1190 G3 X-11.000 Y-34.000 Z-2.000 I3.000 J0.000 K0.000 F950.000 N1200 G1 X61.000 Y-34.000 Z-2.000 F950.000 N1210 G3 X64.000 Y-31.000 Z-2.000 I0.000 J3.000 K0.000 F950.000 N1220 G1 X64.000 Y-24.000 Z-2.000 F950.000 N1230 G3 X61.000 Y-21.000 Z-2.000 I-3.000 J0.000 K0.000 F950.000 N1240 G1 X-11.000 Y-21.000 Z-2.000 F950.000 N1250 G0 Z5.000 N1260 G0 Z5.000 N1270 (Finish operation: Deburr) N1280 (Begin postamble) N1290 M5 N1300 G17 G90 N1310 M2
Other Information
This is the UGS output from the gcode above..
Connecting to tcp://192.168.1.201:23 Fetching device status
Finished sending file in 00:04:12
ok [MSG:INFO: Program End] ok