577
« on: December 26, 2015, 05:24:39 PM »
You have the general idea with teh SUB. Yes you CAN access the Values of a range of DROs through Gcode directly with #vars in the Gcode (;-).
There is a list here on the site somewhere I will look for it again. This comes up about every 2years or so (;-).
What exactly are you checking for in teh M900 ?? To see IF teh Z switch is stuck on ?? I would do this in teh M3 macro and eliminate teh M900 all together.
As to making the ouput active yo MAY want o consider doing this from Gcode and use a simple brain to do teh switching eliminating 2 more macros.
Simply have the Gcode Set a #var to either 0 or 1 and have the brain watch that dro # that is matched to teh #var. That range should work both ways modify either one and it updates the other.
Now you have eliminated any problems or delays that you could run into from using Mcodes .
Just a thought, (;-) TP