Für Mach3 existieren viele unterschiedliche, teilweise kommerzielle (screen oder screenset genannte) Bedienoberflächen. Lange hat mir die Standard-Bedienoberfläche für das Fräsen ausgereicht. Für die Einbindung von Handrad-Tasten war es allerdings notwendig, neue Tastenkombinationen und LEDs hinzuzufügen. Bei dieser Gelegenheit wurde die Bedienoberfläche direkt auf meine Bedürfnisse angepaßt.
Für viele Benutzer wirkt die Standard-Bedienoberfläche 1024.set zuerst einmal abschreckend. Beim Aufbau meiner CNC-Fräse hatte die Ästhetik der Bedienoberfläche für mich eher nachrangige Bedeutung, und während langjähriger Benutzung habe ich auch nichts daran vermißt.
Das Standard-screenset 1024.set besteht aus den folgenden screens:
| Screen No. | Screen Name |
|---|---|
| 1 | Program Run |
| 2 | MDI |
| 4 | Tool Path |
| 5 | Offsets |
| 6 | Settings |
| 7 | Diagnostics |
| 50 | Jog |
Die von mir am häufigsten genutzten Seiten waren „Program Run“ und „MDI“. „Tool path“ wurde ausschließlich dazu genutzt, die Minimal- und Maximalkoordinaten des Fräsjobs nachzusehen.
Die für die Tastatursteuerung von Mach3 verwendbaren Tastenkürzel sind im screenset für jeden screen einzeln konfiguriert. Das bedeutet, daß viele Tastenkürzel nur in einzelnen screens funktionieren. Für meine Zwecke relevant waren die folgenden Tastenkürzel:
| Funktion | Tastenkürzel | Aktiv in Screens |
|---|---|---|
| Cycle Start | Alt+R | 1,4 |
| Feed Hold | Leertaste | 1,4 |
| Stop | Alt+S | 1,4 |
| Feed Rate + | F11 | ??? |
| Feed Rate - | F10 | ??? |
| Spindel On/Off | F5 | ??? |
| Flood toggle | Strg-F | ??? |
| Jog On/Off | Strg+Alt+J | ??? |
Daß die Leertaste als Vorschub-Stop (Feed hold) in den screens „MDI“ und „Diagnostics“ nicht funktioniert, ist eine böse Falle und für die einzige Bohrung in meinem Maschinentisch verantwortlich.
// ... unblocker setup
Some highly interactive web applications will break or partially expose your real IP address when executing client-side JavaScript. Platform Terms of Service and Abuse Policies
Because Vercel treats files inside the api/ directory as serverless endpoints, you must structure your project specifically for their platform.
Install the required packages. We will use node-fetch to handle server-side HTTP requests cleanly. npm install node-fetch@2 Use code with caution. node unblocker vercel
Traditional proxy servers rely on a persistent connection. They maintain a continuous lifecycle to stream large data packets, handle web sockets, and cache session data.
: Incoming and outgoing request bodies are limited to 4.5 MB on the free tier. This makes the proxy unsuitable for large file uploads or heavy media streaming.
mkdir node-unblocker-vercel cd node-unblocker-vercel npm init -y Install the required packages
The nodeunblocker.com package allows for modifications to handle specific site restrictions.
While the code might run initially, there are three massive hurdles:
mkdir node-unblocker-vercel cd node-unblocker-vercel npm init -y Use code with caution. 2. Install Dependencies Traditional proxy servers rely on a persistent connection
To make the proxy intuitive, create a vercel.json file in the root directory. This file instructs Vercel to route all wildcards to your proxy script.
This configuration file tells Vercel how to route traffic. We want all incoming traffic to route directly through our proxy function.
| Factor | Impact on Vercel | Consequence | | :--- | :--- | :--- | | | High impact. If the function hasn't been called recently, Vercel must boot the environment. | Significant lag (1-3 seconds) before the site loads. | | Bandwidth | Vercel is optimized for static assets, not proxying heavy dynamic content. | Images and videos may fail to load or buffer slowly. | | Execution Timeout | Strict limits (10s - 60s). | Long requests (large file downloads, heavy sites) will be cut off, returning a 504 Gateway Timeout. | | Streaming | Serverless functions generally wait for the full payload before responding (or stream inefficiently). | Incompatibility with real-time websockets, gaming, or video streaming. |
Create an api folder and place a proxy.js file inside it. This file wraps the node-unblocker library inside a standard Vercel serverless function wrapper. Create api/proxy.js : javascript
// This is the Vercel serverless handler module.exports = (req, res) => // Attach the original Node request/response to the unblocker unblocker(req, res, () => // If the unblocker doesn't handle it, return 404 res.statusCode = 404; res.end('Not found'); ); ;
Für die Einbindung eines CNC-Handrades war es notwendig, einige neue Tastenkombinationen zu erstellen und LED-Anzeigen der aktiven Achse hinzuzufügen. Zudem müssen alle Tastenkombinationen in allen screens gleich funktionieren.
Und wenn man schon einmal dabei ist, kann man die Bedienoberfläche auch direkt mehr an die eigenen Bedürfnisse anpassen.
Der Mach3 Screen Designer[1] ist ein grafischer Editor zur Anpassung der Bedienoberfläche von Mach3. Seine Bedienung, insbesondere die Auswahl von Elementen, ist am Anfang etwas gewöhnungsbedürftig, dafür aber gut dokumentiert und das Programm läuft relativ stabil.
Tastenkombinationen, die auf allen screens funktionieren, lassen sich am einfachsten nachrüsten, indem auf dem screen 50 „Jog“ eine entsprechende Schaltfläche erstellt wird.
Dabei sollte darauf geachtet werden, daß sie weder mit Windows-Tastenkombinationen[2] kollidieren noch in anderen auf dem CNC-Rechner installierten Programmen eine „schädliche” Bedeutung haben. Man kann sich vorstellen, welche ärgerlichen Komplikationen ein wiederholtes „Strg+A”—„Strg+X” im falschen Fenster auslösen könnte …
Folgende Tastenkombinationen wurden nachgerüstet:
| Beschriftung | Funktion | Tastenkürzel | neue Schaltfläche |
|---|---|---|---|
| „Feed Hold” | „Pause” | Strg+H | Ja |
| „X” | „Wähle X for Handrad 1” | Alt+X | Ja |
| „Y” | „Wähle Y for Handrad 1” | Alt+Y | Ja |
| „Z” | „Wähle Z for Handrad 1” | Alt+Z | Ja |
| „A” | „Wähle A for Handrad 1” | Alt+A | Ja |
| „B” | „Wähle B for Handrad 1” | Alt+B | Ja |
| „C” | „Wähle C for Handrad 1” | Alt+C | Ja |
| „Feed rate reset” | F9 | Nein | |
| „Shuttle Mode” | Ctrl+Alt+S | Nein |
Die wohl auffälligste Änderung gegenüber dem Standard-Screenset 1024.set ist die Aufnahme der MDI-Zeile in das ständig genutzten Tab „Program Run“. Da die MDI-Zeile von mir fast immer für einfache Bearbeitungen ohne NC-Programm (z.B. Bohrungsreihen oder Überfräsen) oder für schnelle Positionierbewegungen, aber nie zum teachen genutzt wird, spart mir dies den Wechsel zwischen den Tabs „MDI” und „Program Run“.
Ein grün leuchtender Rahmen um die Positionsanzeige markiert die am CNC-Handrad aktive Achse. Das ist insbesondere bei einem CNC-Handrad, bei denen dies nicht durch eine erfühlbare Schalterstellung erkennbar ist, vorteilhaft.
Die Grenzen des gerade geladenen Maschinenprogramms waren bislang der einzige Grund, auf die Seite „Tool Path” zu wechseln.
Einzelne Bedienelemente schienen recht wahllos auf der Bedienoberfläche verteilt. Teilweise waren reine Anzeigeelemente mit der Maus anklickbar. Hier wurde geringfügig umgruppiert:
| war | ist | |
|---|---|---|
| Jog On/Off | Tool Information | Zentrale Maschinensteuerung |
| Laufzeitanzeige | Tool Information | Maschinenprogramm |
| Flood On/Off | Maschinenprogramm | Spindelsteuerung |
| Info-LEDs „Dwell“ und „CV Mode“ | Maschinenprogramm | Zentrale Maschinensteuerung |
| Z-Inhibit | Maschinenprogramm | Zentrale Maschinensteuerung |
| Wizards | Zentrale Maschinensteuerung | Maschinenprogramm |
Insbesondere die Funktion „Z-Inhibit“ (vorher klein und verschämt unter den Programmzeileneinstellungen ) ist jetzt — an prominenter Stelle — schnell überblickbar.
Insgesamt wurden nur auf der Seite „Program Run” Elemente hinzugefügt oder umgestaltet. Kein Element wurde entfernt.
|
Mach3 Screen Set |
// ... unblocker setup
Some highly interactive web applications will break or partially expose your real IP address when executing client-side JavaScript. Platform Terms of Service and Abuse Policies
Because Vercel treats files inside the api/ directory as serverless endpoints, you must structure your project specifically for their platform.
Install the required packages. We will use node-fetch to handle server-side HTTP requests cleanly. npm install node-fetch@2 Use code with caution.
Traditional proxy servers rely on a persistent connection. They maintain a continuous lifecycle to stream large data packets, handle web sockets, and cache session data.
: Incoming and outgoing request bodies are limited to 4.5 MB on the free tier. This makes the proxy unsuitable for large file uploads or heavy media streaming.
mkdir node-unblocker-vercel cd node-unblocker-vercel npm init -y
The nodeunblocker.com package allows for modifications to handle specific site restrictions.
While the code might run initially, there are three massive hurdles:
mkdir node-unblocker-vercel cd node-unblocker-vercel npm init -y Use code with caution. 2. Install Dependencies
To make the proxy intuitive, create a vercel.json file in the root directory. This file instructs Vercel to route all wildcards to your proxy script.
This configuration file tells Vercel how to route traffic. We want all incoming traffic to route directly through our proxy function.
| Factor | Impact on Vercel | Consequence | | :--- | :--- | :--- | | | High impact. If the function hasn't been called recently, Vercel must boot the environment. | Significant lag (1-3 seconds) before the site loads. | | Bandwidth | Vercel is optimized for static assets, not proxying heavy dynamic content. | Images and videos may fail to load or buffer slowly. | | Execution Timeout | Strict limits (10s - 60s). | Long requests (large file downloads, heavy sites) will be cut off, returning a 504 Gateway Timeout. | | Streaming | Serverless functions generally wait for the full payload before responding (or stream inefficiently). | Incompatibility with real-time websockets, gaming, or video streaming. |
Create an api folder and place a proxy.js file inside it. This file wraps the node-unblocker library inside a standard Vercel serverless function wrapper. Create api/proxy.js : javascript
// This is the Vercel serverless handler module.exports = (req, res) => // Attach the original Node request/response to the unblocker unblocker(req, res, () => // If the unblocker doesn't handle it, return 404 res.statusCode = 404; res.end('Not found'); ); ;