extras:codikon:p5js:cnc-helper
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| extras:codikon:p5js:cnc-helper [2025/11/29 19:37] – created Felix Hardmood Beck | extras:codikon:p5js:cnc-helper [2025/11/29 20:05] (current) – Felix Hardmood Beck | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| // CNC feed suggestion helper with adjustable bit diameter | // CNC feed suggestion helper with adjustable bit diameter | ||
| // Includes spindle speed and chip load calculation | // Includes spindle speed and chip load calculation | ||
| + | // Version 1.01 – angepasst auf DeWalt D26200 Drehzahlstufen | ||
| let materialSelect; | let materialSelect; | ||
| Line 31: | Line 32: | ||
| const container = select('# | const container = select('# | ||
| - | const title = createDiv(' | + | const title = createDiv(' |
| title.addClass(' | title.addClass(' | ||
| title.parent(container); | title.parent(container); | ||
| const subtitle = createDiv( | const subtitle = createDiv( | ||
| - | ' | + | ' |
| ); | ); | ||
| subtitle.addClass(' | subtitle.addClass(' | ||
| Line 195: | Line 196: | ||
| `<div class=" | `<div class=" | ||
| `<div class=" | `<div class=" | ||
| - | `<div class=" | + | `<div class=" |
| `<div class=" | `<div class=" | ||
| `<div class=" | `<div class=" | ||
| Line 207: | Line 208: | ||
| '< | '< | ||
| '< | '< | ||
| - | '< | + | '< |
| '< | '< | ||
| '< | '< | ||
| Line 221: | Line 222: | ||
| `< | `< | ||
| `< | `< | ||
| - | `< | + | `< |
| `< | `< | ||
| `< | `< | ||
| Line 235: | Line 236: | ||
| } | } | ||
| + | // Zuordnung DeWalt D26200 Drehzahl zu Reglerstufe 1–6 | ||
| + | function dewaltDialForRPM(rpm) { | ||
| + | const table = [ | ||
| + | { dial: 1, rpm: 16000 }, | ||
| + | { dial: 2, rpm: 18200 }, | ||
| + | { dial: 3, rpm: 20400 }, | ||
| + | { dial: 4, rpm: 22600 }, | ||
| + | { dial: 5, rpm: 24800 }, | ||
| + | { dial: 6, rpm: 27000 } | ||
| + | ]; | ||
| + | |||
| + | let best = table[0]; | ||
| + | let bestDiff = Math.abs(rpm - best.rpm); | ||
| + | |||
| + | for (let i = 1; i < table.length; | ||
| + | const d = Math.abs(rpm - table[i].rpm); | ||
| + | if (d < bestDiff) { | ||
| + | bestDiff = d; | ||
| + | best = table[i]; | ||
| + | } | ||
| + | } | ||
| + | return best.dial; | ||
| + | } | ||
| + | |||
| + | // Berechnung der Parameter | ||
| function computeSettings(material, | function computeSettings(material, | ||
| let baseFeed; | let baseFeed; | ||
| Line 252: | Line 278: | ||
| plunge = 600; | plunge = 600; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 261: | Line 287: | ||
| plunge = 650; | plunge = 650; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = ' | notes = ' | ||
| Line 270: | Line 296: | ||
| plunge = 400; | plunge = 400; | ||
| depthFactor = 0.24; | depthFactor = 0.24; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 282: | Line 308: | ||
| plunge = 700; | plunge = 700; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 18000; | + | spindleRPM = 18000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 292: | Line 318: | ||
| plunge = 400; | plunge = 400; | ||
| depthFactor = 0.24; | depthFactor = 0.24; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 1; | flutes = 1; | ||
| notes = | notes = | ||
| Line 317: | Line 343: | ||
| plunge = 250; | plunge = 250; | ||
| depthFactor = 0.12; | depthFactor = 0.12; | ||
| - | spindleRPM = 18000; | + | spindleRPM = 18000; |
| flutes = 1; | flutes = 1; | ||
| notes = | notes = | ||
| Line 326: | Line 352: | ||
| plunge = 220; | plunge = 220; | ||
| depthFactor = 0.1; | depthFactor = 0.1; | ||
| - | spindleRPM = 12000; | + | spindleRPM = 16000; // auf DeWalt-Minimum angehoben (Stufe 1) |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| - | ' | + | ' |
| break; | break; | ||
| default: | default: | ||
| Line 373: | Line 399: | ||
| notes; | notes; | ||
| } | } | ||
| + | |||
| + | const dial = dewaltDialForRPM(spindleRPM); | ||
| return { | return { | ||
| Line 381: | Line 409: | ||
| flutes: flutes, | flutes: flutes, | ||
| plungeType: plungeType, | plungeType: plungeType, | ||
| - | notes: notes | + | notes: notes, |
| + | dial: dial | ||
| }; | }; | ||
| } | } | ||
| Line 389: | Line 418: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| ===== html ===== | ===== html ===== | ||
| - | < | + | < |
| < | < | ||
| <html lang=" | <html lang=" | ||
| < | < | ||
| <meta charset=" | <meta charset=" | ||
| - | < | + | < |
| <meta name=" | <meta name=" | ||
| Line 571: | Line 602: | ||
| // CNC feed suggestion helper with adjustable bit diameter | // CNC feed suggestion helper with adjustable bit diameter | ||
| // Includes spindle speed and chip load calculation | // Includes spindle speed and chip load calculation | ||
| + | // Version 1.01 – angepasst auf DeWalt D26200 Drehzahlstufen | ||
| let materialSelect; | let materialSelect; | ||
| Line 580: | Line 612: | ||
| function applyCustomStyles() { | function applyCustomStyles() { | ||
| - | // Styles | + | // Styles |
| } | } | ||
| Line 592: | Line 624: | ||
| const container = select('# | const container = select('# | ||
| - | const title = createDiv(' | + | const title = createDiv(' |
| title.addClass(' | title.addClass(' | ||
| title.parent(container); | title.parent(container); | ||
| const subtitle = createDiv( | const subtitle = createDiv( | ||
| - | ' | + | ' |
| ); | ); | ||
| subtitle.addClass(' | subtitle.addClass(' | ||
| Line 756: | Line 788: | ||
| `<div class=" | `<div class=" | ||
| `<div class=" | `<div class=" | ||
| - | `<div class=" | + | `<div class=" |
| `<div class=" | `<div class=" | ||
| `<div class=" | `<div class=" | ||
| Line 768: | Line 800: | ||
| '< | '< | ||
| '< | '< | ||
| - | '< | + | '< |
| '< | '< | ||
| '< | '< | ||
| Line 782: | Line 814: | ||
| `< | `< | ||
| `< | `< | ||
| - | `< | + | `< |
| `< | `< | ||
| `< | `< | ||
| Line 796: | Line 828: | ||
| } | } | ||
| + | // Zuordnung DeWalt D26200 Drehzahl zu Reglerstufe 1–6 | ||
| + | function dewaltDialForRPM(rpm) { | ||
| + | const table = [ | ||
| + | { dial: 1, rpm: 16000 }, | ||
| + | { dial: 2, rpm: 18200 }, | ||
| + | { dial: 3, rpm: 20400 }, | ||
| + | { dial: 4, rpm: 22600 }, | ||
| + | { dial: 5, rpm: 24800 }, | ||
| + | { dial: 6, rpm: 27000 } | ||
| + | ]; | ||
| + | |||
| + | let best = table[0]; | ||
| + | let bestDiff = Math.abs(rpm - best.rpm); | ||
| + | |||
| + | for (let i = 1; i < table.length; | ||
| + | const d = Math.abs(rpm - table[i].rpm); | ||
| + | if (d < bestDiff) { | ||
| + | bestDiff = d; | ||
| + | best = table[i]; | ||
| + | } | ||
| + | } | ||
| + | return best.dial; | ||
| + | } | ||
| + | |||
| + | // Berechnung der Parameter | ||
| function computeSettings(material, | function computeSettings(material, | ||
| let baseFeed; | let baseFeed; | ||
| Line 813: | Line 870: | ||
| plunge = 600; | plunge = 600; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 822: | Line 879: | ||
| plunge = 650; | plunge = 650; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = ' | notes = ' | ||
| Line 831: | Line 888: | ||
| plunge = 400; | plunge = 400; | ||
| depthFactor = 0.24; | depthFactor = 0.24; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 843: | Line 900: | ||
| plunge = 700; | plunge = 700; | ||
| depthFactor = 0.32; | depthFactor = 0.32; | ||
| - | spindleRPM = 18000; | + | spindleRPM = 18000; |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| Line 853: | Line 910: | ||
| plunge = 400; | plunge = 400; | ||
| depthFactor = 0.24; | depthFactor = 0.24; | ||
| - | spindleRPM = 16000; | + | spindleRPM = 16000; |
| flutes = 1; | flutes = 1; | ||
| notes = | notes = | ||
| Line 878: | Line 935: | ||
| plunge = 250; | plunge = 250; | ||
| depthFactor = 0.12; | depthFactor = 0.12; | ||
| - | spindleRPM = 18000; | + | spindleRPM = 18000; |
| flutes = 1; | flutes = 1; | ||
| notes = | notes = | ||
| Line 887: | Line 944: | ||
| plunge = 220; | plunge = 220; | ||
| depthFactor = 0.1; | depthFactor = 0.1; | ||
| - | spindleRPM = 12000; | + | spindleRPM = 16000; // auf DeWalt-Minimum angehoben (Stufe 1) |
| flutes = 2; | flutes = 2; | ||
| notes = | notes = | ||
| - | ' | + | ' |
| break; | break; | ||
| default: | default: | ||
| Line 934: | Line 991: | ||
| notes; | notes; | ||
| } | } | ||
| + | |||
| + | const dial = dewaltDialForRPM(spindleRPM); | ||
| return { | return { | ||
| Line 942: | Line 1001: | ||
| flutes: flutes, | flutes: flutes, | ||
| plungeType: plungeType, | plungeType: plungeType, | ||
| - | notes: notes | + | notes: notes, |
| + | dial: dial | ||
| }; | }; | ||
| } | } | ||
/var/www/vhosts/ct-lab.info/wiki.ct-lab.info/data/attic/extras/codikon/p5js/cnc-helper.1764445042.txt.gz · Last modified: by Felix Hardmood Beck
