Download PCNC User Manual

Transcript
Programming language reference
Before use of these codes the size of tapping head to be used and the pitch of the thread must be
defined in the appropriated place on the Settings screen. If the part program is running in Inch
(G20) mode then the pitch is taken as a number of threads per inch. If it is metric (G21) then the
pitch will be in millimeters. If the spindle speed is too high for the chosen pitch then an error
message will be displayed and the cycle will not be performed.
The cycle operates as follows:
The currently set spindle speed and thread pitch are used to calculate the feed rate required to
move the tap at the correct speed. The corresponding feedrate for the high speed retraction of
the tap is also calculated. If this exceeds the available rapid rate then an error is displayed.
The tap is then fed downwards for the commanded depth (P word).
At the end of the down-feed the spindle is rapidly retracted by the appropriate distance for the
size of the head in use. This engages the reverse drive.
The spindle is then retracted, at the higher reverse rate previously calculated, for a distance
sufficient to ensure the tap springs clear of the hole.
The Z axis is then positioned at the original height above the work ready to move to another
hole or another tool and operation.
Note:
7.9.2
•
The above explanation is slightly simplified from the actual code used to aid
understanding.
•
For best results, especially for deep holes and blind tapping, the spindle speed chosen
should be checked with a tachometer to ensure it is as near the commanded (S word)
speed as possible.
Goto Toolchange Position – M998
Execution of M998 will send the machine to the tool change position. The tool change position
is defined on the Settings screen. The Z-axis will move first, then X and Y. An entry of 9999
will disable the axis. Execution of this function requires the machine to be referenced (Homed).
7.9.3
User Defined M-codes
If any M-code is used which is not in the above list of built-in codes then the Control Software
will attempt to find a file named “Mxx.m1S” in the Macros folder corresponding to the current
XML profile name. If it finds the file then it will execute the Visual Basic script program it
finds within it.
New macros can be written using an external editor program like Notepad and saved in the
Macros folder.
7.10
Other Input Codes
7.10.1 Feed Rate – F
To set the feed rate, program: F~.
Depending on the setting of the Feed Mode toggle the rate may be in units-per-minute or unitsper-rev of the spindle.
The units are those defined by the G20/G21 mode.
Depending on the setting in Configure>Logic a revolution of the spindle may be defined as a
pulse appearing on the Index input or be derived from the speed requested by the S word or Set
Spindle speed DRO.
The feed rate may sometimes be overridden as described in M48 and M49 above.
31138 Rev B1-4
7-35
Using Tormach PCNC 1100 Series II