Appendices: APPENDIX 1 Special Key Functions
Appendices: APPENDIX 1 Special Key Functions
APPENDIX 1 ~ Special Key Functions While in the edit mode, the Axis field within the Robot
window which has the cursor and focus respectively, will
Special functions are assigned to keys for entry, editing, have its value incremented if the plus key is pressed.
control and manoeuvre in the edit windows, most This has effect both off and on-line, but the net result is
following standard Windows practice. different.
Note :
Wait until Paused
A selection list of the declared robots is presented for
Syntax
[n]
Wait until [CNC n] program has Paused
If Device Axis Note :
A selection list of the declared CNC devices is
Syntax presented for [CNC n]
If [rob n] Axis [m] is between [d] and [D] then goto [a]
where :
Wait until Ended
rob n is a name and number given to the Device
Syntax
m is a number given to the axis
Wait until [CNC n] program has Ended
d is a decimal number
D is also a decimal number, greater than d, and
Note :
within the permitted range for the axis
A selection list of the declared CNC devices is
a is a label in the program, line number or name
presented for [CNC n]
( optional )
Where :
a is a cell program label, up to 8 characters
( optional )
Set Output
Note : Syntax
Set {dev n] Output [n]
Syntax where :
Reset [dev n] Output [n] n is a number given to the index Table
d has a meaningful limit of 360 degrees
where :
dev n is the name and number given to the device Calibrate Digital Width Gauge
n is a number in the range of capability of the
device Syntax
Calibrate digital Width gauge [n]
Start Conveyor
where :
Syntax n is a number given to the Gauge
Start Conveyor [n]
Gauge Width
where :
n is a number given to the Conveyor Syntax
Gauge Width [n]
Halt Conveyor
where :
Syntax n is a number given to the Gauge
Halt Conveyor [n]
If Width Gauge
where :
n is a number given to the Conveyor Syntax
If Width gauge [n] is between [d] and [D] then goto [a]
Move Conveyor
where :
Syntax n is a number given to the Gauge
Move Conveyor [n] [d]mm a is a label in the program, number or name
d is the decimal equivalent of a binary number
where :
n is a number given to the Conveyor and if is an analog gauge :
d is a distance, limited to 10000 mm d is the decimal equivalent of a binary number
D is also an equivalent binary number, greater than d
Start Index Table
the binary number is either 8 bit (255 max)or 12 bit
Syntax (4095 max) ~ see specification
Start index Table [n]
or if it is a digital gauge :
where : d is a value between 0.0 and 95.0mm
n is a number given to the index Table D is also a value between 0.0 and 95.0mm, greater
than d
Halt Index Table
Calibrate Digital Height Gauge
Syntax
Halt indexTable [n] Syntax
Calibrate digital Height gauge [n]
where :
n is a number given to the index Table where :
n is a number given to the Gauge
Gauge Height
Increment Index Table Syntax
Gauge Height [n]
Syntax
Increment index Table [n] through [d]degrees where :
n is a number given to the Gauge
where :
Syntax
If analog Sensor [n] is between [d] and [D] then
goto [a]
where :
n is a number given to the sensor
a is a label in the program, number or name Wait Until Flag
where : note :
A is a single letter symbol, a to z if the title ascribed to [a] is "Main", the effect will be to
n is a decimal integer value, unlimited terminate the workcell program
m is also a decimal integer value, greater than m
Else
Next
Syntax
Syntax ELse ( part of a conditional IF statement )
NExt [A]
End If
where :
A is a single letter symbol, a to z Syntax
End If ( the end of a conditional IF statement )
and :
has the effect of incrementing the current value of [n],
assigned to [A], towards [m] in the for loop Remark (Comment)
Goto Syntax
REmark [text]
Syntax
GOto [a] where :
text is a text string to annotate the program
where :
a is a label in the program, number or name Display Message
Syntax where :
Return from Subroutine text is an information string
note : Trace
will be the last line of a subroutine statement within
the program Syntax
TRace [on/off]
Start Parallel Subroutine
which :
Syntax turns the Trace facility on or off, presenting a separate
Start Parallel subroutine [a] display of programmed events, as they occur, to assist
in resolving timing conflicts which may arise from
where :
Note :
The Date Stamp is sent to column 1,
the Time Stamp is sent to column 2, and
the data is sent to columns m to m+12, (say) giving
the content of the NOW and Robot XYZ windows.
where :
n is a number given to the port
text is the Settings Property defined for Visual Basic
communications, paramString , for which the
text string is :
“BBBB,P,D,S”
and :
BBBB is the baud rate, e.g. 9600
P is the parity, e.g. N for None
D is the number of data bits, e.g. 8
S is the number of stop bits, e.g. 1
G00 Rapid Positioning Point-to-Point Note that the problems of specifying the parameter
fields, in particular calculating the circular geometry, are
This is used when moving the cutter between the assisted by the Arc wizard, as selected from the Wizards
end of one cut and the start of the next. It should menu.
never be used when the cutter is in contact with
the work-piece. G03 Circular Interpolation Arc, Counter-
Example Clockwise
04 68
which is a loop sequence to cut a diagonal slot to a End 04 02
m 28 4
depth of 10.00mm in 5 passes. The loop is started in
incremental mode, set by G91, with a G73 code at line 5
n 05
and ended at line 8 with a G06 code. See program
TRYLOOP.NCM.
which is the call to subroutine number 4
G28 Subroutine Start
G70 Imperial
The code which is entered as the first line of a
block intended as a subroutine to the main G and Sets the imperial inch as the unit for all
M code program. subsequent dimension entries.
holes.
G91 Incremental Programming
Example
After specifying incremental programming, each
N G X Y Z I J F S T D M subsequent X,Y and Z dimension entered is
n 00 20.00 20.00 19.00 6 7 6.00
n+1 01 20.00 interpreted as the distance from the last defined
n+2 81 5.00 position to the one currently defined in the coded
n+3 00 0.00 0.00 0.00
line. As a consequence, the dimensions may be
either positive or negative.
which drills a hole to the depth of 5mm from the surface
at Z = 20.00, at the co-ordinates 20.00, 20.00 in X and
Note: Both G90 and G91 are single entries on a line.
Y.
Example
G82 Drilling Cycle with Dwell
N G X Y Z I J F S T D M
This adds a wait period to improve the finish at the m 91
N G X Y Z I J F S T D M
An intermittent feed cycle with a wait period to 1 00 10.00 10.00 19.00 0.00 0.00 6 4 6.00 0 03
improve the finish at the bottom of the cut. To 2 04 68
3 01 20.00
avoid the drill flute becoming clogged, the drilling is 4 91
interrupted after the penetration defined in the I 5 73 5
6 01 20.00 40.00 1.00
parameter field, defaulting to 3mm, and lifted clear 7 -20.00 -40.00 1.00
of the hole. The start position for the drilling 8 06
9 90
operation is determined by the previous moves. 10 92 20.00 10.00 20.00
11 91
12 73 5
Example 13 01 20.00 40.00 1.00
14 -20.00 -40.00 1.00
N G X Y Z I J F S T D M 15 06
n 00 20.00 20.00 21.00 6 7 6.00 16 90
n+1 83 16.00 2.00 17 04 69
n+2 00 0.00 0.00 0.00 18 00 0.00 0.00 0.00
which drills a hole to the depth of 5mm, at the co- which cuts two parallel slots to a depth of 10mm. The
ordinates 20.00, 20.00 in X and Y, using the Peck Cycle. use of the G92 code at line 10, is to ease the problem of
writing the incremental code for the loop cycles, which
G90 Absolute Programming have to be repeated statements in the code, at the two
positions and to make the code for repeated machine
After specifying absolute programming each operations more easily read. This is a trivial example but
subsequent X,Y and Z dimension entered is for a more complex operation, the accounting for change
interpreted as the co-ordinate from the zero within incremental statements would be more exacting.
datum. The default position for the zero datum is Otherwise, the G92 may be used to introduce proven
the Home position established by the control code copied from other programs, written for other
systems use of the limit switches on each axis, origins. See also G73 ~ Loop Cycle.
which is with the cutter fully retracted from the
work piece and with the table fully forward and
fully to the right. The cutter is then over, and its
cutting axis passes through, the rear left corner of
the vice. The zero datum may be altered by
applying offsets, using the manual controls or their
equivalents in the CNC Mill Jog dialogue box,
accessed from the Options menu, or by program
using the G92 code.
Example
N G X Y Z I J F S T D M
which uses the G38 and G39 codes as a pair, setting The Z field specifies the depth of cut, usually set to
output 4 high and pausing for input 4 to go low, using the 1mm, say, if a 2mm ball ended engraving tool is
same number 4 simply to be tidy in the logic used.
connections. Typically, this may be awaiting a robot
subroutine to remove the workpiece, turn it over and The text to be engraved is stated in the Remarks
replace it ready for machining on the reverse face. field, but if this is left blank, a dialogue box for the
text is presented at run time, which contains the
G39 Set output default text, if this has been specified by the G98
code, or it will be blank ready for a run time entry.
This allows the Mill to autonomously drive logic
outputs. The X and Y fields are again used, as for Engraving Example
inputs.
N G X Y Z I J F S T D M Remarks
n 00 25.00 25.00 19.00 Centre of text
Example n+1 01 20.00
n+2 98 1 1 0 normal 0°, font 1
N G X Y Z I J F S T D M n+3 99 9.00 1.00 fred , 9mm high
n 39 4 n+4 00 0.00 0.00 0.00
n+1 38 4
The two codes are used as a pair, usually in M00 Program Pause
numerical order although this need not be the
case, and they may be split, such as in a loop This halts the program waiting for the motor
cycle to engrave at different places. current to be switched off and then on again. It is
useful for tool changes and when setting the Z
The text is centred at the current position and may axis offset. While in the paused state, the Monitor
be orientated in the four 90° positions by LED, between the RJ45 connectors, will flash
specifying a number 1 to 4 in the X field of the more rapidly and the program continue may be
G98 code statement, and each orientation may be selected from Control Panel dialogue.
mirrored for reverse engraving using the numbers
5 to 8. Example
N G X Y Z I J F S T D M
One of 19 fonts may be selected by number in the 1 00 10.00 40.00 19.00 0.00 0.00 6 4 6.00 0 00
Y field. The fonts are comparable to those from
the normal choice in AutoSketch. which is a typical first line of a program, taking the
The maximum number of characters is specified in
cutter to a position poised above the workpiece
the Z field, with zero indicating an unlimited surface.
number.
See DEMO_CM2, line 1.
Default text may be specified in the Remarks field,
to appear in the dialogue box which is presented
at run time, if text for engraving is not stated in the M02 End of Program
Remarks field of the G99 code. If the default is
also left blank, a blank dialogue box will be End of program is an implied function which is
presented. obeyed automatically at the end of program
execution. However, the M02 code may be used in
Example
which is the first line of DEMO_CM1, setting the spindle
direction with the M03 statement in the last field. N G X Y Z I J F S T D M
1 00 45.00 0.00 20.00 0.00 0.00 6 7 6.00 0 68
N G X Y Z I J F S T D M
7 04 05
8 00 0.00 0.00 0.00 69
This takes the tool in a circular arc of up to 90º in a which is a dwell introduced of unspecified period while
clockwise direction from the last defined position to the chuck is closed onto the workpiece, using the M68
the position defined by this coded line. The centre code.
of the arc is defined by the I and K incremental
parameters for the X and Z co-ordinates, G05 End Subroutine
respectively.
Used to mark the end of a section of code
As a single cut, it will produce a concave circular
intended to be obeyed as a subroutine and
segment with the tool moving away from the
declared by the corresponding Subroutine Start
chuck, but the bulk of material would have needed
code, G28.
to be removed beforehand.
When the G05 code is obeyed, the program
Example
sequence is returned to the line following the call
N G X Z I K F S T D M Rem to the subroutine.
84 01 11.00 1.00
85 02 6.00 10.00 5.60 9.00 finish
86 01 6.00 12.50 waist Example
87 02 8.50 20.00 12.5 0.00
N G X Z I K F S T D M Rem
m 28 4
which is taken from the program PAWN.ncl in the Chess
sub-directory and shows the finishing cuts to the waist.
n 05
N G X Z I K F S T D M Rem
G33 Thread Cutting n 70
Example
which uses the G38 and G39 codes as a pair, setting
output 4 high and pausing for input 4 to go low, using the N G X Z I K F S T D M Rem
n 04 02
same number 4 simply to be tidy in the logic
connections. Typically, this may be awaiting a robot
subroutine to remove the workpiece after facing-off, turn which uses the G04 code, dwell for an unspecified
it round and replace it ready for the main machining period, to accompany the End of Program statement.
operation.
M03 Spindle On
G39 Set output
This switches on the Lathe spindle motor. The
This allows the Lathe to autonomously drive logic speed of the motor should be specified in the
outputs. The X and Z fields are again used, as for same line, otherwise the default speed, a speed
inputs. previously specified, set manually or through the
screen dialogue box replica of the manual control
Example panel, will be used.
Example
which uses the G38 and G39 codes as a pair, setting
output 4 high and pausing for input 4 to go low, using the N G X Z I K F S T D M Rem
same number 4 simply to be tidy in the logic 1 04 68
2 04 6 8 1 0 03
connections. Typically, this may be awaiting a robot
subroutine to remove the workpiece after facing-off, turn
it round and replace it ready for the main machining which are the first line of a typical program, turning the
operation. spindle on with the M03 statement in the last field.
Example
N G X Z I K F S T D M Rem
41 00 67.00 67.00 05
42 04 69
Example
N G X Z I K F S T D M Rem
1 04 0 68
Example
N G X Z I K F S T D M Rem
n 04 69