2515
« on: September 12, 2017, 05:38:41 AM »
Something that may be of interest to others…
Mach4 has the commands M62P# and M63P# (where the # denotes the Output# number) which both only operate, or take effect, consistent with an axis movement.
So the Gcode…
M62P1 would turn on Output #1 at the instant of an axis movement and M63P1 would turn off Output#1 again, at the instant of an axis movement.
As of Build 210 the Ethernet Smooth Stepper plugin allows for multiple instances of the M62/M63 commands to be stacked and operated jointly upon an axis (any axis) movement.
So please consider the following snippet of Gcode…
G21 F4500
M62P1
M62P2
M63P3
M62P4
M62P5
M62P6
M63P7
M62P8
G1 X0.001
%
At the instant the X axis moves the Outputs# 1 to 8 would contain the binary data 1 1 0 1 1 1 0 1 (assuming you are reading the bits from the same direction as me). Obviously any combination could be set from 00000000 to 11111111.
The interesting part, and the point of all this, is that Outputs# 1 to 8 could be interrogated by a simple controller (to convert the bit pattern to an 8 bit decimal value from 0 to 255) which could then be used to control / vary laser output power from within Gcode which is running at constant velocity.
It is basically a way to output 8 bit numbers from within a running Gcode and having no noticeable effect on Axis Velocity or breaking the constant velocity chain.
I have not fully tried this yet but it could offer a considerable reduction in the process time when laser engraving 8 bit images (currently using the S### command to control / vary laser output power).
Tweakie.