Toggling Outputs while moving in G-code
In certain applications, it is necessary to toggle outputs while moving in
gcode without slowing down or stopping.
This is especially popular in gluing applications, as the users typically
want to start the move before the glue starts, wait until the machine is at
speed, and then start the glue. The same goes for stopping the glue -- users
typically want to turn it off while at a constant speed, instead of while
decelerating.
To perform this function, version 1.423.3 or newer of the CNC interface is
necessary.
The command structure is as such:
Move Output control Continue the move along similar trajectory Output control
...
Outputs for this function are numbered from 0 thru 7. They are in diagnostics
listed as Coolant -> speed con 3
An example is as follows:
G0X0Y0Z0
G1 X.5 Y1
M98 CMD OUTA [7,1]
G1 X5.5 Y11
M98 CMD OUTA [7,0]
G1 X6 Y12>
This will move seamlessly from X,Y,Z=0
to
X=6, Y=12, Z=0
It will turn the glue, at output #7 on at X=.5
It will turn the glue off at X=5.5
If making a circle of glue, the command might look as such:
G0X0Y0Z0
G2 X2 Y2 I2 J0 F100
M98 CMD OUTA [0,1]
G2 X2 Y2 I0 J-2
M98 CMD OUTA [0,0]
G1 X4 Y2
This example will start a 4" circle on the machine origin at 9:00 on the
circle.
It will turn the glue on at 12:00 on the circle.
It will turn the glue off at 12:00 on the circle.
It will continue moving linearly to X=4 Y=2 for the decel, so the glue is
always laid out at constant speed.
The glue operations were done on the quadrants for the sake of clarity in
this example. They can be put anywhere, so long as the math is done properly.
Notes:
The software will blend the moves between M98 commands. It will blend these
moves no differently than if the code did not have the M98 commands. Corners and
other hitches that slowed down the machine before will still slow the machine
down similarly. The sole purpose of M98 commands is to perform the actions with
no change in G-code.
If there is an M98 command just before a move that would result in a stop,
sometimes the stop will be eliminated. The following code will result in a
high-accel bounce at 3 units when it also turns the output:
G90
G1X0Y0Z0
G1X3 F100
M98 CMD OUTA [1,1]
G1X0
M30
To fix this, move the M98 command to before the return command, as such:
G90
G1X0Y0Z0
G1X2.999 F100
M98 CMD OUTA [1,1]
G1X3
G1X0
M30
Depending on how fast your computer is and how many operations you do at a
time, you may get stuttering on the machine. To investigate, after running a
file, open log.dat inside your cnc interface folder, and look for text as such:
11-21-2011 13:52:59 END m98outa.nc
11-21-2011 13:52:59 closing #8
11-21-2011 13:53:13 There were 3 Computer speed issues with running that file.
Contact technical support and give them this code: 050110/3
11-21-2011 13:53:13 3 Of those computer speed issues were due to M98 commands.
Ideally, you'll see 0 computer speed issues. If you get more than 0, it might
not be a problem. Contact Techno Engineering to discuss. Be prepared to provide
your files by email.
M99 commands are parsed just like M98 commands, however, the machine will
slow down to a stop to perform them. This is the only difference. |