Skip to content

[WIP] CNC System and Macro Variables#24654

Draft
MasterofNull wants to merge 1 commit intoMarlinFirmware:bugfix-2.1.xfrom
MasterofNull:variable-2.1.x
Draft

[WIP] CNC System and Macro Variables#24654
MasterofNull wants to merge 1 commit intoMarlinFirmware:bugfix-2.1.xfrom
MasterofNull:variable-2.1.x

Conversation

@MasterofNull
Copy link

@MasterofNull MasterofNull commented Aug 19, 2022

Description

Adding Variable_Support function.
To allow L (or other naming convention) to be used as variable storage and recall.
Edits to parser, gcode, and other files to allow CNC system and macro variable usage.

Requirements

N/A

Benefits

Variable storage and recall for data parsing between functions, macros, memory storage, and FTP server applications.

Configurations

N/A

Related Issues

Marlin firmware may still need to implement basic math and assign functions to be called and used in gcode execution.

@MasterofNull
Copy link
Author

Should this be labeled as a draft?

@MasterofNull MasterofNull changed the title CNC System and Macro Variables [WIP] CNC System and Macro Variables Sep 6, 2022
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 43e0584 to 6ad5711 Compare October 12, 2022 23:01
@thinkyhead thinkyhead force-pushed the variable-2.1.x branch 3 times, most recently from d516bd6 to 4128c1f Compare December 10, 2022 15:17
@thinkyhead
Copy link
Member

thinkyhead commented Dec 10, 2022

This specification for CNC variables seems to be more of a standard… https://gcodetutor.com/cnc-macro-programming/cnc-variables.html … using the # character as the "command letter" and the = sign as the pseudo-parameter to set the value. Then to use a variable you can use #102 or an expression wrapped in brackets like X[#101+5].

@MasterofNull
Copy link
Author

MasterofNull commented Dec 10, 2022

This specification for CNC variables seems to be more of a standard… https://gcodetutor.com/cnc-macro-programming/cnc-variables.html … using the # character as the "command letter" and the = sign as the pseudo-parameter to set the value. Then to use a variable you can use #102 or an expression wrapped in brackets like X[#101+5].

You are correct. I would prefer to use #. But was running into issues with the code checks failing. Kept getting unexpected # in code error. And didn't have enough experience to know how to work around it so I changed the variable assignment to L. Just to keep moving.

thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Jan 23, 2024
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 2 times, most recently from 9c65146 to 4f65466 Compare January 26, 2024 00:13
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 4354891 to efa1758 Compare March 28, 2025 01:57
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 3791e7d to 6ea4a16 Compare June 2, 2025 21:51
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 52532da to 06c6c47 Compare November 20, 2025 04:01
Co-Authored-By: MasterofNull <29788208+masterofnull@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants