Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

[WIP] CNC System and Macro Variables

Open MasterofNull opened this issue 2 years ago • 3 comments

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 avatar Aug 19 '22 19:08 MasterofNull

Should this be labeled as a draft?

MasterofNull avatar Aug 20 '22 00:08 MasterofNull

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].

thinkyhead avatar Dec 10 '22 15:12 thinkyhead

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.

MasterofNull avatar Dec 10 '22 17:12 MasterofNull