EasyManuals Logo

Tormach PCNC 1100 User Manual

Tormach PCNC 1100
231 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #138 background imageLoading...
Page #138 background image
Chapter 7
138
UM10349_PCNC1100_Manual_0916A
Programming
The subroune keyword denes the acon associated with the subroune label. Valid subroune
keywords and their meanings are detailed in the following table.
Subroutine Keyword Meaning
Sub Begin subroutine denition
Endsub End of subroutine denition
Call Call the subroutine
Do/while/endwhile Execute the subroutine while a condition is true
Repeat/endrepeat Execute the subroutine while a condition is true
If/elseif/else/endif Conditionally execute the subroutine
Break Break out of a while or if/elseif statement
Continue Skip remaining code and restart at top of while or repeat loop
Return Return a value
7.10.1.1 Defining a Subroutine
The sub and endsub keywords are used to dene the beginning and end a subroune. All lines of
code between the sub and endsub keywords are considered to be part of the subroune.
Sub, Endsub, Call Example:
o100 sub
G53 G00 X0 Y0 Z0 (rapid move to machine home)
o100 endsub
...
o100 call (call the subroutine here)
M02
Subrounes can either be dened in the program le or in a separate le. If the subroune is dened
in the same le as the main program that calls the subroune, it must be dened before the call
statement. For instance, this is valid:
o100 sub
G53 G00 X0 Y0 Z0 (rapid move to machine home)
o100 endsub
...
o100 call (call the subroutine here)
M02
But this is not:
o100 call (call the subroutine here)
M02
o100 sub
G53 G00 X0 Y0 Z0 (rapid move to machine home)
o100 endsub
...

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tormach PCNC 1100 and is the answer not in the manual?

Tormach PCNC 1100 Specifications

General IconGeneral
Spindle Speed100 - 5140 RPM
Spindle TaperR8
Machine TypeCNC Mill
X Travel18.0 in (457 mm)
Y Travel9.5 inches
Z Travel16.25 inches
Spindle Motor1.5 hp
Voltage220 VAC, Single Phase
Table Size34.0 in x 9.5 in (864 mm x 241 mm)

Related product manuals