Anaheim DPJ72LC4, DPJ72LC3 MXX Miscellaneous Device Control, Feedrate Command, Program Comments

Page 65

Section 4 System Programming 61

The subroutine definition begins with the letter "O" followed immediately by the subroutine name with no spaces. The subroutine must end with the M99 command as shown. M99 causes program execution to jump back to the main program, continuing with the line immediately following the M98 line (G01 X0 Y0 above).

The main program must end with M02, the "End of Program" command. M02 is not required in a G-code program unless there are subroutines defined below the main program. Subroutine names may include up to 10 alpha-numeric characters.

You may use as many subroutines as you like, but each must have a unique name within the program file. If necessary, you can "nest" subroutines, meaning one subroutine may call another subroutine, which in turn may call another subroutine, and so on.

MXX – Miscellaneous Device Control

Using the Output Lines Setup dialog box you can define up to 16 M codes to turn on or off different devices through the output lines. M Codes can also be used for digital control of devices by turning on or off a group of output lines to be used as digital input into the control lines of the device. See “Output Lines Settings” in the Initial Setup section for details on how to set up the M codes.

Popular M codes include:

M03 Spindle On

M05 Spindle Off

M07 Mist Coolant On

M08 Flood Coolant On

M09 Coolant Off

F Feedrate Command

The F command is used to designate a feedrate. The feedrate set with the F command is modal (stays in effect until another F command occurs). Specify the feedrate in inches/minute for English units and millimeters/minute for Metric units.

Example:

G01 X4.0 Y3.0 Z1.0 F7.0 Moves the tool to Program Coordinate X=4.0, Y=3.0, Z=1.0 at a feedrate of 7.0 in/min

Program Comments

You can add comments to your program by enclosing them in parentheses. LC ignores anything enclosed in parentheses as shown below.

Example:

Image 65
Contents User’s Guide Table of Contents Error! Bookmark not defined Page System Requirements Thank YouProduct Support Using the Mouse Installing LCIf you are using Windows 3.1 or If you are using Windows 95, 98 or NTUsing Standard Windows Controls Choosing CommandsText Boxes Command ButtonsPull-Down Menus System Safety Program Overview About this ManualFile Menu Pull Down Menu BarMain Screen Features Controller Menu Main Screen Features To change the state of an output line Help Menu Tool Position BoxView Menu Program Other FeaturesMachine RelativeTo zero each axis To set new values within a coordinate systemTo zero all axes Tool Path View PortControl Box Code Mode Jog Mode Point Mode Home Mode Program Listing Box Message BoxPage Windows Windows SetupSystem Settings To set your system settings Software SetupSetup File Initial Setup Machine Tool Settings To set the Machine Tool Settings Initial Setup To Set the Maximum Unramped Feedrates Feedrate and Ramping SettingsTo Set the Ramping Rate To Set the Maximum FeedratesTo Set the Direction Change Delay To Set the Maximum Arc Feedrate Setting Machine ZeroTo Set the Jog Rates To Set Machine Zero Without Using Home Switches To Set Machine Zero Using Home SwitchesTo Set Backlash Setting BacklashTo Set Up the Tool Library Tooling SettingsTo Configure the Input Lines Input Line SettingsTo define an M-code to control output lines Output Line SettingsTo Configure the Output Lines To Configure the Motor Signal Lines Motor Signal SettingsTo Configure G and M Code Handling Initial Setup Page Importing a DXF File Opening a G-Code ProgramTo open an existing program To import a DXF fileTo choose a different file name or folder System Programming To edit a new program Using the Program EditorTo open the editor To close the editor To save your program using the same file nameKey Programming Concepts M Codes SupportedAbsolute vs. Incremental ModeG00 Rapid Tool Positioning M Code ReferenceG02 Clockwise Circular Cutting Move G01 Linear Interpolated Cutting MoveEnd End Center Start G03 Counter Clockwise Circular Cutting MoveG17, G18, G19 Arc Plane Selection G04 DwellG20, G21 Inch Units and Metric Units G28 Return to Reference PointG29 Return from Reference Point System Programming System Programming System Programming System Programming G52 Local Coordinate System G91 Incremental Positioning Mode G90 Absolute Positioning ModeM30 End of Program M98, M99, M02 Subroutine CommandsM00 Program Pause Program Comments Feedrate CommandMXX Miscellaneous Device Control System Programming Starting LC Software Configuring LCWindows 3.1 or Windows 95, 98 or NTLoading a G-Code File Viewing the Tool Path Tutorial Animating the G-Code File Editing a G-Code File Using the Jog Controls Connecting the Machine OnlineSetting Machine Zero Using the Point Move Setting Program Zero on the Machine Tool Testing the Program on the Machine Tool Turning off the Controller Cutting the PartExiting the Program O Connections Typical Output Configuration Motor ON/OFF Input Internally Connected Driver BLD72 Series DriverSetting the Kick Current Driver Page Glossary Glossary Glossary