Comments (6)
The macros are currently pretty limited (no variables, calculation etc...). Only pure G-Code... I also dream about more features available from hardware buttons. For instance : Probe Z, Probe XYZ, Probe with Z tool length offset etc... Unfortunately it's not possible right now. I might give a go at it... Do you know why your pull request was closed ? I also had a branch with pretty much the same code as yours, but I realized afterwards that there was already a closed PR with the same features...
from fluidnc.
Number of macros: How many is enough? Pick a number and the next person will want more, so endless problem. The current architecture of numbered macros does not extend well. WebUI has a better facility in which macros are stored in files.
Variables and calculation: That is a can of worms involving adding an expression parser. What is the extent of the language and where does it stop? It is easier to add something like that to UI code that is written in a more dynamic language like JavaScript.
from fluidnc.
Yeah, I really get that "variables and calculations" in macros would be a very big endeavour and is beyond the scope of FluidNC... But I still think that some higher level functions could be developed and activated via control pins. There is a finite number of very useful functions that we use all the time, and I really hate to go back to a UI for these things. If you look at macros people are developing (with variables and calculations) in CNCjs (https://github.com/cncjs/CNCjs-Macros), the vast majority are related to probing and tool change (probing at a specific location and applying offsets to Z for the new bit). Being able to override feedrate and spindle RPM with +/- buttons could also prove to be useful.
The ultimate goal for me would be to only rely on the UI to prepare and launch a job, and then use physical buttons for the remaining (eventual) operations : adjust feeds and speeds during the job, pause/resume, goto tool change position, probe a new bit, apply offsets and continue with next operation. That's it... I use to work with a small GRBL controller developed by makerfr that integrates all of these things (https://github.com/mstrens/grbl_controller_esp32), but it is still based on a touch screen with several level of menus).
As for the number of macros. I get that people will always want more... But 4 is not a lot. Here is an example of macros I would use all the time : Homing, Goto WCS X0 Z0. Goto WCS Z0, Set probing location, Goto probing location, Unlock ($X). That is 6 right there...
Sorry for the lengthy post!
from fluidnc.
One way to finesse the problem of the number of macros is to store them in files. In principle buttons could be assigned to access a file-resident macro instead of one stored in the config. That begs the question of how many buttons are available to assign to such macros. Right now it is pretty rare to have enough GPIOs left for a lot of button macros. That might change soon based on Stefan's input expander work in progress, but for now it is usually impractical to have a lot of button macros.
It is already possible to use WebUI to increase the number of macros. That does not solve the variables problem though.
I am well aware of how CNCjs works, since I am one of a very small number of CNCjs developers, and the only one who is doing any amount of support on the Facebook CNCjs User's Group. The CNCjs macro language is fairly extensive. letting you use a fairly large subset of JavaScript expression syntax. The code to implement that is fairly involved. It might be true that most uses are less comprehensive - but once you start turning something into a programming language, you run into the problem that there will always be somebody who wants just one more little feature. If you start with a simple subset with easy syntax, then at some point you run into a syntactic brick wall, so you really should thing about the general problem and adopt a full syntax at the outset. Which means a high-stakes design problem.
WebUI already has feedrate and spindle overrides
from fluidnc.
This also ties in to some functions like moving on the outline of the cut that either need to be specifically implemented or done in macros with some amount of programming capability. I get that everyone has different needs but with programmable macros you kinda allow the users to fill in the gaps themselves, without having to reinvent the wheel.
For example one way that this is done in another proyect is Klipper, which allows for any number of macros to be set up in the config, and then they just become new "Gcode" that you can call from the terminal or any other tool that sends gcode to the machine. This to me seems like a very good approach since I does not limit the ability of the users to do complex stuff while using a jinja2 parsing which is somewhat of a standard with the yaml format of the current config file https://www.klipper3d.org/Command_Templates.html
maybe borrowing some stuff from the Klipper proyect (which already deals with gcode) might yield a bigger ROI in time and effort required
from fluidnc.
We have these issues in our tracking system.
At this time, most of our time is spent on new user support, so we are primarily working on issues and features to help them. We have limited time and a lot of advanced feature requests.
from fluidnc.
Related Issues (20)
- Problem: How to install FluidNC the esp32-s2 or esp32-c3. HOT 1
- Feature: Trinamic position control via SPI HOT 1
- Problem: GPIO2 use for limit_neg_pin can't pu 3.3v only 0.31v HOT 4
- Wifi porblem HOT 1
- Problem: FluidNC 6XCNC Controller - strange LED lights and steppers suddenly not working HOT 13
- Problem: All the TMC drivers not detected HOT 1
- [MSG:ERR: Command requires idle state] HOT 4
- Problem: Homing X in >3.7.10 not working on ESP32 HOT 6
- Problem: slow homing speed. `seek_mm_per_min` has no effect HOT 2
- Problem: how to home at hold state (by config file or programmatically) HOT 12
- Problem: Web GUI unresponsive, Pendant have a blacscreen HOT 10
- Alarm 14 may not be cleared if an axis is not set to home HOT 1
- Problem: Some alarm conditions can disable the steppers, even with idle_ms set to 255
- Problem with homing with 2 motor HOT 4
- Second limit switch Y axis is not working properly HOT 6
- FluidDial Pendant no read sdcard and Macros don't load HOT 13
- Problem: CL86T v4.1 external driver Timing config, Startup error using ":pu" or the CNC will not move. HOT 24
- Problem: Homing only turns on 1 axis, and that starts to block and whine HOT 11
- Problem: Trying to Run JTAG debugging HOT 6
- Problem: Withdrawn: After updating FluidNC firmware to 3.7.18, old WebUI version shown (not v3) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluidnc.