11
General Mach Discussion / can a macro read a comment in gcode file?
« on: May 17, 2015, 03:39:48 PM »
I've had the idea of encoding some extra information from my vb6 gcode generator into my gcode files by having it write them into a gcode comment line (on line 8 in this particular case), with the idea that a macro might then be able to read them and assign their values to persistent variables in mach xml. This seems less complicated to me than my original idea of trying to get my vb6 app to write to mach's xml directly.
Can a macro 'read' a line of my gcode file, and use what it finds, without me having to write in line numbers for it to refer to? I'm not sure what approach to take with this; maybe using carriage returns as delimiters for an array made out of the first 8 lines, and then break the 8th element into its usable parts. Does Cypress Basic do this? Or is there a better approach to this problem?
Thanks,
M21
Can a macro 'read' a line of my gcode file, and use what it finds, without me having to write in line numbers for it to refer to? I'm not sure what approach to take with this; maybe using carriage returns as delimiters for an array made out of the first 8 lines, and then break the 8th element into its usable parts. Does Cypress Basic do this? Or is there a better approach to this problem?
Thanks,
M21