Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Dialog boxes in macros #541

Open
AndyCXL opened this issue Aug 31, 2024 · 3 comments
Open

Suggestion: Dialog boxes in macros #541

AndyCXL opened this issue Aug 31, 2024 · 3 comments
Labels
feature New feature or request

Comments

@AndyCXL
Copy link

AndyCXL commented Aug 31, 2024

To enhance macro functionality and safety, it would be really neat if simple dialogs could be popped up asking for confirmation of some fact or position - with the option to Cancel or Proceed.
Were this an accepted line of thinking to the developers, allowing dialogs to feed back a choice/choices and perhaps a value/values would open up a whole new world for macro creators…

@J-eremy
Copy link

J-eremy commented Sep 2, 2024

To enhance macro functionality and safety, it would be really neat if simple dialogs could be popped up asking for confirmation of some fact or position - with the option to Cancel or Proceed. Were this an accepted line of thinking to the developers, allowing dialogs to feed back a choice/choices and perhaps a value/values would open up a whole new world for macro creators…

You can already somewhat do this with the M0 command. If in your macro you have a line like this
M0 ;This is a test

It will pause whatever you are doing and display this dialog box
image

The ";This is a test" part of it is a comment, notice the semicolon which defines the proceeding text as a comment, and is what is displayed in the pop-up.

Check out the "Advanced Macros" Section of the following URL.
https://resources.sienci.com/view/gs-additional-features/

Advanced Macros
gSenders Macro architecture is based on JavaScript and uses the Esprima library (https://esprima.org/) and so will theoretically support any code that it does. This is exciting because Macros can move far past basic variables if you’d like to perform advanced functions on your CNC:

There is also a ton of built-in macro variables for things like tool number and positional macros.

@SienciLabs
Copy link
Contributor

Good point @J-eremy, I realized I hadn't explicitly mentioned it in the documentation so your comment here reminded me to add it in there https://resources.sienci.com/view/gs-additional-features/#advanced-macros

@AndyCXL it sounds like you were looking for functionality that went even further?

@AndyCXL
Copy link
Author

AndyCXL commented Sep 5, 2024

The ability as pointed out of using "M0 ; Brief instruction as a comment" certainly addresses an important part of my suggestion, but there are instances where gaining an input from the user via a (modal) dialog popped up during a macro run would be useful.
An example might be probing a horizontal cylinder to find the Z-centre... if the user probes something 30mm dia or say the chuck on a Vortex at 100mm dia, the macro could behave 'smarter' and avoid time wasted whilst a G38 command seeks first probe contact. Equally, if the macro is configured to only accommodate a 30mm cylinder, but the user unthinkingly tries to probe the chuck, it could result in a probe crash.
Here, asking the user for the approx dia of the cylinder before moving would be very useful.

@walidkayhan walidkayhan added the feature New feature or request label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants