I'm having no joy here. I can't get the macro to operate.
The macro is named M9991 and is stored in \macros.
the code I was using as a test should show red G0 moves +500 X, then +500Y, then +500 Z. The Z move defined by a parameter that the macro should create by calling it from the Y DRO.
Gcode here:
#10=0
#11=0
#12=0
G0 X500
G0 Y500
M9991
G0 Z#11
m30
%
Macro here:
CODE"#10="&GetOEMDRO(800)
CODE"#11="&GetOEMDRO(801)
CODE"#12="&GetOEMDRO(802)
I'll be honest, I have no idea what I'm doing. If i could see something work, I'd be a great deal happier. As it is it's like repairing a radio with a knife and fork. What i want to do is this:
- get an axis DRO value
- assign it to a conventional # parameter and use it in a regular parametric subroutine.
Sorry to bugger round in little circles over what should be a very simple affair but I've never written a macro before and I'm definitely missing a point somewhere... I've tried the suggested methods, with permutations and alterations galore, and I get errors, or it just doesn't work.
Is it not working on the simulations because the DRO doesn't actually move?
Is Mach looking for the macros somewhere else? A subfolder?
My head hurts and i'm going to bed.