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: HOT 1
- PWM and RS485 issues HOT 3
- Error Message: Ignored key SingleArmScara HOT 1
- upload any file via web and X move 1mm HOT 13
- Problem: ESP32, WIFI on causes consumption jump from 0.07A to 0.13A and overhearts HOT 30
- controllare un motore nidec a 6 fili mediante mks dlc32 HOT 25
- Problem: Can't use SYNRAD CO2 RF laser HOT 1
- Problem: Stepper motors not moving HOT 43
- Steering gear configuration file consult HOT 1
- Problem: Unable to clear "X Axis tmc_2209 homing current not in config: Using run current" error HOT 6
- Brownout detector was triggered when wifi wants to begin HOT 1
- Problem: when config value contains a colon the $config/dump returns invalid JSON
- Problem: yaml file. HOT 13
- Resetování ESP32 po instalaci FluidNC HOT 8
- Problem: config. yaml file HOT 12
- Problem: DM320T/ DM332T no movement HOT 2
- Problem: Laser firing on G0 moves HOT 5
- RS485 error: Skipping key uart1 indent 1 this indent 0 HOT 17
- Bluetooth not working, HOT 1
- Problem: Low memory error while running G-code HOT 3
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.