0% found this document useful (0 votes)
397 views262 pages

HUST H8M CNC Controller Manual

Uploaded by

imannader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
397 views262 pages

HUST H8M CNC Controller Manual

Uploaded by

imannader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Operator’s Manual

HUST H8M CNC Controller

2008/06/12

HUST AUTOMATION INC.


No.80, Gongye Rd., Toufen Town, Miaoli County 351, Taiwan
Tel:(037)623242.Fax:(037)623241
Table of Contents

Table of Contents
1 MAIN FEATURES OF HUST H8-M CNC 1-1

2 Operating Instructions 2-1


2.1 Screen Description 2-1
2.1.1 Graph Mode 2-2
2.1.2 MPG – TEST Mode 2-3
2.1.3 Auto Mode 2-4
Hand-wheel Interruption 2-5
2.1.4 MDI Mode 2-5
2.1.5 Edit Mode 2-5
2.1.6 Origin Mode 2-8
2.1.7 Program Selector 2-8
2.1.8 Jog Mode 2-9
2.1.9 Manual Drilling ** 2-11
2.1.10 Tutorial Mode 2-11
2.2 Part Programs 2-13
2.3 Programming Methods 2-13
2.4 Program Composition 2-15
2.5 Coordinate System 2-17
2.5.1 Coordinate Axis 2-18
2.5.2 Coordinate Positioning Control 2-19
2.5.3 Work Origin 2-20
2.5.4 Machine Origin 2-21
2.6 Numerical Control Range 2-21

3 Programming and Command Codes 3-1


3.1 Command Codes 3-1
3.2 Fast Positioning, G00 3-4
3.3 Linear Cutting, G01 3-7
3.4 CNC Standard Mode and Master/Slave Mode 3-8
3.5 Arc Cutting, G02 and G03 3-18
3.6 Arc (Tread) Cutting, G02, G03, G17, G18, and G19 3-22
3.7 Dwell Command, G04 3-27
3.8 Machine Coordinate Setting, G08 3-27
3.9 Data Setting, G10 3-29
3.9.1 Set the Work Origin Using G10 (Recommended), G10 3-29
3.9.2 G10 method setting of cutter length compensation
(suggested method), G10 format: 3-31
3.9.3 G10 method setting of cutter wear compensation
(suggested method), G10 format 3-31
3.10 Easy I/O Control, G11, G12 3-33
3.10.1 Easy I/O Control, G11 3-34
3.10.2 Easy I/O Control, G12 3-36
3.11 Return to the First Reference Point, G28 3-37
3.12 Return To Previous Position From Reference Point, G29 3-38

i
HUST H8-M Operator’s Manual

3.13 Return to the Second (2nd) Reference Point, G30 3-38


3.14 Skip Function, G31 3-39
3.14.1 High Speed Skip Function, G31 3-39
3.14.2 Skip Function, G31 3-42
3.15 Work Coordinate System Setting 3-44
3.15.1 Machine Coordinate System (Home) 3-44
3.15.2 Work Coordinate System, G54~G59 3-45
3.16 One Shoot Command 3-48
3.17 Cutting Feed-rate Control Command, G98, G99 3-49
3.18 Canned Cycle Functions (H8-M only), G81~G89, G80 3-50
3.19 G90 or G91-Absolute or Incremental Coordinate Setting 3-52
3.20 G80, G81~G89 -- Canned Cycle Commands 3-52
3.21 G80 Cancellation of Canned Cycle 3-53
3.22 G81 Drilling Canned Cycle 3-53
3.23 G82 Drilling Canned Cycle 3-54
3.24 G83 Deep Drilling Canned (peck drill) Cycle 3-54
3.25 G84 Tap Cutting Canned Cycle 3-55
3.26 G85 Boring Canned Cycle 3-56
3.27 G86 Boring Canned Cycle (Spindle Stops at Hole Bottom) 3-56
3.28 G89 Boring Canned Cycle with Dwell at Hole Bottom 3-57
3.29 G22 Linear Groove Milling (Only available in absolute mode) 3-57
3.30 G23 Arc Groove Milling (Only available in absolute mode) 3-58
3.31 G24 Square Groove Milling (Only available in absolute mode) 3-59
3.32 G25 Round Groove Milling (Only available in absolute mode) 3-60
3.33 Special Canned Cycle 3-61
3.34 G34 Circular Drilling Canned Cycle 3-61
3.35 G35 Angular Linear Drilling Canned Cycle 3-62
3.36 G36 Arc Drilling Canned Cycle 3-62
3.37 G37 Grid Drilling Canned Cycle 3-63
3.38 Customized Program Group [MACRO] Command, G65 3-63
3.39 Part Programs 3-89
3.39.1 Loop Repetition Command, M94, M95 3-89
3.39.2 Auxiliary Function, M-code S-code 3-89
3.39.3 Subprogram 3-90

4 Tool Compensation 4-1


4.1 Tool radius and radius wear compensation, G40, G41, G42 4-3
41.1 The Initial Setting of the Tool Radius Compensation 4-4
4.1.2 Relationship between Radius Compensation and Tool Path 4-5
4.1.3 Tool Radius Compensation – Cancellation 4-6
4.1.4 Notes on Tool Radius Compensation 4-8
4.2 Tool length compensation, G43,G44,G49 4-10

5 Controller Keys and Screens 5-1


5.1 Controller Keys and Function Mode Selection 5-2
5.2 Screen Description 5-3
5.2.1 Power-on Screen 5-3

ii
Table of Contents

5.2.2 Coordinate Screen 5-4


5.2.3 Edit Screen 5-5
5.2.4 File Directory Screen 5-5
5.2.5 JOG Screen 5-6
5.2.6 Tutorial Screen 5-7
5.2.7 Computer Transmission Mode Screen 5-8

6 Program Editing 6-1


6.1 Program Selection 6-1
6.2 New Program Editing 6-2
6.3 Existing Program Modification 6-4
6.4 Program Editing in Tutorial Mode 6-8
6.5 Entering Decimal Points 6-9
6.6 Editing Notes 6-10

7 MCM Parameter Settings 7-1


7.1 MCM Parameter Setting 7-1
Parameter Setting List Screen 7-2
7.2 Description of MCM Parameters 7-15

8 Wiring Diagram 8-1


8.1 H8-M External Dimensions 8-1
8.2 H8-M Series Cutout Dimensions 8-2
8.3 Connector Types 8-3
8.3.1 Connector Designation 8-3
8.4 System Cables and Wiring Diagram 8-4
8.4.1 Positioning Control (Servo Driver/Pulse Generator) Connection 8-5
8.5 RS232 Connector Pin Assignment and Connection 8-7
8.6 I/O Interface Connection Overview 8-8
8.7 Controller I/O Interface Connector Pin Assignment 8-10
8.7.1 Input Signal Wiring for Direct Control of I/O Devices by the
Controller 8-10
8.7.2 Output Signal Wiring for Direct Control of I/O Devices by the
Controller 8-11
8.7.3 I/O devices are controlled by the controller via input / output
boards (input board / output relay boards) 8-12
8.8 Input Signal Wiring for Controlling I/O Devices via Input Boards
(3 types available) 8-12
8.8.1 Input Board with Conventional Terminal
(PC board number: AB058) 8-12
8.8.2 Modular input board with conventional terminal
(PC board number: IO\PIO\TB_V02_DI S/N: AB208) 8-14
8.8.3 Input board with CE compliant terminal
(PC board number: NPNI_21 S/N: AB146) 8-16
8.9 Output Signal Wiring for Controlling I/O Devices via Output
Boards (output relay board) (4 types available) 8-18

iii
HUST H8-M Operator’s Manual

8.9.1 Output Board with Conventional Terminal


(PC board number: AB055) 8-18
8.9.2 Modular Output Board with Conventional Terminal
(PC board number: IO\PIO\TB_V02_DI S/N: AB208) 8-21
8.9.3 16-channel Relay Output Board with CE-compliant Terminal (PC
board number: NPNO_2 S\N: AB147) 8-22
8.9.4 4-channel Relay Output Board with CE-compliant Terminal (PC
board number: H6A\PIOEXT\OUT_V1: AB154) 8-25
8.10 Emergency Stop Circuit 8-30

9 PC RS232C Connection 9-1

9.1 ZNDC Operation Instructions via PC 9-1


9.2 HHCON.EXE Operation 9-4
9.3 USB Description 9-7
9.4 RS232C Connection 9-9

10 Error Message Explanations 10-1

11 Attachment A 11-1

11.1 How to Chose a Servo Motor with Appropriate Inertia 11-1


11.1.1 Load Inertia Calculation 11-1
11.2 How to Choose the Appropriate Motor For Your Needs 11-4
11.3 How to Calculate the Amperage of a Transformer 11-9

12 Attachment B 12-1

12.1 NPN-Relay 12-1


12.2 I/O Connection 12-4
12.3 Servo spindle applicaion 12-7
12.4 In-position application 12-10

iv
Chapter I Main Features of Hust H8-M CNC Controller

1 MAIN FEATURES OF HUST H8-M CNC CONTROLLE


□ Controlled Axis: Eight axes - X, Y, Z, A, B, C, U, V.

□ The voltage-controlled servo system has a maximum response rate with


up to 1 million pulses (500 KPPS) at the rate of 60m/min. when the
resolution is 1μm.

□ Freely design a simple screen mode with the LCD screen editing
system in easy-to-learn steps. An optional editing software is also
provided for monitoring or checking of the program with your PC
monitor.The program can be transmitted and executed by your PC via
the RS232C interface (ZNDC).

□ In addition to programming, the program can be created via


CAD/CAM and transmitted via RS232C interface.

□ You can freely configure your personalized keyboard or dip settings.

□ The H8-M controller can confirm the feeding length via simultaneous
feedback of the roller and passive encoder, and cross reference.

□ The memory capacity for the CNC mainboard – 512KB.

□ A battery backup system is provided for CNC program storage after


power-off.

□ To creat a user-friendly interface, the mechanical parameters listed in


the MCM Parameter Settings Table are changeable depending on
different CNC machines.

□ Backlash compensation for errors resulting from a worn lead screw.

□ Provide six work coordinate systems for your convenience during


program desgning and workpiece machining.

□ Provide 40 sets of tool offset compensation settings.

□ Customized Program Group [MACRO] Command.

□ The tool feed rate can be set to mm/minute or mm/revolution.

□ Non-Stop Mode between blocks.

□ Optional Skip function.

1-1
HUST H8-M Operator’s Manual

□ Optional Stop and Feed Hold function.

□ Simultaneous use of the absolute and incremental programmable


coordinates is possible.

□ Self-diagnosis and error indication function.

□ The R value can be directly used to indicate radius when arc cutting.
The I and J values can be used as well.

□ Each axis can be set to Master/Slave Mode.(For information about


Master/Slave Mode, refer to Section 3.4 in Chapter III)

□ MPG hand-wheel test and collision free function for cutting products at
the speed controller by MPG.(MPG Test)

□ Provide 48 standard inputs and 32 standard outputs for programmable


logic control.

□ Provide 64 serial inputs and 64 serial outputs for programmable logic


control.

This Operator’s Manual describes how to write a program, configure the


MCM parameters, and operate the controller, with examples and
explanations listed after each program command. The G-code functions of
the HUST H8-M CNC controller are listed in Table 1-1.

The Operator’s Manual focues on the functions of the HUST H8-M CNC
controller. The mechanical specifications vary depending on various
manufacturers. Refer to the operating instructions of the machine for
information about mechanical specifications.

If there are any questions about the Manual or some problems occur when
using the product, please send your questions or problems to us by either
fax or mail. We will respond to you as soon as possible.

1-2
Chapter I Main Features of Hust H8-M CNC Controller

Table 1-1 G-code for HUST H8-M Controller Series


G-Command Overview
G-code Function Description G-code Function Description
* 00 # Fast positioning (fast *40 Tool radius compensation
feeding) cancellation
* 01 # Linear cutting (cutting feed- *41 Tool radius compensation
rate) setting (Left)
* 02 Arc cutting, CW *42 Tool radius compensation
setting (Right)
* 03 Arc cutting, CCW * 43 Tool length compensation (+)
direction
04 Dwell *44 Tool length compensation (-)
direction
10 Data Setting * 49 # Tool length compensation
cancellation

11 Easy I/O control * 54 # First work coordinate


12 Easy input control * 55 Second work coordinate
* 56 Third work coordinate
22 Linear grooving * 57 Fourth work coordinate
23 Arc grooving * 58 Fifth work coordinate
24 Rectangular grooving * 59 Sixth work coordinate
25 Circular grooving * 61 Enable non-stop mode
62 Disablee non-stop mode
63 Enable non-stop mode (one
shoot)
65 Customized Program Group
*17 # X Y plane
[MACRO]
80 Drilling canned cycle
*18 # Z X plane
cancellation
*19 # Y Z plane 81 Drilling canned cycle setting
28 Tool moves to the 1st 82 Drilling canned cycle (dwell
reference point at hole bottom)
29 Return to the previous 83 Deep hole canned cycle
position from the ref. point
* 84 $ Thread Tapping Canned
30 Tool moves to the 2nd 85 Boring canned cycle
reference point
31 Skip function 86 Boring canned cycle (spindle
stop at hole bottom)
89 Boring canned cycle (dwell at
hole bottom)

1-3
HUST H8-M Operator’s Manual

34 Circular drilling canned 90 Set to the absolute coordinate


cycle system
35 Angular linear drilling 91 Set to the incremental
canned cycle coordinate system
36 Circular drilling canned * 98 # Feed-rate specified by
cycle mm/min
37 Grid drilling canned cycle * 99 Feed-rate specified by
mm/revolution

• The symbol # placed along with an entry indicates that the entry is
configured to initial settings.
(In the MCM parameters, G01 or G00 can be set as the initial power-on
mode.)
• * -- Modal G-codes.

1-4
Chapter II Basic Programming Concepts

IOCSA*
D1 (INPUT) OUTPUT
INPUT
Wear compensation Wear compensation Parameter
Origin Mode MCM* Screen
Length compensation Length compensation
Manual Drilling
Jog Mode Work Coordinate

* 2 program dry run: selection or canceling is possible only when


* Indicates that entry is not permitted without a valid password.
Hand Wheelx100
Tutorial Mode
Hand Wheelx10
Hand Wheelx1
Computer
transmission Delete
Copy Set to Restart
Program Selector Direct Execution

2 - 1
Select
G34~G37 Variable Editing
Edit Mode G22~G25 Program Insertion
2. Operating Instructions:

G81~G89 Program Check


2.1 Screen Description:

MDI Mode Dwell Hand-wheel Interruption

the program is not running.


Program Dry Run*2
Auto Mode Clear Clear Screen
Restart
Page
Optional Skip Up/Dow
Ratio
MPG-Test Mode
Optional Stop
Cursor Zero Point Moving
Block Execution
Graph Mode Input Switching Between
Coordinate Systems
Display Servo
Voltage Response
HUST H8-M Operator’s Manual

2.1.1 Graph Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE
In the Graph Mode, the following keys are available:
Function 1: Graph function (MCM parameter settings)
Input: Switches between coordinate systems in the following order: X-Y, Y-Z, Z-X, and
X-Y-Z.

Page Up & Page Down: Switches between display ratios. The indication X:500 shown
in the figure indicates the maximum width of the X axis.

Cursor Key: “*” indicates the work origin, which is movable using the Cursor key.

Start: Starts the program in Graph Mode.

Dwell: Pause a running program by pressing the Dwell key while in Graph Mode. Press
the Dwell button again to continue execution of the program.

Function 2: Servo voltage response (MCM parameter settings)


In Servo Voltage Response mode, the following keys are available:
Page Up & Page Down: To switch between the voltage values displayed. The upper
limit is 10V.
Cursor up and down keys: To switch between the time units of voltage (MS).
Cursor left and right keys: To switch between axes displayed.

2.1.2 MPG – TEST Mode

2 - 2
Chapter II Basic Programming Concepts

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPE-TEST JOGX100
GRAPH HOME

MODE 擇
When the start key is pressed while in “MPG – TEST” mode, no axis
will move until the hand-wheel is rotated. The axes will stop moving when
the hand wheel stops rotating. This function is very useful for checking the
changes of each block and ensuring program correctness at the initial stage
of program development.

2 - 3
HUST H8-M Operator’s Manual

Switching between “MPG – TEST” mode and “Auto” mode is possible


when the program is running. When a program section failure is suspected, the
mode can be switched to MPG – TEST to check the changes in the program. It
then switches back to Auto mode when the problem is removed.

2.1.3 Auto Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE
You can run a part program while in Auto mode.
The following functions allow you to work more efficiently.

1. Block Execution: This function can be selected at any time no matter whether the
program is running or is stopped.
Whenever the "Start" key is pressed while this function is selected, only the next
command line will be executed instead of the entire program.

2. Program Dry Run: This function can be selected or canceled only when the
program has stopped running.
After this function is selected, the motor will not start operating and the controller
will only simulate program operation and show coordinates, when the program is
started again.

3. Optional Stop: This function can be selected at any time no matter whether the
program is running or is stopped.
When this function is selected, an M01 command in the program is interpreted as a
stop command. It doesn’t function if Optional Stop is not selected.

4. Optional Skip: This function can be selected at any time, whether the program is
running or not.
When this function is selected, any /1 command in the program will be skipped
(not executed). Such command lines will be executed if the Optional Skip function
is not selected.

5. Restart: This function needs to be selected before the program runs.


When the "Restart" function is selected, program operation proceeds from the line
which was interrupted.

2 - 4
Chapter II Basic Programming Concepts

6. Hand-wheel Interruption: This function is available only when the program is


suspended.
This function is used to move all axes with the hand-wheel when the program is
suspended. Press the Start key to run the program after moving of axes.

2.1.4 MDI Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE

A single command line is executed during MDI mode.


You can enter MDI mode when the program is running to check the machine
coordinates and following error.

2.1.5 Edit Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE 擇

Direct input of program commands is possible in Edit Mode (refer to Chapter III
for detailed information about commands and Chapter VI for input methods).In addition,
input of drilling cycle commands is also possible with the graphical input method.

Set to Restart: Move the cursor to the line to be restarted, press the Set to Restart key,
and switch to Auto Mode to directly start from the selected line (not the first line).

2 - 5
HUST H8-M Operator’s Manual

G81 ~ G89: Provide G81 ~ G89 drawings so that users can produce a program
based on them.

G22 ~ G25: Provide G22 ~ G25 drawings so that users can produce a program
based on them.

2 - 6
Chapter II Basic Programming Concepts

G34 ~ G37: Provide G34 ~ G37 drawings so that users can produce a program
based on them.

The screen appears as shown below after selecting an appropriate drawing. In


addition to the parameter key for drawing input, there are 5 function keys available.
Return:
Program Check: This key is used to display the program that is being edited.
Program Insertion: Press this key to convert the variables currently displayed on
the screen into an program object. Directly insert it into the location at which the cursor
is pointing.
Variable Input: This key is used to switch back to variable input when
displaying the program.
Direct Execution: Double click the Direct Execution key to have the controller
execute the program, according to the parameters displayed on the screen.

2 - 7
HUST H8-M Operator’s Manual

2.1.6 Origin Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE

Methods for returning to the origin:


First select the desired axis with the axis knob, and then press the
“Start” key to return to the origin.

2.1.7 Program Selector

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE

While in Program Selector Mode, the cursor key can be used to select the desired
program number. Then, press the Enter or Select key to switch to the currently selected
program number.

To add comments to the program, position the cursor to the desired point, then
enter alphanumeric characters using the keyboard.

Select: Selects the program under the cursor.

Copy: Copy a program to another program location.


Usage: Press the Copy key and the message “SELECT SOURCE BY CURSOR &

2 - 8
Chapter II Basic Programming Concepts

INPUT” appears. Then, move to the source program to be copied with the Cursor key
and press the Enter key. After doing so, the message “SELECT TARGET BY CURSOR
& INPUT” appears. At this time, select the program number to be replaced and press the
Enter key to complete the copy action.

Delete: Delete a program.


Usage: Press the Delete key and the message “DELETE PROGRAM(Y/N)” appears.
Then, select a program to be deleted with the Cursor key and press the “Y” key to
remove the program. Input of characters other than Y/N will cancel the operation.

2.1.8 Jog Mode

PRNO DNC
EDIT TEAC
MDI JOG X1
AUTO JOG X10
MPG-TEST JOGX100
GRAPH HOME

MODE 擇

Jog operation is possible with the “Axis Selection” knob, and by selecting JOG+,
and JOG- while in Jog Mode. The “Axis Selection” knob and the hand wheel can also
be used for movement.
The Coolant, Lubricant, Spindle CW, and Spindle CCW functions are also
available in Jog Mode. The tool changing action has been yet to be defined due to
various mechanisms produced by each manufacturer.
Wear Compensation and Length Compensation: Only configurable in Jog Mode.
The length compensation settings can be applied or cancelled if the program contains a
G43, G44, or G49 command. The G40, G41, and G42 commands are used for radius
compensation.

(If a valid password is entered, entering MCM Modification Mode is possible in


the wear compensation or length compensation screen.)

Work Coordinate: The work coordinate screen can help you to enter work
coordinates quickly.
Direct enter the values or use the function keys at the bottom to enter the values.

2 - 9
HUST H8-M Operator’s Manual

X origin: Fill in the current X-axis machine coordinate in the coordinate system
corresponding to the cursor.
When the key is pressed, the current X-axis machine coordinate will be filled in the
field X of G56 (not the field Y) if the current value of the cursor belongs to the field Y
of G56.
Y origin: Fill the current Y-axis machine coordinate in the coordinate system
corresponding to the cursor.
Z origin: Fill the current Z-axis machine coordinate in the coordinate system
corresponding to the cursor.
A origin: Fill the current A-axis machine coordinate in the coordinate system
corresponding to the cursor.
X1/2: Add the current X-axis machine coordinate to the current work coordinate X
value, and divide the result by 2. The final figure obtained will be filled in the
corresponding coordinate system.
Example: Current X-axis machine coordinate = 100.000
G54 work coordinate = 0.000
After X1/2 is pressed, G54 work coordinate =
(100.000+0.000)/2=50.000
Y1/2: Add the current Y-axis machine coordinate to the current work coordinate Y
value, and divide the result by 2. The final figure obtained will be filled in the
corresponding coordinate system.
B/C/U : Switch to the B/C/U axis work coordinate setting screen.

2 - 10
Chapter II Basic Programming Concepts

2.1.9 Manual Drilling


Manual drilling is only available by pressing the Manual Drilling key while in
“Jog Mode”.
Manual drilling allows the user to drill a hole via simple settings, without
needing to create a program.

Drilling Depth: The downward drilling depth for the tool. (not the coordinate)
Drilling Speed: Speed of hole drilling. (not spindle speed)
Each Feed Depth: The depth to drill, after which the tool returns to the starting
point.
Reserved Distance: After returning to the start point, the tool quickly feeds to
the last drilling depth after subtracted from the reserved distance.
Current X, Y, Z Coordinates : Change the X, Y, Z coordinates with the hand
wheel without needing to enter them.
Execute: Execute drilling according to the current settings. The spindle should
be started before execution. Press the Spindle CW key (or Spindle CCW key) on
the auxiliary panel and adjust the spindle speed with SSO% settings.

2.1.10Tutorial Mode

PRNO DNC
EDIT TEAC
MDI JOGX1
AUTO JOGX10
MPG-TEST JOGX100
GRAPH HOME

MODE

The main difference between Tutorial Mode and Edit Mode is that the system

2 - 11
HUST H8-M Operator’s Manual

will determine whether the axial position will change when you press the Enter or
Insertion keys. The changed axis coordinate will be filled in the current line if the axial
position changes.
In Tutorial Mode, axial movement is available with the Axis Selection knob and
hand wheel. To select ratios, press the function key at the bottom of the screen.

2 - 12
Chapter II Basic Programming Concepts

2 Programming Overview

2.2 Part Programs

The movement of a numerical control machine is controlled by the program.


Prior to part machining, the part shape and machining conditions must be
converted to a program. This program is called a part program. A
comprehensive machining plan is required for writing the part program.
The following steps must be performed when developing the machining
plan:

1. Determine the machining range requirements and select a suitable


numerical control machine.
2. Determine the work-piece loading method and select appropriate tools
and chucks.
3. Determine the machining sequence and tool path.
4. Determine the machining conditions, such as the feed rate (F), coolant,
etc.

A part program is a group of sequential commands formulated according to


the part diagram, machining plan, and command code of the numerical
control unit. It is used to plan the tool path with the assistance of the
auxiliary functions of the machine. The part program can be transmitted to
the memory of the control unit via a PC or keyboard.

2.3 Programming Methods

A numerical control unit executes actions exactly in accordance with the


commands of the part program. So, programming is very important to
numerical control machining. A programmer must have the following
capabilities:

1. Good ability to read part diagrams.


2. Rich experience in machining processes.
3. Familiar with the functionality, operating procedure, programming
language, and capacity of the machine.
4. Basic ability in geometric, trigonometric, and algebraic operations.
5. Good ability to determine machining conditions.
6. Good ability to set chucks.
7. Good ability to determine suitable part materials.

2 - 13
HUST H8-M Operator’s Manual

With the above abilities, you will be able to create a numerical control
machining program more efficiently. Two programming methods are
available for the part program of the numerical control unit:

Manual Programming
Automatic Programming

Manual Programming

All processes, including the drawing of the part diagram, machining design,
numerically controlled program algorithm, programming, and the
transmission of the program to the controller, are performed manually.

The coordinates and movements of the tool used in machining operations


should be calculated beforehand during the manual programming process.
Calculation will be easier if the part shape is comprised of straight lines or
90-degree angles. For curve cutting, however, the calculation is more
complicated, and geometric and trigonometric operations are required to
make accurate curves. After acquiring the coordinates of the work-piece,
create a complete numerically controlled part program in a specified format
using the movement command, movement rate, and auxiliary functions.
Check the program and make sure that there are no errors before
transmitting it to the controller.

Automatic Programming

All processes, from the drawing of the part diagram to the transmission of
the numerically controlled program to the controller are performed with a
PC.

For complex part shapes, manually calculating coordinates is time-


consuming and can easily cause errors, resulting in nonconforming
machined products. To make use of the high-speed operating capabilities of
computers, the programmer designs a simple language to describe the
machine actions and the shape, size, and cutting sequence of the part,
reinforcing the communication and processing capability of the computer.
The input data is translated into a NC program using the computer, which
will in turn be transmitted to the CNC controller via the RS232C interface.

2 - 14
Chapter II Basic Programming Concepts

This is called a CAD/CAM system, and is used by many units using CNC
machines to create a program especially for machining 3-D work-pieces.

2.4 Program Composition

A complete program contains a group of blocks, and each block has a serial
number and several commands. Each command is composed of a command
code (letter A~Z) and some numbers (+.-.0~9). An example of a complete
part program containing 10 blocks is shown in the table below. A complete
program is assigned a program number, such as O001, for identification.

A complete program:

N10 G0 X40.000 Y10.000


N20 G00 X30.000 Y5.000
N30 M3
N40 G1 X10.000 F2000
N50 V-5.000
N60 X30.000 Y-10.000
N70 G0 X40.000 Y10.000
N80 M5
N90 M2

Blocks are the basic units of a program. A block contains one or more
commands. A block has the following basic format:

N____G____X____Y____Z____F____M____

N : The serial number of the block (program).


G : Function command.
X,Y,Z,A,B,C,U,V : Coordinate positioning command.
F : Feed rate.
M : Auxiliary functions.

Except for the block serial number (N), the command group of a block can
be classified into four parts:

1. Function The G-code, for example, is used to instruct the


Command: machine to perform actions, such as linear cutting or
arc cutting.

2 - 15
HUST H8-M Operator’s Manual

2. Positioning Based on the G code, the X, Y, Z, A, B, C, U, V


Command: commands, for example, instruct the tool of the
machine to stop cutting at a specified position - i.e. the
destination or end point of the action.

3. Feed Rate This command instructs the tool to cut (G code) at a


Command specified speed.
(F):
4. Auxiliary The M, L commands, for example, determine the start,
Function: stop, and execution times of the machine.

However, not every block contains these four commands. Some blocks
have only one command. This will be further discussed in Chapter III.

Except for the block serial number of the block, which is designated N___,
all other components of the block are commands. A command contains a
command code letter (A~Z), a +/- sign, and some numbers.

Basic Command Format (e.g. the positioning command):

Y-10.000

Y : Command code
"-" : +/- sign (+ can be omitted)
10.000 : Tool positioning amount (or coordinates).

The command codes include the function command code, positioning (or
coordinate) command code, feed-rate command code, and auxiliary function
command code. Each command code has its own definition, and the machine
operates according to the given command code. The command codes of the
HUST H8-M Series and their definitions are described below.

A,B : Mean variable code 1 and 2 of the program group G65,


or the positioning command of the A- and B- axis.
C : Positioning command of the C-axis.
F : Feed-rate command.
G : Function code, G-code.
I,J : The X-, Y-, and Z-axis component of the arc radius.
L : Repetition counters (operator code of G65)

2 - 16
Chapter II Basic Programming Concepts

M : Machine control code, M-code.


N : Program serial number.
P : call subprogram code (variable code 3 of G65).
R : Arc radius.
S : Spindle speed command.
U,V : Positioning command for the U-, V-axis. (When the U-,
V-axis are set to incremental, U, V mean value of the X- and Y-axis)
X, Y, Z: : Positioning commands for the X-, Y-, Z-axis.

Always pay attention to the following points when creating a program.


Each block has a specific format, and this format must be used during
programming. The system will not accept an incorrectly formatted
command. Major errors may occur if the system is forced to accept an
incorrectly formatted command.

Each block has a serial number for identification. Although the serial
number is not essential, it is recommended to use it for easy searching. The
serial number contains the letter “N” and some numbers. The numbers
should not be repeated, and it is not necessary to arrange them in order. The
program runs in order of blocks from top to bottom rather than their serial
numbers. For example:

Ex: N10……(1) program execution order


N30…….(2)
N20…….(3)
N50…….(4)
N40…….(5)

2.5 Coordinate System

Fabrication of a work-piece is accomplished by the cutting motion of the


machine-mounted tool from point A to point B. From point A to point B,
the path may be a straight line, arc, or a combination. A coordinate system
is used to describe the geometrical positions of the intersecting point of the
arc or line and point A and B. The cutting action is done by the controlled
change of these geometrical positions (positioning control)

2 - 17
HUST H8-M Operator’s Manual

2.5.1 Coordinate Axis

The HUST H8-M Series uses the well-known 2-D Cartesian coordinate
system. The 2-D coordinate system of the HUST H8-M has an X-axis and a
Y-axis. The intersecting point of the two axes is the zero point, i.e. X=0 and
Y=0 (work origin), as shown in Figure 2-1. The X- and Y-axis will be used
as an example in this manual.
+Y
P2 (-X, +Y)
P1 (+X, +Y)

X=0,Y=0 +X

P4 (+X, -Y)
P3 (-X, -Y)

Figure 2-1 2-D Coordinate System

The X- and Y-axis can be used as linear or rotational axes, which will be
described in Chapter III. When the X- and Y-axis are used as a rotational
axis, the thumb of your right hand points to the positive direction of the
axis (+X, +Y) and the other four fingers point in the direction of its normal
rotation.

2 - 18
Chapter II Basic Programming Concepts

2.5.2 Coordinate Positioning Control

Absolute Coordinate Commands

Tool-positioning coordinates are acquired with reference to the origin


(work origin or program origin) of the work coordinate system. The
coordinates are either positive (+) or negative (-), depending on their
position relative to the origin.

Incremental Coordinate Commands

The previous coordinates of the tool are the reference point for calculating
the coordinate value of the next position. The end point of the previous
movement is the start point of the next movement. The incremental
coordinates are either positive (+) or negative (-), a negative coordinate
value means decrement. Facing toward the direction of the movement, if
the tool is heading in the positive (+) direction, U or V represents an
increment. If it is heading in the negative (-) direction, U or V represents a
decrement.

For the HUST H8-M Series, the coordinates can be set to incremental or
absolute in the following way:

1. Default Mode Variable 9320~9327=1, X,Y,Z,B,C,U,V are absolute


values.
X is a incremental value if #9320=0.
Y is a incremental value if #9321=0.

2. When G90 is executed in the part program, from this line to the end of
the program, absolute coordinate positioning will be applied for X ,Y,
Z, A, B, C, U, V

3. When G91 is executed in the part program, from this line to the end of
the program, incremental coordinate positioning will be applied for
X ,Y, Z, A, B, C, U, V.

2 - 19
HUST H8-M Operator’s Manual

Note: The G90, G91 settings are only configured for the part program.
Coordinate positioning will restore to the last parameter settings
after the part program is finished.
Simultaneous use of absolute and incremental coordinate systems in a part
program is possible. When using the absolute coordinate system, the input
error of the previous position, if any, does not affect the coordinate of the
next point. When using the incremental coordinate system, however, all
subsequent positioning is affected if the previous position is incorrect.
Therefore, particular attention should be paid when using incremental
coordinates.

There aren’t any rules about when to use the incremental or absolute
coordinate system. It depends on the machining requirements. If each
machining point is positioned relative to the home position, it is
recommended to use the absolute coordinate system.

For a diagonal (simultaneous positioning on the X and Y-axis) or arc


movement command, the coordinate value of each axis acquired from the
trigonometric operation will be rounded off. In this case, particular
attention should be paid when the incremental coordinate system is used,
since the number of machining points may increase, and the more points
there are , the more errors will occur. Basically, whether an absolute or
incremental coordinate is used depends on the programming requirements
and the specifications of the machining diagram.

2.5.3 Work Origin

The specifications of the machining diagram are converted to the


coordinate system at the CNC programming stage. Before the conversion, a
point on the work-piece is selected as the zero point of the coordinate
system (i.e. the work origin) and the coordinates of other points on the
work-piece are calculated based on this work origin.

The programmer determines the position of the work origin. It can be any
point on the work area of the machine. However, it is recommended to
select an origin that makes it easier to read the work-piece coordinates.
Refer to Chapter III for information about work origin input to the
controller.

2 - 20
Chapter II Basic Programming Concepts

The work origin is also called the work zero point or program origin. In
this manual, this zero point is always referred to as the work origin.

2.5.4 Machine Origin

There is a fixed point on the machine bed or bed rail. This point is used as a
reference point for calibration of the work origin and tool length
compensation. This reference point is called the machine origin.

The point will be the zero degree position if the X- or Y-axis is set as a
rotational axis.

Each axis has a machine origin. The tool will return to the machine origin
after performing the homing action. The coordinate of the machine origin is
determined by the position of the limit switch mounted by the machine
manufacturer.

The homing action should be performed after powering on the machine. If


the current position is lost due to a power failure, the homing action should
be performed again.

2.6 Numerical Control Range

The numerical control range of the HUST H8-M Series is described in the
following table (the 4/3 format is used).

Min. setting unit 0.001 mm


Max. setting unit 9999.999 mm
Min. moving unit 0.001 mm
Max. moving unit 9999.999 mm
Max. setting 9999.999 mm

The function control range of the HUST H8-M Series is described in the
following table.

G code G00~G99 (G01=G1)


M code M000~M999 (M01=M1)

2 - 21
HUST H8-M Operator’s Manual

S code 999999
F code mm/min 0 ~ 9999999
X.Y.Z, U.V.W, I.J.R, mm 0.001 ~ +/- 9999.999
G 0 4, seconds 0 ~ 9999.999
Program number 0 ~ 999
T code 0 ~ 10000
RAM memory capacity 128K
Lead screw compensation 0 ~ 255 Pulses
Max. Response Speed 500 KPPS

The data varies depending on the specifications of the numerical control


unit. Refer to the operator’s manual of the machine for more information
about the machine.

2 - 22
Chapter III Programming and Command Codes

3 Programming and Command Codes

3.1. Command codes


The previous chapters have introduced the format of part programs. This chapter
will describe the command codes of the HUST H8-M series and provide simple
examples for each command to explain its applications.
Table 3-1 G-code for HUST H8-M Series
G-code List
G-code Function Description G-code Function Description
Fast positioning (fast # Tool radius compensation
* 00 * 40
feeding) cancellation
# Linear cutting (cutting feed- Tool radius compensation -
* 01 * 41
rate) Left
Tool radius compensation -
* 02 Arc cutting, CW * 42
Right
Tool length compensation
* 03 Arc cutting, CCW * 43
calling
Tool length compensation
04 Dwell Command *44
calling
# Tool length compensation
08 Machine coordinate setting * 49
cancellation
10 Data Setting * 54 # First work coordinate
11 Easy I/O control * 55 Second work coordinate
12 Easy input control * 56 Third work coordinate
* 57 Fourth work coordinate
* 58 Fifth work coordinate
* 17 # X Y plane * 59 Sixth work coordinate
* 61 Enable non-stop mode
62 Disable non-stop mode
63 Enable non-stop mode (one
shoot)
Customized Program Group
* 18 Z X plane 65
(MACRO)
* 19 Y Z plane * 80 # Cancellation of canned cycle
22 Linear grooving * 81 Drilling canned cycle
23 Arc grooving * 82 Drilling canned cycle
Deep hole drilling canned
24 Rectangular grooving * 83
cycle
25 Circular grooving
Tool moves to the 1st
28 * 85 Boring canned cycle
reference point

3-1
HUST H8-M Operator’s Manual

Return to the previous * 86


29 Boring canned cycle
position from the ref. point
Tool moves to the 2nd * 89
30 Boring canned cycle
reference point
* 90 # Set to the absolute
31 Skip function
coordinate system
Circular drilling canned * 91 Set to the incremental
34
cycle coordinate system
Angular linear drilling # Feed-rate specified by
35 * 98
canned cycle mm/min
Circular drilling canned Feed-rate specified by
36 * 99
cycle mm/revolution
37 Grid drilling canned cycle
• # -- Default settings upon power-on of the controller
(In the MCM parameters, G01 or G00 can be set as the initial power-on mode.)
• * -- Modal G-codes

The definition of the G-codes in the HUST H8-M series is similar to that of other
controllers. They are classified into two groups:

1. One-shot G-codes

A One-shot G-code (has no * mark in the table) is valid only in the defined
program block.

Ex.: N10 G0 X30.000 Y40.000


N20 G4 X2.000 ..... G4 is a one-shot G-code and is valid
only in this block.
N30 G1 X20.000 Y50.000 ..... G04 no longer valid in this block.

2. Modal G-codes

A Modal G-code (has a * mark in the table) is valid until it is replaced by


another G-code of the same group.

Wherein G00, G01, G02, G03 Same group.


G43, G49 Same group.
G54~G59 Same group.

3-2
Chapter III Programming and Command Codes

G98, G99 Same group.

Ex.: N10 G0 X30.000 Z5.000 ..... G0 is defined.


N20 X50.000 Y10.000 ..... No G-code defined, G0 remains valid.
N30 G1 X30.000 F200 ..... G1 replaces G0 and becomes valid.

The G-codes of the HUST H8-M controller are listed in Table 3-1.

3-3
HUST H8-M Operator’s Manual

3.2. Fast Positioning, G00


Format:

G00 X____ Y____ Z____ A_____ B____ C____ U____ V____

*The power-on default is the absolute coordinate system.


Y

1
G00 V
X 2
Y U

Fig. 3-1 Fast Positioning

G00 (or G0) is used to instruct the tool to move to the defined end point of a
program block at a specific rate, which is obtained by multiplying the maximum
feed-rate [variables # 9140 ~ 9147] by G00 MFO%.

Variables # 9140 ~ 9147 means the maximum feed-rate; the factory default is
10000.
G00 MFO feed-rate percentage. The initial setting is 100% with a range from 0 to
100.
G00 can control the movement of 1~8 axes simultaneously. Any axis that is not
set by the command does not execute any movement.
Single Axis Fast Positioning:
G00 X___
Î The X-axis executes fast positioning at a specific rate, which is obtained by
multiplying [Variable # 9140] by [Register R220]%.
G00 Y___
Î The Y-axis executes fast positioning at a specific rate, which is obtained by
multiplying [Variable # 9141] by [Register R220]%.
G00 Z___
Î The Z-axis executes fast positioning at a specific rate, which is obtained by
multiplying [Variable # 9142] by [Register R220]%.
G00 A
Î The A-axis executes fast positioning at a specific rate, which is obtained by
multiplying [Variable # 9143] by [Register R220]%.

3-4
Chapter III Programming and Command Codes

Simultaneous Fast Positioning of 8 Axes:

G00 X___ Y___ Z___ A___ B___ C___ U___ V___


The 8 axes X, Y, Z, A, B, C, U, and V are repositioning at the same time.

In G90 mode, the absolute coordinate system is applied to the 8 axes X, Y, Z,


A, B, C, U, and V.
In G91 mode, the incremental coordinate system is applied to the 8 axes X, Y, Z,
A, B, C, U, and V.

Ex. 1: Fig. 3-2 Fast Positioning from point A to point B.

G0 X5.60 Y2.00 …… X- and Y-axis are set with absolute commands

3.05
5.6

A
3.00
B
2.00
X

Fig. 3-2 G00 Programming Example

The above-mentioned commands allow the tool to quickly move to position


X5.60, Y2.00.

It is assumed that the maximum feed-rate is:

TRX #9140 = 3000.00 mm/min, TRY #9141 = 5000.00 mm/min. Register R220 is set
to 100%.

The system program calculates the feed-rate of the other axis based on lower
settings, if #9140 (maximum feed-rate of x-axis) is used as a basis for calculation.

Fx = 3000 ……X-axis feed rate


Fy = 3000 * (3.00/3.05)
= 2952 (less than 5000.0, Y-axis setting) …….Y-axis feed-rate

The feed rate of both axes is within the MCM parameter settings.

3-5
HUST H8-M Operator’s Manual

Therefore, the tool will feed at the calculated rate on both axes.
Ex. 2: The program line in Ex. 1 is modified to G0 X5.6 Y-1.00.
It is assumed that the maximum feed-rate is the same as that in Ex. 1.

Fx = 3000
Fy = 3000*(6.00/3.05)=5901.64

In this case, Fy (5901.64) > TRY (5000.00) so that the feed-rate is based
on the Y-axis settings with a limited X-axis feed-rate.

Fy = 5000 …….Y-axis feed-rate


Fx = 5000 * (3.05/6.00)
= 2541.67 ……X-axis feed rate

The maximum feed-rate for each axis from #9140 to #9147 is calculated based on
the following formula:

Fmax = 0.95 x Max. Axial Servo Motor RPM x Axial Pitch ÷Gear
Ratio (Value Recommended for use)

Ex.: The max. X-axis servo motor rpm is 3000 with a 5mm pitch and a
gear of ratio 5:1 (the lead screw only makes 1 turn while the servo motor
makes 5 turns)

Fmax = 0.95×3000×5÷5 = 2850 mm/min

The max. feed-rate should be set to 2850.

Note: The max. slope ratio for X-, Y-, or Z-axis fast positioning is
10000:1.When the feed-rate is set to 2000 mm/min, the path error will be
less than 0.2% if the resolution is 1μm.

The G0 command is available in CNC Standard Mode and Master/Slave Mode.


Refer to Section 3.4 for information about the two modes.

3-6
Chapter III Programming and Command Codes

3.3. Linear Cutting, G01


Format:

G01 X____ Y____ Z____ A____ B____ C____ U____ V____ F____

X,Y,Z,A,B,C,U,V: End point in absolute coordinates.


F : Cutting feed-rate. Unit:□□□□□□.□ ㎜

1) The F code can be used with the G01, G02, and G03 commands.
2) The F code is a modal code, which can affect the feed-rate of the next
block when used.
3) The F-code can be used in the G00 block without affecting the fast
positioning movement. However, the feed-rate of the next block may be
affected.
G01 (or G1) is used for linear cutting work. It can control 1 ~ 8 axes simultaneously.

The cutting feed-rate is determined by the F-code. The lowest setting of the F-code is
1 mm/min. The highest setting is determined by the max. feed-rate setting (#9140
~ #9147). Actual cutting feed-rate: Ft =F x G01 MFO%.

#9140 ~ #9147 means the maximum feed-rate; the factory default is 10000.

The G00 MFO% is the feed-rate percentage for G01, G02, and G03. The initial
setting is 100% with a setting range from 0 to 150.

The coordinate for the tool’s current position serves as the start point for cutting
when a command is given. The feed-rate defined by an F-code remains valid until
it is replaced by a new feed-rate. There is no need to specify a feed-rate in each
block (the feed-rate setting of the F-code can also be set to be valid only for a
single line, C024).

3-7
HUST H8-M Operator’s Manual

Ex.: It is assumed that X, Y are absolute commands and the start point is X=4.6,
Y=1.0.

G01 X2.01 Y2.0 F3000 ……Absolute command

Y
2.01

B
2.0
4.60
A
1.00
X

Fig. 3-3 G01 Example

The F-axis represents the feed-rate on a slant (composite vector of the X- and Y-
axes) during simultaneous X- and Y-axis movement. In this case, the feed-rate of
the X- and Y-axis in CNC standard mode is calculated based on the following
formula. The max. slope ratio of the X- and Y-axis feed-rates is 10,000:1. The
calculation method for the Master/Slave Mode will be introduced in the next
section.
U
X  axisfeed  rate, Fx u Ft
U V 2
2

X- and Y-axis feed-rate formula in CNC standard mode (U, V means incremental
value).

3.4. CNC Standard Mode and Master/Slave Mode


When the part program is running, every block has a feed-rate (F), including the
G0 block. When a feeding command is given in CNC mode, the motor starts
accelerating to the specified feed-rate. It maintains this speed and decelerates to
zero when the tool approaches the positioning point. When a feeding command is
given in the next block, the motor repeats the acceleration and deceleration
actions. The speed of the motor is reset to zero between blocks.

Master/Slave mode — In master/slave mode, an axis is selected as the master axis

3-8
Chapter III Programming and Command Codes

and the remaining axes are automatically set to act as slave axes. The motor speed
of the master and all slave axes remains at the feed-rate and is not reset between
blocks. If two adjoining blocks have different feed-rates, the feed rate of the
former block will not be reset to 0, but is instead adjusted to the feed-rate of the
latter block. If the feed-rate of the master axis is zero, the controller will select the
feed-fate of the slave axes.
Between blocks, the acceleration/deceleration types include:
(1) CNC standard mode (including linear and “S” curve acceleration/deceleration)
(2) Master/slave mode (including linear and “S” curve acceleration/deceleration)

The G0, G1, G2, and G3 commands are available in CNC Standard Mode and
Master/Slave Mode.
#8336 is used to set CNC standard mode and master/slave mode.
0 = CNC standard mode
1 = master/slave mode with the X-axis as the master
2 = master/slave mode with the Y-axis as the master
3 = master/slave mode with the Z-axis as the master
4 = master/slave mode with the A-axis as the master
The parameter #8349 is used to set the type of motor acceleration/deceleration as
linear or “S” curve.
The controller can be used to set the acceleration/deceleration type of the servo
motor according to the following table.

3-9
HUST H8-M Operator’s Manual

#8336 #8349 Motor Acc./Dec.


0 0 Linear
CNC standard mode
0 1 “S” curve
Master/slave mode 1 0 Linear
X-axis as the master
Y- and Z-axis as the 1 1 “S” curve
slave
Master/slave mode 2 0 Linear
Y-axis as the master
X- and Z-axis as the 2 1 “S” curve
slave
Master/slave mode 3 0 Linear
Z-axis as the master
X-, Y-, and A-axis 3 1 “S” curve
as the slave
Master/slave mode 4 0 Linear
A-axis as the master
X-, Y-, and Z-axis as 4 1 “S” curve
the slave

The CNC standard mode and master/slave mode are mainly used to distinguish
between the servo motor acceleration/deceleration types. When the part program
is running, every block has a feed-rate (F), including the G0 block. When a
feeding command is given in CNC standard mode, the motor starts accelerating to
the specified feed-rate. It maintains this speed and decelerates to zero when the
tool approaches the positioning point. When a feeding command is given to the
next block, the motor repeats the acceleration and deceleration actions. Therefore,
the speed of the motor is reset to zero between blocks.

Master/Slave mode — In master/slave mode, an axis is selected as the master axis


and the remaining axes are automatically set to act as slave axes. The motor speed
of the master and all slave axes remains at the feed-rate and is not reset between
blocks. If two adjoining blocks have different feed-rates, the motors of the master
and all slave axes perform the acceleration and deceleration actions and the motor
speed is adjusted to the feed-rate of the next block without being reset to zero. If
the feed-rate of the master axis is zero, the controller will select the feed-fate of
the slave axes.

The CNC Standard and Master/Slave modes are exemplified below.

CNC Standard Mode: Variable #8336 is set to 0.

3 - 10
Chapter III Programming and Command Codes

#8336 #8349 Motor Acc./Dec.

0 0 Linear
CNC standard mode
0 1 “S” curve

In CNC standard mode, the speed of the motor decelerates to zero at the end point
of each block.

Ex. 1: Fig 3-4 shows the feed-rate (F) adjustment between blocks when the G01
command is given in CNC standard mode. Acceleration/deceleration of the
motor is executed in linear fashion. The coordinates in this example are
absolute coordinates, i.e. variables #9320~9327 =1.

N10 G01 X100. F1000.


N20 G01 X200. Y100. F500
N30 G01 X300. F250
N35 G01 X350. F100

Description: N10 -- X-axis feed-rate F1000; Y-axis feed-rate 0.


N20 -- Same X and Y increment (100) with the same F500 feed-
rate.
N30 -- X-axis feed-rate F250; Y-axis- feed-rate 0.
N35 -- X-axis feed-rate F100; Y-axis- feed-rate 0.

3 - 11
HUST H8-M Operator’s Manual

F Value
1500 Variable #93 = 0
N10 N20 N30 N35

Feed Rate
Variable #222 = 0

1000

500
X-axis
Positioning
100 200 300 400

F Value
1000 N10 N20 N30 N35
Feed Rate

500
Y-axis (slave)
Positioning
1 2 3

Fig. 3-4 C01 CNC Standard Mode (Linear Acceleration/Deceleration)

Ex.2 and Ex.3 show how to calculate the X- and Y-axis feed-rate in CNC
standard mode using the formula. In these examples, it is assumed that the max.
feed-rate is:
U
X  axisfeed  rate, Fx u Ft
U V 2
2

TRX(#9140)=2000 mm/min (X-axis), TRY(#9141)=1000 mm/mi n (Y-axis).

Ex. 2: G1 X100.0 Y50.0 F1500

If the composite vector for the X- and Y-axis = (1002 + 502)1/2 = 111.8,
X-axis feed rate, Fx =(100/111.8) × 1500= 1341
Y-axis feed rate, Fy =(50/111.8) × 1500=670.8
Both axes are within the “max. feed-rate” setting range and are thus valid
for feeding.

Ex. 3: G1 X100.0 Y200.0 F2000

If the composite vector for the X- and Y-axis = (1002 +2002)1/2 = 223.6,
X-axis feed rate, Fx = (100/223.6) * 2000 = 894
Y-axis feed rate, Fy = (200/223.6) * 2000 = 1789

Since Fy > TRY (1000), the feed-rate is limited to:


Fx = (894/1789) * 1000 = 500

3 - 12
Chapter III Programming and Command Codes

Fy =(1789/1789) * 1000=1000

Master/Slave Mode: If #8336 = 1, X-axis is set as the master and the others are set as
slaves.
If #8336 = 2, Y-axis is set as the master and the others are set as
slaves.
If #8336 = 3, Z-axis is set as the master and the others are set as
slaves.
If #8336 = 4, A-axis is set as the master and the others are set as
slaves.
If #8336 = 5, B-axis is set as the master and the others are set as
slaves.
If #8336 = 6, C-axis is set as the master and the others are set as
slaves.
If #8336 = 7, U-axis is set as the master and the others are set as
slaves.
If #8336 = 8, V-axis is set as the master and the others are set as
slaves.

#8336 #8349 Motor Acc./Dec.


1~8 0 Linear
Master/slave mode
1~8 1 “S” curve

In master/slave mode, the speed between blocks is not reset to 0, but is instead
adjusted to the feed-rate of the next block. The specified rate of a single block (F)
is the feed-rate for the master axis. The controller adjusts the rate of the slave axes
based on the rate of the master axis and the MCM parameters. Ex. 1 and 2
demonstrate this relationship. There may be some slight errors between the start
and end points of an arc during arc cutting in Master/Slave mode.

3 - 13
HUST H8-M Operator’s Manual

Ex. 1: N10 G01 X100. F1000


N20 X200. Y100. F500
N30 X300. F250

F Value #8226 = 1
1500 N10 N30
#8349 = 0
N20
Feed Rate

1000

500
X-axis as the master

100 200 300 400

F Value
1000 N10 N20 N30
Feed Rate

500
All axes, except the X-axis, are slaves.
1 2 3

Fig. 3-5 Master/ Slave Mode - Linear Acceleration/Deceleration

F Value
#8226 = 1
1500 N10 N20 N30
#8349 = 1
Feed Rate

1000

500
X-axis as the master
100 200 300 400

F Value
1000 N10 N20 N30
Feed Rate

500
All axes, except the X-axis, are slaves.
1 2 3

Fig. 3-5A Master/ Slave Mode – “S” Curve Acceleration/Deceleration

3 - 14
Chapter III Programming and Command Codes

Fig. 3-5 shows that linear acceleration/deceleration is performed at a rate higher


than 0. The X-axis is set as the master with the Y- or Z-axis as the slave. The
feed-rate of each block depends on the master axis (X-axis), and the feed rate of the
slave axis (Y/Z) will be adjusted according to the incremental slope ratios of X
and Y/Z.
If the motor performs “S” curve acceleration / deceleration, acceleration /
deceleration between blocks will proceed as shown in Fig. 3-5A:

Ex. 2: If #8336 = 1, the X-axis is set as the master while the Y- or Z-axis is set as
the slave. The feed-rate of the master axis (X) in each block remains the
same and the feed rate of the slave axis (Y/Z) is adjusted according to the
incremental slope ratios.

N10 G01 X100. Y50. Z0 F1000


N20 X200. Y75. Z50 F500
N30 X300. Y175. Z100. F250.

F Value #8336 = 1
1500 N10 N30
#8349 = 0
N20
Feed Rate

1000

500
X-axis as the master
100 200 300 400

F Value N10 N20 N30


Feed Rate

1000

500
All axes, except the X-axis, are slaves.
1 2 3

Fig. 3-6 Master/Slave Mode – Constant Spindle Speed

3 - 15
HUST H8-M Operator’s Manual

In Ex. 2, the feed-rates of the slave axes are adjusted according to their incremental
slope ratios and will not be reset to zero. Note that there is a small interval between
blocks during acceleration/deceleration (Fig. 3-6). The tool moving distance at this
interval can be calculated using the following formula.

(F1-F2) T
Distance = 0.5 × ×
60 1000

F1, F2 = the feed-rates of the slave axis prior to and following the block
(mm/min).
T = G01 acceleration/deceleration constant

In Ex. 2, where F1 of block N20 is 500 mm/min and F2 of block N20 is 250
mm/min, if the acceleration/deceleration setting is 500ms, the moving distance at
the deceleration interval of block N20 is 1.04mm. Shortening the
acceleration/deceleration duration is one method of shortening this distance.

The example below shows how to calculate the feed-rates of the master and slave
axes. The relationship between the feed-rate and the max. feed-rate setting is
taken into consideration during the calculation. In the example, it is assumed that:

#9140 (TRX) = 2000.00,


#9141 (TRY) = 4000.00 mm/min.

Ex. 3: G0 X100.0 Y50.0 (X-axis as the master)


Feed-rate of the master axis Fx = 2000
Feed-rate of the slave axis Fy = (50/100) * 2000 = 1000
Fy < TRY (4000.00),
So, the feed-rate is determined by the TRX value of #9140 (X-axis).

Ex.4: G0 X100.0 Y200.0 (X-axis as the master and #8336 = 1)

Feed-rate of the master axis Fx = 2000


Feed-rate of the slave axis Fy = (200/100) * 2000 = 4000
Fy = TRY (4000.00),
So, the feed-rate is determined by the TRX value of #9140 (X-axis).

Ex.5: G0 U100.0 V300.0 (X-axis as the master and #8336 = 1)

Feed-rate of the master axis Fx = 2000


Feed-rate of the slave axis Fy = (300/100) * 2000 = 6000
Fy > TRY (4000), thus the speed is limited to:

3 - 16
Chapter III Programming and Command Codes

Feed-rate of the master axis Fx = (4000/6000) * 2000 = 1333


Feed-rate of the slave axis Fy = 4000
So, the feed-rate is determined by the TRY value of #9141 (Y-axis).

3 - 17
HUST H8-M Operator’s Manual

3.5. Arc Cutting, G02 and G03


The arc-cutting program contains four command groups, as showed in the list
below. The combination of these commands determines the arc path of the tool in
a single block. Refer to Section 3.6 for special arc cutting. The X-Y, Y-Z, or Z-X
plane can be used as the cutting plane. The X-Y plane is used as an example here.
After power-on the default is the X-Y plane.

The arc-cutting program contains four command groups, as showed in the list
below. The combination of these commands determines the arc path of the tool in
a single block.

Command Description

G02 Clockwise
1 Arc feed direction
G03 Counter clockwise

2 End point Absolute X, Y End point in absolute


command coordinates.

Difference from arc start point I, J I=X-axis, J = Y-axis


3 to center Radius range –
Arc radius R 4000.~4000.mm

4 Arc feed-rate F Lowest setting 1 mm/min.

The end point described in the list can be defined either by absolute or
incremental coordinates. The size of the arc can be defined either by the
coordinate difference or radius. The arc cutting direction (CW or CCW) is
relative to the center of the arc (not the coordinate origin), as Fig. 3-7 shows.

Y Y

G02 G03
X X

Fig. 3-7 G02 and G03 Direction

3 - 18
Chapter III Programming and Command Codes

Arc cutting command:

G02: Clockwise
G03: Counter clockwise
Y X Z
G02 G02 G02
G03 G03 G03

X Z Y
G17 G18 G19

E End Point E End Point E End Point

Y X S Z
Start Point
S S
Start Point Start Point
Center J Center I Cente K
C I
X C K
Z C J
Y

Fig. 3-8 Arc Cutting

An arc comprises three elements: a start point, an end point and a center. The
center (C) is defined by the I and J values, which are the increment or decrement
from the start point of the arc to the center of the circle. If the coordinates from
the start point to the center of the circle are incremental, the value is positive.
Otherwise, it is negative. I and J commands may be replaced by an R command.
(Fig. 3-8)

Start point (S) :the coordinate of the tool when the G02 and G03 commands are
executed.
End point (E) :X and Y value in the program.
Center :defined by the I and J values. The I and J values are the
coordinate differences between the arc start point and the center.
These values can be either positive or negative.

The arc feed-rate is defined by the F-value. Actual arc feed-rate: Ft =F x G01
MFO %.
E End Pint

Start Point Y
S
J
Center C X
I
Fig. 3-9

3 - 19
HUST H8-M Operator’s Manual

The arc center can be defined by the radius (R) instead of I and J.
But if the arc angle is between -1° and 1° or 179° and 181°, R cannot be used for
setting and only I and J can be used for setting.

Format (clockwise):

G02 X_____ Y_____ Z____ I_____ J_____ F_____

Y Fig. 3-10
X
E J
End Pint
S
Y Start Point

Format (counter clockwise):

G03 X_____ Y_____ I_____ J_____ F_____


Fig. 3-11
Y
X End Pint
E Start Point
S
Y
J
X
I

Format (defined by the radius):

G02 X_____ Y_____ Z(W)____ R_____ F_____


Fig. 3-12

Y
X R
End Pint E
S
Y Start Point

3 - 20
Chapter III Programming and Command Codes

Ex.: The following two commands have different settings but can be used to
execute the same arc cutting work.
(It is assumed that X and Y are absolute values.)

1. G02 X3.000 Y3.000 J2.500 F300


2. G02 X3.000 Y3.000 R2.500 F300
Y
3 R = 2.5
E
End Pint 1
3 Start Point S
2
5
X

Fig. 3-13 G02 Example

There are two different arc types available for arc cutting (Fig. 3-12). In this case:
1. Use “+R” if arc angle < 180°.
2. Use “-R” if arc angle > 180°.
R is within the range from -9999.mm to +9999.mm.

Ex.: In Fig. 3-13, an arc is cut with an angle <180°(+R):


G02 X60.000 Y20.000 R50.000 F300

R2
E End Pint
R=-50(negative)
R1 R = +50
S (positive)
Y
Start Point

X
Fig. 3-14

3 - 21
HUST H8-M Operator’s Manual

Please note the following when executing arc cutting:

1. The F value (i.e. the feed-rate) of G02, G03 is the tangential cutting speed. This
speed is subject to the radius of the arc and the F value of the program because
the HUST H8-M system uses a fixed 1μm chord height error (Chord Height
Error is the maximum distance between the arc and the chord).

2. When the calculated tangential cutting speed of the arc is greater than the F
value of the program, the F-value is used as the tangential cutting speed.
Otherwise, the calculated value prevails. The maximum tangential cutting
speed is estimated with the following formula:

Fc 85 u R u 1000 mm / min

Where R= Arc radius in mm.


Ex.: G02 X0.250 Y0.500 J0.25 F2000
Description: A speed of 2000.0 mm/min is used for this arc cutting work.
After calculation using the formula, the actual tangential
cutting speed Fc = 1344 mm/min. Thus, the actual tangential
cutting speed is 1344 mm/min.

Ex.: G02 X0.250 Y0.500 J0.25 F1000


Description: A speed of 1000.0 in/min is used for this arc cutting work.
After calculation using the formula, the actual tangential
cutting speed Fc = 1344 mm/min. Thus, the actual tangential
cutting speed is 1000 in/min.

3.6. Arc (Tread) Cutting, G02, G03, G17, G18, and G19

※ G17 ~ G19 Arc Plane Command


◎ The three command groups control arc cutting on the X-Y, X-Z, Y-Z plane.
The dimension is controlled by G17, G18, and G19. [G17 is the default
power-on dimension.]
◎ When executing arc cutting in the X-Y dimension, G17 can be omitted.
◎ The functions of G17, G18, and G19 will be described in the next sections.
The format of these command groups is a special thread cutting format (refer

3 - 22
Chapter III Programming and Command Codes

to the next sections). Arc cutting is then executed when the linear axis does
not move during the thread cutting.
Z

X-Z Plane

Y-Z
X Plane

X-Y Plane
Work Table Y

Fig. 3-15 G17~G17 Working Plane

Format: (X-, Y-, and Z-axis)


G17 ------ Default power-on dimension
G02 (or G03) X____ Y____ Z____ I____ J____ F____
(R can replace I, J)

Y G17

G02

G03

G18
G02 (or G03) X____ Z____ Y____ I____ K____ F____

X G18

G02

G03

Z
(R can replace I, K)

3 - 23
HUST H8-M Operator’s Manual

G19
G02 (or G03) Y____ Z____ X____ J____ K____ F____

Z
G19

G02

G03

Y
(R can replace J, K)

※ The three command groups control arc cutting on the X-Y, X-Z, Y-Z plane.
The dimension is controlled by G17, G18, and G19; the arc size is determined
by I, J, K.
rd th
※ In addition to the arc plane, specify the 3 and 4 axis. Arc cutting will be
performed if the axes do not execute movement. In this case, the G02 and G03
commands can be used as described in the previous section.
rd th
※ Thread cutting will be performed if the 3 and 4 axes execute movement.
th
※ The arc cutting command is not available for the 4 axis (A-axis). Only the
linear command is available.

※ The direction of the tool movement path is determined by G02, G03 and
G17~G19.

※ X, Y, Z:
The end point coordinates of arc cutting. The start point is the coordinates of
the tool when G02 or G03 executes.

※ I, J, K and R:
I, J and K are the increment or decrement from the start point of the arc to the
center of the circle. If the coordinates from the start point to the center of the
circle are incremental, the value is positive. Otherwise, it is negative. The
definition of this increment/decrement is the same as the incremental
commands U, V, and W. All of these commands can be replaced by the R
command.

※ F: The feed-rate for arc cutting is determined by the F-value. The minimum
value is 0.2 mm/min.

3 - 24
Chapter III Programming and Command Codes

※ The G17, G18 , and G19 commands should be placed in the block prior to the
arc cutting command.

Ex.:
G17
G02 (or G03) X____ Y____ Z____ I____ J____ F____

※ The thread cutting command is used to execute an arc cutting on a specified


plane and perform a linear cutting on a third axis along the path, which is the
same path as that of a constant-diameter spring.

※ Note that the tool radius compensation function is only available for the
specified cutting plane.
+Z

+Z
+Y
-X

+X
-Y

-Z

Fig. 3-16 X, Y, Z-axes 3D Diagram

G17, X-Y Arc Cutting Plane

As shown in Fig 3-16, if you look down at the machine from the above (along the
Z-axis toward the negative direction), you have the X-Y arc cutting plane with the
Z-axis as the linear axis. Clockwise is G02 and counter-clockwise is G03.

Y Y

G02 G03
X X
G17

Fig. 3-17

3 - 25
HUST H8-M Operator’s Manual

Ex.: X-Y arc cutting plane with Z-axis as linear axis

N1 G17
N2 G03 X80.000 Y30.000 R30.000 Z40.000 F100
Z End
Y
Point

40

30
R = 13
X
50 Start 30
Point
Fig. 3-18
G18, X-Z Arc Cutting Plane

As shown in Fig. 3-16, if you look at the machine from the back (along the Y-axis
toward the negative direction), you have a Z-X arc cutting plane with the Y-axis
as the linear axis. Clockwise is G02 and counter-clockwise is G03.

X X

G02 G03
Z Z
G18

Fig. 3-19

G19, Y-Z Arc Cutting Plane

As shown in Fig. 3-16, If you look at the machine from the back (along the Z-axis
toward the negative direction), you have a Y-Z arc cutting plane with the X-axis
as the linear axis. Clockwise is G02 and counter-clockwise is G03.

Z Z

G02 G03
Y Y
G19

Fig. 3-20

3 - 26
Chapter III Programming and Command Codes

3.7. Dwell Command, G04


Format:

G04 X_____ X: Dwell time in sec (the X here indicates time rather than
position).
or G04 P_____ P: Dwell time in ms (millisecond)

To meet machining requirements, the axial movement may need to be held during
the execution of a program block, which completes before the command for the
next block is executed. This command can be used for this purpose.

If a program contains X and P, P prevails.

G04 X____ Format = □□□□.□□□ (sec).The maximum value is 9999.999


sec.
The 4/3 format is always applied for G04 X___, regardless of the format for the
controller.

Ex.: G04 X200 means the dwell time is 0.200 sec


G04 X.5 means the dwell time is 1.5 sec

Ex.: N1 G1 X10.000 Y10.000 F1000


N2 G4 X2.000 ……………….…… dwell for 2 sec
N3 G0 X0.000 Y0.000

3.8. Machine Coordinate Setting, G08

Format: G08 or G08 X__Y__ Z__A__ B__C__ U__V__


The machine coordinates of the X-, Y-, Z-, A-, B-, C-, U-, and V-axis will be
cleared to zero and their current axial position will be identified as the machine
origin after execution of the above commands.

The coordinate of a single axis is cleared to zero.

Format: G08 X__; The machine coordinate of the X-axis is cleared to zero.
Format: G08 Y__; The machine coordinate of the Y-axis is cleared to zero.

3 - 27
HUST H8-M Operator’s Manual

Format: G08 Z__; The machine coordinate of the Z-axis is cleared to zero.
Format: G08 A__; The machine coordinate of the A-axis is cleared to zero.

1. In MDI mode, execute the “G08” command


2. New machine origin after execution
Former Machine
Origin

Fig. 3-21
Ex. 1: The first work coordinate of the X- and Y-axis: (0, 0)
Machine coordinate: MCM#1 = MCM#2 = 0.
When the program coordinate moves to (X, Y) = (02, 35), “G08”
executes
The program coordinate of this point will become (X,Y) = (0,0).

1. (X,Y) Former Program Coordinate = (02,35)


2. In MDI mode, execute the “G08” command
3. (X,Y) New Machine Coordinate = (0,0)
Former Machine 4. (X,Y) New Program Coordinate = (0,0)
Origin and Work
Origin

New machine origin and work


origin after execution of G08 Fig. 3-22

Ex. 2: The first work coordinate of the X- and Y-axis: (10, 10)
Machine coordinate #7000 = #7001 = 10.
When the program coordinate moves to (X, Y) = (15, 15), execute the
“G08” command.
The program coordinate of this point will become (X,Y) = (-10,-
10).
Machine origin Work origin
after execution after execution
Former Work of G08 of G08
Origin of the 1st
Work Coordinate

1. (X,Y) Former Program Coordinate = (15,15)


2. In MDI mode, execute the “G08” command
Former 3. (X,Y) New Machine Coordinate = (0,0)
Machine Origin 4. (X,Y) New Program Coordinate = (-10,-10)
Fig. 3-23

3 - 28
Chapter III Programming and Command Codes

3.9. Data Setting, G10


Table 3-2 G10 Command Code of HUST H8-M Series
G10 Command Code List
G10 X** Y** Set original point of work piece of G54-G59
work coordinate series
G10 X** Y** P** Set cutter length compensation
G10 X** Y** P1** Set cutter wear compensation
G10 X** Y** P2** Erase cutter wear compensation
(*) Only professional personnel are allowed to use this function, to
avoid danger.

3.9.1 Set the Work Origin Using G10 (Recommended), G10


Set the work origin on the G54~G59 work coordinate system using the G10
command. The user may use the MDI key on the HUST H8-M Series or Execute the
function through the built-in PLC by customization.

Format:

G10 X_ Y__ Z__A__ B__ C_ U__V__; select an axis or all eight axes.

Steps for setting the work origin (G54~G59) using G10:

1. Return to Home manually.


2. Enter JOG mode.
3. Move the tool to the desired position where the work origin is to be set.
4. Enter MDI mode, input G54, and press Start.

5A. If the coordinates of the tool in Step 3 are the desired position for the work
origin, do the following:

Press G10 Input,


X0. Input,
Y0. Input,
Z0. Input,
Press the Start key to finish the setting.

3 - 29
HUST H8-M Operator’s Manual

5B.If the coordinates of the tool in Step 3 are at some distance (say X=20, Y=100,
Z=15) away from the desired work origin, do the following:

Press G10 Input,


X20. Input,
Y100. Input,
Z15. Input,
Press the CYCST key to complete the setting process.

The following precautions should be observed when using G10 to set the work
origin:

1. Do not add P__ to the G10 block; otherwise, it becomes a tool length
(movement) compensation command.

2. The same procedure is applicable to the G55~G59 coordinate system, except


that G54 is replaced by G55~G59 in Step 4. If no coordinates from G54 to
G59 are specified in step 4, the work origin data will be entered into the
currently valid work coordinate system.

3. The G10 command can also be applied in the program.

4. When G54~G59 are selected by G10, the machine position data of the origin
will be entered into variables #7000~#7047 regarding the x, y, z, a, b, c, u, v
items.

5. A PLC can also be used to set the work origin. (C_BIT 233)

Axis
Work X-axis Y-axis Z-axis A-axis B-axis C-axis U-axis V-axis
Coordinate

G54 #7000 #7001 #7002 #7003 #7004 #7005 #7006 #7007


G55 #7010 #7011 #7012 #7013 #7014 #7015 #7016 #7017
G56 #7020 #7021 #7022 #7023 #7024 #7025 #7026 #7027
G57 #7030 #7031 #7032 #7033 #7034 #7035 #7036 #7037
G58 #7040 #7041 #7042 #7043 #7044 #7045 #7046 #7047
G59 #7050 #7051 #7052 #7053 #7054 #7055 #7056 #7057

3 - 30
Chapter III Programming and Command Codes

3.9.2 G10 method setting of cutter length compensation (suggested method),


G10 format:
G10 X_ Y__ Z__A__ B__ C__U__V__ PXX(00-39)。
Scope: MOM7060-7459
Division 1: 7060-7069

Division 40: 7450-7459


Example:
1. Enter MD1 mode
2. Input in sequence:
G10 INPUT
X10. INPUT
Y10. INPUT
P03 INPUT
Start
Set the X and Y ordinates for Division 4 cutter length compensation

3.9.3 G10 method setting of cutter wear compensation (suggested method),


G10 format
G10 X_ Y__ Z__A__ B__ C_U__V__ P1XX(00-39) Set cutter wear compensation
G10 X_ Y__ Z__A__ B__ C_U__V__ P2XX(00-39) Erase cutter wear compensation
Scope: MOM7460-7859
Division 1: 7460-7469
.
Division 40: 7850-7859
Example:
1. Enter MDI mode
2. Input in sequence:
G10 INPUT
X0.5 INPUT
Y0.5 INPUT
P103 INPUT
Start
Set X and Y coordinates of Division 4 cutter wear compensation

3. Input in sequence
G10 INPUT

3 - 31
HUST H8-M Operator’s Manual

X0.5 INPUT
Y0.5 INPUT
P203 INPUT
Start
Erase X and Y compensation value of Division 4 cutter wear

3 - 32
Chapter III Programming and Command Codes

3.10. Easy I/O Control, G11, G12


Table 3-2 Easy I/O Command Codes

Format: Function

G11 easy I/O control


Set OUTPUT ** to ON; OUTPUT ** will be OFF when the
G11 P**
“RESET” command is given.
Set OUTPUT ** to ON; OUTPUT ** will be OFF when the Feed
G11 P** L'''
Hold command is given.
G11 P-** Set OUTPUT ** to OFF.
Set OUTPUT ** to ON; nothing occurs when the “RESET”
G11 P1***
command is given.
Set OUTPUT ** to OFF; nothing occurs when the “RESET”
G11 P-1***
command is given.
G12 easy input control

G12 P** The next command will not be executed until INPUT ** is On.
The next command will not be executed until INPUT ** is triggered
G12 P** L'''
on the rising edge.
G12 P-** The next command will not be executed until INPUT ** is OFF.
The next commands will not be executed until INPUT ** is triggered
G12 P-** L'''
on the falling edge.

3 - 33
HUST H8-M Operator’s Manual

3.10.1 Easy I/O Control, G11

1. G11 P** & G11 P-** & G11 P10** & G11 P-10**

** Range 00 ~ 15; P** is used to set OUTPUT ** to ON. In this case, output
will be set to OFF when the “RESET” command is executed. P-** is used to
set OUTPUT ** to OFF.

G11 P10 ** is used to set OUTPUT ** to ON. In this case, output will remain
ON if the “RESET” command is executed. P-10 ** is used to set OUTPUT **
to OFF.

Ex. 1: N10 G00 X30. F1000


N20 G11 P13
N30 G00 X60.
N40 G00 X100.
N50 M30
F (mm/min)

G00 X30. G00 X60. G00 X100.

X-axis Positioning (mm)


30 60 100
G11 P13 Execute “RESET”

O13

Fig. 3-22

3 - 34
Chapter III Programming and Command Codes

Ex. 2: N10 G00 X30. F1000


N20 G11 P13
N30 G00 X60.
N40 G11 P-13
N50 G00 X100.
N60 M30

F (mm/min)

G00 X30. G00 X60. G00 X100.

X-axis Positioning (mm)


30 60 100
G11 P13 G11 P-13

O13 (mm)

Fig. 3-24

3 - 35
HUST H8-M Operator’s Manual

3.10.2 Easy I/O Control, G12

1. G12 P** L'''

** Range 00 ~ 23. The next block will not be executed until INPUT ** is ON.
If a number is specified for L''', the next block will not be executed until
INPUT ** is triggered on the rising edge.

Ex.: N10 G00 X30. F1000


N20 G12 P3
N30 G00 X60.
N40 G00 X100.
N50 M30

F (mm/min)

G00 X30. G00 X60. G00 X100.

30 60 X-axis Positioning (mm)


100
G12 P3

I3
The N30 block will not be executed until I3 is ON.

Fig. 3-30
2. G12 P-** L'''

** Range 00 ~ 23. The next block will not be executed until INPUT ** is
OFF. If a number is specified for L''', the next block will not be executed
until INPUT ** is triggered on the falling edge.

3 - 36
Chapter III Programming and Command Codes

Ex.: N10 G00 X30. F1000


N20 G12 P-4
N30 G00 X60.
N40 G00 X100.
N50 M30

F (mm/min)

G00 X30. G00 X60. G00 X100.

30 60 X-axis Positioning (mm)


100
G12 P-4

I4

The N30 block will not be executed until I4 is OFF.

Fig. 3-31

3.11. Return to the First Reference Point, G28


Format:

G28 or G28 X__ Y__ Z__ A_ B__ C__ U__ V__

The 4-axis tool will automatically return to the reference position specified by
variables #9380 ~ 9387, if the G28 block does not contain an X, Y, Z, or A
command, or all of them.

G28 X_____ or G28 Y_____or G28 Z _____or G28 A _____


G28 B_____ or G28 C_____or G28 U _____or G28 V ____

The specified axial tool will automatically return to the reference position
specified by variables #9380 ~ 9387 if the G28 block only contains an
X/Y/Z/A/B/C/U/V command, regardless of the values placed after
X/Y/Z/A/B/C/U/V.

3 - 37
HUST H8-M Operator’s Manual

Note that prior to the G28 command, the tool length compensation command
must be canceled.

Ex.: G49
G28 X10.0 .....X-axis returns to the 1st reference point

3.12. Return To Previous Position From Reference Point, G29


Format:

G29 or G29 X__ Y__ Z__ A_ B__ C__ U__ V__


When the tool must return to the previous position before G28 is executed, use the G29
command. This command cannot be used separately. It must be executed following the
G28 or G30 command. The 8-axis tool will automatically return from the reference
point if the G29 command does not contain X/Y/Z/A/B/C/U/V commands. Or if
the G29 command specifies an axis, the specified axis will return to the previous
position from the reference point.

Ex.: N1 X60. Y30. Z5. ..... Tool moves to the position X60., Y30.
N2 G28 ..... Tool returns from X60, Y30 to the 1st reference point.
⋯⋯⋯⋯
N3 G29 ..... Tool returns from the reference point to X60., Y30.

As shown in the above Ex., the N3 block may have the following combinations:
N3 G29 or N3 G29 X__ Y__ Z__ A_ B__ C__ U__ V __
The tool returns to X60.00, Y30.00 Z5 if the G29 command does not contain
X,Y⋯U,V commands or all of them, regardless of the values placed after X,Y⋯
U,V.

3.13. Return to the Second (2nd) Reference Point, G30


Format:

G30 X__ Y__ Z__ A_ B__ C__ U__ V__

Execution of this command is same as G28, but the reference point is set in variable #
9400~9407.

3 - 38
Chapter III Programming and Command Codes

3.14. Skip Function, G31


3.14.1 High Speed Skip Function, G31

(1) Feeding Control Diagram

Roller Photo
Sensor Cutter

Material

General
Purpose Servo Motor

HUST CNC

Fig. 3-38 Feeding Control Diagram

3 - 39
HUST H8-M Operator’s Manual

(2) Material Cutting Description

Start the servo motor for feeding with the roller. The motor will operate for a
given distance once the photo sensor detects the positioning point. After the
given distance, the servo motor will stop and send signals to the cutter to cut
the materials.

Step 1: Start the servo motor for feeding with the roller until the photo sensor
detects the positioning point.
Photo Sensor Distance> Motor Deceleration Distance

Label Pattern Mark Cutting Position


Cutter

Feeding

Direction

Fig. 3-39 Material Cutting Step 1

Step 2: Once the photo sensor detects the positioning point, the motor will
operate for a given distance, which must be longer than the motor
deceleration distance.

Photo Sensor Distance> Motor Deceleration Distance

Label Pattern Mark Cutting Position Cutter

Feeding

Direction

Fig. 3-40 Material Cutting Step 2

3 - 40
Chapter III Programming and Command Codes

V × t × 1/2 = d
(3) Motor Deceleration Distance
Speed×Acceleration/Deceleration
V Time×1/2=Distance

t T
Fig. 3-41 Motor Deceleration Distance

V × t × 1/2 = d
Speed x Acceleration/Deceleration Time x 1/2 = Distance

Ex.: Max. feed-rate =12000mm/min


G01 acceleration/deceleration time =10ms

Motor acceleration distance formula:


12000 mm/min=200 mm/sec
200 mm/sec×10 ms×1/2= 1mm

(4) Min. Mark Width Formula

Ex.: Program command G31 X#1 F#2 P00


Wherein #2=12000 mm/min
When general INPUT is selected, the response time is 2 msec.

Min. MARK Width Formula:


12000 mm/min=200 mm/sec
2 msec=0.002 sec
200 mm/sec × 0.002 sec=0.4 mm

3 - 41
HUST H8-M Operator’s Manual

3.14.2 Skip Function, G31

Format:

G31 X__ Y__ Z__ A__ B__ C__ U__ V__ F__

X/Y/Z/A/B/C/U/V : Predicted end point in absolute coordinates.


The H8-M interrupt point is I0, which is unchangeable.
F : Cutting feed-rate.
G31 functions in the same manner as G01 until the skip function is established;
i.e. G31 executes linear cutting along the X, Y coordinates. Once an interrupt
signal is detected during cutting, the G31 skip function is established and the G31
block is skipped.

When G31 is performing linear cutting, the feed-rate is the one already in effect.
If the F value is not set, the settings of variable #8330 (G01 power-on speed) will
be applied. G31 is a one-shot G-code and is only valid in the defined block. The
following is an Ex. of G31.

Ex.: N10 G31 U100.000


N20 G01 V25.000
N30 X90. Y30.
(X90., Y30.)

Y
25
Signals arrive
X
100.

Fig. 3-43 Skip Function

In the above figure, the dashed line represents the original path without the SKIP
function and the solid line is the actual tool path after the SKIP function signal
I007 is received. The G31 function is suitable for a wide variety of applications.
Here are three examples:

1. The striker is used to detect and measure the length of the work piece. The
interrupt signal is generated and the G31 function is established when the striker
is hit.

3 - 42
Chapter III Programming and Command Codes

2. Design paper cutting: Because of paper tension, you may receive inaccurate
results when measuring design papers by length. But you can accurately
perform cutting at a pinpoint by taking advantage of the properties of a
certain pattern to send interrupt signals.

2. Spring machine cutting: The G31 function is established and cutting is


performed at the other end, or the program is notified to interrupt the block
and execute its next block, when the sensor of a machine that is used to
produce coil springs detects the lead section of the spring and sends an
interrupt signal.

3 - 43
HUST H8-M Operator’s Manual

3.15. Work Coordinate System Setting


There are two coordinate systems for CNC machine tools. This section describes
how to use these coordinate systems.

1. Machine Coordinate System (Home)


3. Work Coordinate System (G54~G59)

3.15.1 Machine Coordinate System (Home)


The origin of the machine coordinate system is a fixed point on the machine.
When you Execute HOME from the control panel, the tool or the machine table
will move toward the OTLS, then reverse and go back to look for the encoder
GRID signal. When it locates the GRID, the tool stops. This location is the
HOME position or machine origin.

The machine origin is the calculation basis for all work and reference point
coordinates. Its position is normally determined by the position of the travel-
measuring rule on the machine table and the position of the over-travel limit
switches (OTLS). Before cutting, be sure to Execute HOME to determine the
position of the machine origin.

Another origin may be required for cutting convenience. This origin is slightly
shifted from the machine origin and, thus, is called HOME SHIFT. The shift
amount is configured in variables #9280 ~ 9287. When you Execute HOME, the
tool returns to the HOME position but the machine coordinate shows the shift
value of variables #9280 ~ 9287. If the shift value of variables #9280 ~ 9287 are
set to zero (0), HOME SHIFT is the HOME position.

Ex.: If the variable # 9280 setting (X-axis) = 10.000, the screen will show 10.000,
instead of 0.000 when homing completes.

The methods to return to the HOME position are:

1. Manually return to the HOME position.


2. Use G28 or G30 to home the tools when the reference coordinates in MCM
are set to zero for the X, Y (The origin obtained by G28 may be inaccurate
if homing is not executed and the screen shows ERROR2,22)

3 - 44
Chapter III Programming and Command Codes

3.15.2 Work Coordinate System, G54~G59


The HUST H8-M series provides 6 sets of work origins. The coordinate system
comprising these work origins is called the Work Coordinate System. The 6 sets
of work origins are located relative to the position of the machine origin. Their
coordinates are called machine coordinates and are stored in variables
##7000~#7059.

Coordinate data can be entered via:

1. G10 command
2. Direct modification of MCM parameters
3. PLC.

The application of these work origins in the program is executed by the G54~G59
command codes. Depending on processing requirements and programming, the
user can select up to six sets of work origins to work with. The greatest advantage
of this work coordinate system is to simplify the coordinate operation of the part
program. See the following examples:

Fig 3-20 shows the association of the G54~G59 work coordinate system with
variables #7000 ~ 7059 X, Y, Z, A, B, C. These coordinate parameters, i.e. the
work origin, correspond to the machine coordinates when the machine origin
serves as the zero point. The work origin settings of the G54 ~ G59 work
coordinates are listed in the following table.
An XY drawing is used for illustration. Since it is difficult to illustrate the Z-axis
and other axes using the plane coordinate system, the Z-axis and other axes will
not be mentioned.

Work
Coordinate Variable Number X-axis Setting Y-axis Setting
System
G54 #7000(X), #7001(Y) -70.000 -10.000
G55 #7010(X), #7011(Y) -80.000 -30.000
G56 #7020(X), #7021(Y) -80.000 -50.000
G57 #7030(X), #7031(Y) -70.000 -50.000
G58 #7040(X), #7041(Y) -40.000 -60.000
G59 #7050(X), #7051(Y) -20.000 -40.000

3 - 45
HUST H8-M Operator’s Manual

Y
Machine Origin
-90 -80 -70 -60 -50 -40 -30 -20 -10

X
G54
-10
-20
G55
-30
G59
-40
G56 G57
-50

-60
G58
-70

Fig.3-44 G54~G59 Work Coordinate System

Note that the program coordinates are changed when the work coordinate system
is selected. The changed coordinates are determined based on the selected work
coordinate system. When the action of cutting a circle or semi-circle is added to
the above program, the application of G54 and G55 can be illustrated as follows.
(Fig. 3-45)
Y

-90 -80 -70 -60 -50 -40 -30 -20 -10 Machine Origin

R
X
G54
-10

-20
G55
-30
G59
-40
G56 G57
-50
-60
G58
-70

Fig. 3-45 G54~G59 Applications

Ex.: Application of G54 and G55


N1 G54 ... Select the first work coordinate
N2 G0 X0 Y0 ... Set to program coordinates X0, Y0
(machine coordinate X-70.,Y-10.)
N3 G2 I-7.0 F200 ... Cut a circle moving CW with R=7.0

3 - 46
Chapter III Programming and Command Codes

N4 G0 ... Feed-rate set to fast move mode


N5 G55 ... Select the second work coordinate
N2 G0 X0 Y0 ... Set to program coordinates X0, Y0
(machine coordinate X-80.,Y-30.)
N6 G1 V10.0 F300 ... X-axis feeding (incremental command)
travels to +10.0
N7 G3 V-20.0 R10.0 F300 Cut a half-circle moving CCW with R=10.0
N8 G1 V10.0 F300. ... X-axis feeding (incremental command)
travels to +10.0
N9 G28 ... If the first reference point = 0, the
program returns to the machine origin.
N10 M2 ... Program end

1. The work coordinate system is selected by Executing G54~G59.


2. After Executing G54~59, the machine coordinates of the work origin change
along with the settings for the new coordinates.
3. Modification of the currently used work coordinate system and program
origin is possible with a command like this: G10 X__Y__.
(Refer to Section 3.10.1 Work Origin Setting, G10)
4. The power-on or reset default is the G54 work coordinate system.

3 - 47
HUST H8-M Operator’s Manual

3.16. One Shoot Command


Format:

G61 Enable non-stop mode MCM 8336=256


G62 Disable non-stop mode MCM 8336=0
G63 X ,Y ,…U ,F Enable non-stop mode (one shoot)
Description:
When the G61 (G63) parameter (8340=0) is used, a round is used
between blocks. The round is determined by the F value. When the
parameter (8340>0) is used, a slight discontinuity will occur in each block
due to validation of precision. Precision gains at the cost of speed.

Ex.:
G1 X50.Y50.
G61 Enable non-stop mode
G1 X100.F1000.
Y100. Non-stop
X50. block
Y50.
G62 Disable non-stop mode
G1 X100.F1000.
G63 Y0. The non-stop mode is
G1 X50. enabled only in this block. The left is a normal path while the right is
M30 the path generated by the command G61
and G63.

3 - 48
Chapter III Programming and Command Codes

3.17. Cutting Feed-rate Control Command, G98, G99


Format:
G98…… Feed-rate (F) unit: mm/min
G99…… Feed-rate (F) unit: mm/rev

Power-on and reset default is G98 mode in mm/min.


G98 mode is mainly used for typical applications while G99 mode is used for
special cases, such as a winding machine.
In G99 mode, special attention should be paid to the following considerations:

1. The G99 command must be used in G01 mode and will be invalid for G00 fast
positioning.

2. In G99 mode, the machine tool requires a rotary spindle and encoder feedback
to configure “variable #8341 => Spindle Axis, variable #8342 => Spindle
Encode Setting” in PLC ladder.

3. In G99 mode, G00, G01, G02 always perform linear acceleration/deceleration,


regardless of the settings of variable #8394 (acceleration/deceleration type).

4. Select an axis for rotary spindle or passive encoder feedback in variable #8341.

Variable #8341 0 1 2 3 4 5 6 7 8
Spindle Axis None X Y Z A B C U V

5. Be sure to confirm the following relevant parameter settings when using G99.
Variable Description
#8341 Spindle Axis
#8342 Set the number of encode feedback pulses to a specific value,
which is four times the number of feedback pulses.

Ex.: To design a rotary spindle connected to the Z-axis to drive the X- and Y-axis
The pulses sent by the encoder feedback per revolution is 2000.
1. Set variable #8341 to 3 in PLC (Z-axis as the spindle)
2. Variable # 8342 = 8000 (2000 x 4)
3. Part program contents:
G99 ……………Feed-rate (F) unit: mm/rev
G01 X30.000 Y30.000 F0.2

3 - 49
HUST H8-M Operator’s Manual

(F0.2 indicates that the tool or another workpiece will move 0.2mm on the
X- and Y-axis in block G01 when the rotary spindle makes a turn(8000 pulses))

3.18. Canned Cycle Functions (H8-M only), G81~G89, G80

The Hust H8-M provides a number of canned cycle cutting functions for
processing. They form a command group and are executed using a specific G-
code. The H8-M series provides several canned cycle functions to simplify
program design. The cutting sequence controlled by the canned cycle command
group of the H8-M is illustrated in Fig. 3-46 below.

1 Path 5, 6 is identical to path 2, 3 but goes


S Point in the reverse direction. For convenience,
they are illustrated respectively.
2 6

R Point (Drilling reference


point)
3 5
G00 rate
G01 rate
Z Point (Hole Bottom)

Fig. 3-46 Canned Cycle Cutting Sequence

1. Fast positioning to the start (S) point on the X-Y plane.


2. Fast positioning to the reference point for drilling start (R) along the Z-
axis.
3. Hole drilling at the bottom (Z) along the Z-axis.
4. Mechanical action at the hole bottom – tool waits or spindle rotation
reverses.
5. Drill bit retracted to R-point. The moving speed depends on the
command specified.
6. Move back to the start point S at the G00 feed-rate.

When applying the canned cycle function, M03 is used for normal spindle
rotation, M04 is used for reverse spindle rotation, and M05 is used for spindle
stop.

Basic Format For Canned Cycle Functions:

3 - 50
Chapter III Programming and Command Codes

G90 or G91
G98
(G81~G89) X____Y____Z____P____Q____R____F____K____
G80 or G00 or G01

Explanation:

X, Y : Specify the absolute or incremental coordinate for the hole.


Z : Specify the absolute or incremental depth or coordinate for the hole.
P : Dwell at the hole bottom. Unit: ms; i.e. 1000 stands for one second.
Q : G83 amount of feed for each cut, in μm.
R : Specify the absolute or incremental coordinate for the R-point. R is the
reference point of feeding/retraction.
F : Feed-rate setting.
K : Processing repetition setting.

During the drilling operation, parameters such as the specified drilling mode
(such as G81, G82, and so on), feeding/retraction reference point, and hole depth
or coordinate (Z) are mode codes. They will not change before other command
codes of the same group are set up. The single block command for each basic
format with respect to the canned cycle function is described in detailed below.

3.19. G90 or G91-Absolute or Incremental Coordinate Setting


These commands were described in the previous section. In a canned cycle

3 - 51
HUST H8-M Operator’s Manual

program, R and Z are coordinates relative to the zero point of the Z-axis in the
absolute coordinates system, while Z is an incremental coordinate relative to the
R-point in the incremental coordinate system. Though the R and Z coordinates
remain unchanged in the program, their displacement coordinates are different
(Fig. 3-47) when Executing different commands (G90/G91).

G90 Absolute G91 Incremental


Coordinate Coordinate
Start Point Start Point
S Point S Point

Z-axis zero point


R
R
R Point R Point
Z

Z
Z Point (Hole Bottom)

G00 rate
G01 rate Z Point (Hole Bottom)

Fig. 3-47 G90 and G91 Application

3.20. G80, G81~G89 -- Canned Cycle Commands


The definition of each parameter for canned cycle commands has been described
above. The work-piece cutting applications for G80~G89 are tabulated in Table
3-48.

Retraction
G-code Application Drill Rate Action at Bottom
Rate
G80 Cycle canceled --- ----- ---
Drilling Canned G01 Feed
G81 --- G00 Fast
Cycle rate
Drilling Canned G01 Feed
G82 Dwell Command G00 Fast
Cycle rate
Deep Hole
G01 Feed
G83 Drilling (peck --- G00 Fast
rate
drill)
Thread Tapping G99 Feed
G84 G99 Fast
Canned rate
Boring Canned G01 Feed
G85 --- G01 Rate
Cycle rate

3 - 52
Chapter III Programming and Command Codes

Boring Canned G01 Feed


G86 Spindle stop G01 Fast
Cycle rate
Boring Canned G01 Feed
G89 Dwell Command G01 Rate
Cycle rate

Table 3-48 G80~G89 Application

3.21. G80 Cancellation of Canned Cycle

All canned cycle commands are cancelled by Executing G80, G00 or G01.

3.22. G81 Drilling Canned Cycle

Format:

G81 X____Y____Z____R____K____F____

(X,Y)
S Start Point

R Point
G00 rate
G01 rate

Z Point (Hole Bottom)

Fig. 3-49 G81 Drilling Canned Cycle

3 - 53
HUST H8-M Operator’s Manual

3.23. G82 Drilling Canned Cycle

Format:

G82 X____Y____Z____P____R____K____F____

(X,Y)
S Start Point

R Point
G00 rate
G01 rate

Z Point (Hole
Bottom)
P (Dwell
at hole bottom)

Fig. 3-50 G82 Drilling Canned Cycle

The difference between G81 and G82 is that G82 has a wait time (P) before
retraction when the drill bit reaches bottom. The wait time (P) is input as an
integer in milliseconds.

3.24. G83 Deep Drilling Canned (peck drill) Cycle


Format:

G83 X____ Y____ Z____ R____ ____ K____ F____

S Start Point
(X,Y)

R Point
Q
d
Q

G00 rate
G01 rate

Fig. 3-51 G83 Deep Drilling Canned Cycle (peck drill)

3 - 54
Chapter III Programming and Command Codes

In Fig. 3-42, Q is the depth of each drilling and d is the reservation for the change
of the feed-rate from G00 to G01 after the second feeding. This data is set in
MCM parameter #8352. (The d value can be changed in the graphical input form.)

3.25. G84 Tap Cutting Canned Cycle

Format:

G84 X_____ Y_____ Z_____ R_____ F_____

(X,Y)
Start point

R
point
G00 rate
G01 rate

Z point
(bottom)

Fig. 3-42 Tap Cutting Canned Cycle, G84

Notes on tap cutting canned cycle:


※The “Close Loop” (parameter setting) should be used for spindle control.
This editing screen will not be displayed if the setting is used for spindle
control.
※When giving the G84 command, the spindle has to be operating.
※For tap cutting command, the F value indicates pitch in mm.
Tap cutting example:

G0 Z10. ……………………………….Fast positioning to Z10.


M3 S500. ……………………………..Normal spindle rotation at a speed of
500.
G84 X50. Y50. Z-30. R0. F2. ……. First hole
X80. …………………………………..Second hole
X100. ………………………………….Third hole
G80 ………………………………….Tap cutting canned cycle ends.

M30 ………………………………….Program ends.

3 - 55
HUST H8-M Operator’s Manual

3.26. G85 Boring Canned Cycle


Format:

G85 X____Y____Z____R____K____F____

(X,Y)
S Start Point

R Point

G00 rate
G01 rate

Z Point (Hole
Bottom)

Fig. 3-52 G85 Boring Canned Cycle

3.27. G86 Boring Canned Cycle (Spindle Stops at Hole Bottom)

G86 X____Y____Z____R____K____F____

(X,Y)
S Start Point

R Point
G00 rate
G01 rate

Z Point (Hole
Bottom)
Spindle
stops.

Fig. 3-53 G86 Boring Canned Cycle

The difference between G85 and G86 is that the G86 spindle stops before
retraction when the drill bit reaches the hole bottom.

3 - 56
Chapter III Programming and Command Codes

3.28. G89 Boring Canned Cycle with Dwell at Hole Bottom


Format:

G89 X____Y____Z____R____P____K____F____

(X,Y)
S Start Point

R Point
G00 rate
G01 rate
Z Point (Hole
Bottom)
P (Dwell at hole
bottom)

Fig. 3-54 G89 Boring Canned Cycle

The difference between G85 and G89 is that G89 has a wait time (P) before
retraction when the drill bit reaches bottom. The wait time (P) is input as an
integer in milliseconds.

3.29. G22 Linear Groove Milling (Only available in absolute mode)


Format:
G22 X___ Y___ Z____ R___ I____ J____ F____

X Start point coordinate X Action Diagram


Y Start point coordinate Y G00 rate
Z Groove depth
R Height of outer part G00 rate
I The X-axis incremental coordinate with an end
point relative to the start point.
J The Y-axis incremental coordinate with an end
point relative to the start point.
F Groove speed R
Point
Explanation:
1. G00 X(x) Y(y)
2. G00 Z(r) Z Point (Hole Bottom)
3. G01 Z(z) F(f)
4. G01 X(x+I) Y(y+j)
5. G00 Z(r)

3 - 57
HUST H8-M Operator’s Manual

3.30. G23 Arc Groove Milling (Only available in absolute mode)


Format:

G23 X___Y___Z___R___I___J____K___T___F____

X Start point coordinate


Y Start point coordinate
Z Groove depth
R Height of outer part
I The X-axis incremental coordinate with an end point Action Diagram
relative to the start point.
J The Y-axis incremental coordinate with an end point
relative to the start point.
K Radius of circle
T Groove type (0~1)
F Groove speed

Explanation:
1. G00 X(x) Y(y)
2. G00 Z(r)
3. G01 Z(z) F(f)
4. T=0; G02 U(i) V(j) R(k) F(f)
T=1; G03 U(i) V(j) R(k) F (f)
Action Diagram
5. G00 Z(r)

The gray area shows the cutting trajectory.

PS: R value is positive when an arc less than 180


degrees is cut.
R value is negative when an arc greater than
180 degrees is cut.

3 - 58
Chapter III Programming and Command Codes

3.31. G24 Square Groove Milling (Only available in absolute mode)


Format:

G24 X___Y___Z___R___I___J____D___T___F____

X Start point coordinate


Y Start point coordinate
Z Groove depth
R Height of outer part
I Groove width Cutting Diagram:
J Grooving length
D Tool radius
T Groove type (0~1)
F Groove speed

Explanation:
T=0;
1. G00 X(x) Y(y)
2. G00 Z(r)
3. G01 Z(z)
4. G01 U(i)
5. G01 V(j)
6. G01-U(i)
7. G01-V(j)
8. G00 Z(r)
Cutting Diagram:
T=1;

3 - 59
HUST H8-M Operator’s Manual

As shown in the above figure, an inner square is cut in a S-shaped groove milling
manner. It is then cut again along the side to remove the part that is not cut during
the S-shaped groove milling process.

3.32. G25 Round Groove Milling (Only available in absolute mode)


Format:

G24 X___Y___Z___R___I___J____D___T___F____

X Center coordinate
Y Center coordinate
Z Groove depth
R Height of outer part
K Radius of circle
D Tool radius
T Groove type
F Groove speed

Explanation:
T=0;
1. G00 X(x-k) Y(y)
2. G00 Z(r)
3. G01 Z(z) F(f)
4. G02 I(k) J(0) R(k) F(f)
5. G00 Z(r)

T=1;
1. G00 X(x-k) Y(y)
2. G00 Z(r)
3. G01 U(d) F(f)
4. G01 Z(z) F(f)
5. G02 I(k) J(0) R(k) F(f)
6. IF (k>d) THEN {[k=k-d]and[goto N3]}
7. G00 Z(r)

3 - 60
Chapter III Programming and Command Codes

3.33. Special Canned Cycle


The special canned cycle should be used in conjunction with canned cycle
commands G81~G89.
Before using the special canned cycle, the commands should be used to specify
the hole processing data.
If no hole processing data is specified by Executing the canned cycle commands,
the special canned cycle command only provides the positioning function without
drilling.
Tools travel between holes at the highest speed (G00).

3.34. G34 Circular Drilling Canned Cycle


Format:

G34 X___Y___ I___J____ Z___ R___K___F____

X Center coordinate
Y Center coordinate
I Radius of circle r
J Angle of the first hole –θ
R Feeding and retreating point for drilling
Z Bottom depth for drilling n = Amount of Circular
Holes
K The amount of circular holes – n
F Drilling speed
Ex.:
G34 X100. Y100. I50. J4500 Z-30. R-10. F2000

3 - 61
HUST H8-M Operator’s Manual

3.35. G35 Angular Linear Drilling Canned Cycle


Format:

G35 X___Y___ I___J____ Z___ R___K___F____

X Start point coordinate Action Diagram

Y Start point coordinate


I Drilling distance d
J Angle –θ
R Feeding and retreating point for drilling
Z Bottom depth for drilling
K The amount of linear holes - n n = Amount of Arc
F Drilling speed Holes

Ex.:
G35 X100. Y100. I50. J4500 Z-30. R-10. F2000
Action Diagram

3.36. G36 Arc Drilling Canned Cycle


Format:

G36 X___ Y___ I ___ J ____ P ____ Z___ R___ K ___ F____

X Center coordinate
Y Center coordinate
I Radius of circle
J Angle of the first hole –θ
P Angle of each drilling
R Feeding and retreating point for drilling (X, Y) Center Coordinate
Z Bottom depth for drilling
n = Amount of Arc Holes
K The amount of arc holes
F Drilling speed

3 - 62
Chapter III Programming and Command Codes

Ex.:
G36 X100. Y100. I50. J1000 P3000 K4 Z-30. R-10. F2000

Center
Coordinate

4 = Amount of Arc
Holes

3.37. G37 Grid Drilling Canned Cycle


G37 X___Y___ I___P___J____ Z___ R___K___F____

X Start point coordinate


Y Start point coordinate
I X-axis space
P Drilling numbers of X-axis
J Y-axis space
R Feeding and retreating point for drilling
Z Bottom depth for drilling
K Drilling numbers of Y-axis
F The amount of arc holes

Ex.:
G37 X100. Y100. I10. P4 J10. K3 Z-30. R-10. F2000

3.38. Customized Program Group [MACRO] Command, G65


G65 is used for basic and logic operations for some variables and Executes the
program branching function after analyzing a specified variable. G65 is available
to the main program and subprogram. A group of G65 commands can be formed
as an independent program group with the same structure as the subprogram. For
definition of each operator with respect to a program group command, refer to
Table 3-2.

G65 Format:

3 - 63
HUST H8-M Operator’s Manual

G65 Lm P#i A#j B#k

L, P, A, B : G65 codes are unchangeable.


m : Operator code as defined in Table 3-3.
Ex.: L2 stands for addition (+) and L3 stands for subtraction (-).

#i : Functions.
1. P#i is the location to store the result of mathematical
operations.
2. Pi is the program serial number for line feed when a function
is deemed as valid.

#j : Variable name 1. This function represents a variable number or


a constant.
CASE1: A#j, j represents a variable number in the range 1 --
9999.
CASE2: Aj :j represents a constant in the range -9999999 --
9999999.
Please note that the format "Aj" has no "#".

#k : Variable name 2. This function represents a variable number or


a constant.
CASE1: A#j, j represents a variable number in the range 1 --
9999.
CASE2: Aj :j represents a constant in the range -9999999 --
9999999.
Please note that the format "Aj" has no "#".

3 - 64
Chapter III Programming and Command Codes

Variable Explanations:

1. Variable #i
#1~#9999 : User defined variables,
These can be stored when the power is turned off.
#10000 and above : These are read-only controller system variables. No change is
allowed.

2. All variables (#i, #j, #k) can only contain integers. No decimal value should
be used. #i must be positive, while #j and #k can be positive or negative. A
negative integer indicates that the sign of the value contained in that variable
is inverted.
Ex. 1: #2 = 99
G65 L01 P#1 A-#2 ; #1 = -#2 = -99.

Ex. 2: #2 = 25, #3 = 5
G65 L04 P#1 A#2 B-#3 ; #1 = #2× -#3 = -125.

3. If the value specified for #j or #k is entered as a constant, it must be an


integer (max 7 digits, + or -). The input unit depends on the decimal format
of the G65 command. Refer to Section 6.5 for details.

Decimal Point 1 (6/1 format) 2 (5/2 format) 3 (4/3 format) 4 (3/4 format)
Unit 100μm 10μm 1μm 0.1μm
Ex.: 250 entered 25000μm 2500μm 250μm 25μm

3 - 65
HUST H8-M Operator’s Manual

Table 3-3 Mathematical Operator Definitions For HUST G65 Command

G-code L- code Operator Definition Mathematical Definitions


G65 L01 Equal or Substitution, #i = #j
G65 L02 Addition #i = #j + #k
G65 L03 Subtraction #i = #j - #k
G65 L04 Multiplication #i = #j x #k
G65 L05 Division #i = #j / #k
Place Data into
G65 L06 #i = #j
Variables
G65 L7 Copy Variables
G65 L11 Logic OR, #i = #j .OR. #k
G65 L12 Logic AND, #i = #j .AND. #k
G65 L13 Logic XOR, #i = #j .XOR. #k
G65 L14 ROL, rotate left
G65 L15 ROR, rotate right
G65 L16 LSL, move left
G65 L17 LSR, move right
G65 L21 Subduplicate #i = √ #j
G65 L22 Absolute #i = |#j|
#i = #J - trunc(#j/#k) x #k
G65 L23 Complement trunc:(Disregard the portion of the
value less than 1)
Combined Mul/Div
G65 L26 #i = (#i x #j) / #k
Operation
Square Root of Sums I = I2 + J2
G65 L27
of Squares
Square Root of Square I = I2 - J2
G65 L28
Error
Set conversion -b+ b2 - 4ac
G65 L30 between length and
2a
number of circles
G65 L31 Sine (Sin) #i = #j x Sin(#k)
G65 L32 Cosine (Cos) #i = #j x Cos(#k)
G65 L33 Tangent (Tan) #i = #j × tan(#k)
G65 L34 Arctangent (Tan –1 )
Obtain Data in
G65 L50 #i = #j
Register
G65 L51 Obtain I-Bit data #i = #j
G65 L52 Obtain O-Bit data #i = #j
G65 L53 Obtain C-Bit data #i = #j
G65 L54 Obtain S-Bit data #i = #j
G65 L55 Obtain A-Bit data #i = #j
G65 L56 Obtain Counter Data #i = #j
G65 L60 Register Setting #i = #j
G65 L66 Counter Setting #i = #j

3 - 66
Chapter III Programming and Command Codes

G-code L- code Operator Definition Mathematical Definitions

Unconditional Go To n; program goes to block


G65 L80
Branching number 'n'
Conditional Branching
G65 L81 If #j = #k, Go To n
1
Conditional Branching
G65 L82 If #j ≠ #k, Go To n
2
Conditional Branching
G65 L83 If #j > #k, Go To n
3
Conditional Branching
G65 L84 If #j < #k, Go To n
4
Conditional Branching
G65 L85 If #j ≧ #k, Go To n
5
Conditional Branching
G65 L86 If #j ≦ #k, Go To n
6
User Defined Error
G65 L99 Error signals display = i+50 (i=1~49)
Signal

Note: The range of computation is from (–9999.999) to (+9999.999).

3 - 67
HUST H8-M Operator’s Manual

Mathematical Operation Ex.s (See Table 3-3)

1. Equal or Substitution,

G65 L1 P#i A#j ; #i = #j

Ex. 1: #10 initial value=0, for #10 = 150


Command : G65 L1 P#10 A150
Result : #10 = 150

Ex. 2: #10 initial value=0, #5 initial value=1200, for #10 = #5


Command : G65 L1 P#10 A#5
Result : #10 = 1200

Ex. 3: #10 initial value=0, #5 initial value=1200, for #10 = -#5


Command : G65 L1 P#10 A-#5
Result : #10 = -1200

2. Addition

G65 L2 P#i A#j B#k ; #i = #j + #k

Ex.1: #10 initial value=99, #5 initial value=1200, for #1 = #10 + #5


Command : G65 L2 P#1 A#10 B#5
Result : #1 = #10 + #5 = 1299

Ex. 2: #10 initial value=99, for #10 = #10 + 1


Command : G65 L2 P#10 A#10 B1
Result : #10 = #10 + 1 = 100

3. Subtraction

G65 L3 P#i A#j B#k ; #i = #j - #k

Ex. 1: #10 initial value=1200, #5 initial value=99, for #1 = #10 - #5


Command : G65 L3 P#1 A#10 B#5
Result : #1 = #10 - #5 = 1101

3 - 68
Chapter III Programming and Command Codes

Ex. 2: #10 initial value=99, for #10 = #10 - 1


Command : G65 L2 P#10 A#10 B1
Result : #10 = #10 - 1 = 98

4. Multiplication

G65 L4 P#i A#j B#k ; #i = #j × #k

The result of multiplication should be in the range of -9999.999~+9999.999.


Otherwise, the system operation will result in an error.

Ex. 1: If #4=10 and #30=25, the result #10 = #4 × #30.


Command : G65 L4 P#10 A#4 B#30
Result : #10 = #4 × #30 = 250

Ex. 2: #4 initial value=100000, #30 initial value=25000,


for #10 = #4 × #30
Command : G65 L4 P#10 A#4 B#30
Result : #10 = ????? the HUST H8-M controller cannot handle
multiplied values greater than 9999.999.)

5. Division

G65 L5 P#i A#j B#k ; #i = #j / #k

Results less than 1 are discarded.

Ex. 1: #4 initial value=130, #30 initial value=25, for #10= #4 / #30


Command : G65 L5 P#10 A#4 B#30
Result : #10 = #4 / #30 = 5 ( 130/25 = 5.2 )

Ex. 2: #4 initial value=10, for #10 = #4 / 30


Command : G65 L5 P#10 A#4 B30
Result : #10 = #4 / 30 = 0

6. Place Data into Variables

G65 L6 P#i A#j B#k ; # i …. #( i+k) = # j

Ex. 1: initial value #10=100, #11=20, #13=50, #5=99


for #10 = #11 = #12 = #13 = #14 = #5
Command : G65 L6 P#10 A#5 B5
Result : #10 = #11 = #12 = #13 = #14 = #5 = 99

Ex. 2: For #10 …..#(10+N-1) = 100, N = #3 = 4

3 - 69
HUST H8-M Operator’s Manual

Command : G65 L6 P#10 A100 B#3


Result : #10 = #11 = #12 = #13 = 100

G65 L06 P#a A#b B#c I#d J#e

#a: the initial variable to be set


#b: the initial value to be set
#c: the number of variables to be set
#d: the equal difference of the variable to be set
#e: the equal difference of the value to be set

Ex. A: Set a series of variables to the same value

G65 L06 P#11 A7 B5


Result: #11 ∼ #15 = 7

G65 L06 P#29 A0 B7


Result: #29 ∼ #35 = 0

Ex. B: Set a series of variables to an arithmetical sequence

G65 L06 P#11 A1 B5 J2


Result: A1(Initial Value)
#11= 1 J2(Equal Difference)
#12= 3 B5(Number of Variables)
#13= 5
#14= 7
#15= 9

3 - 70
Chapter III Programming and Command Codes

Ex. C: Set an arithmetical variable sequence to the same value


G65 L06 P#11 A7 B5 I5
Result:
I5(Equal Difference)
#11= 7
#16= 7
#21= 7 B5(Number of Variables)
#26= 7
#31= 7

Ex. D: Set a arithmetic variable sequence to a arithmetic sequence


G65 L06 P#11 A2 B6 I5 J2
Result:
I5(Equal Difference) A2(Initial Value)

#11= 2 J2(Equal Difference)


#16= 4
#21= 6
#26= 8 B6(Number of Variables)
#31= 10
#36= 12

Note 1: #b, #c, #d, #e may be a value or variable.


Note 2: When A is not specified as a number, it is deemed to be blank.

EX.P: G65 L06 P#11 B5


Result: #11= #12= #13= #14= #15= bbbbbbb (Blank)
The screen will show a blank space (not 0).
Ex.: #5= 10000 #6= blank
In the program G00 X#5 Y#6, Y is interpreted as unspecified.
Thus, it is equivalent to G00 X#5.

7. Copy Variables

G65 L7 P#i A#j B#k ; #i = #j ﹔#(i+1)=#(j+1) ….

If #i plus 900000 ; #(#i) =#j﹔#(#i)+1=#(j+1) ….

Note: 0 < #k < 1024

3 - 71
HUST H8-M Operator’s Manual

EX. 1: Copy #10 ….. #20 to #125…. #135


Command : G65 L7 P#125 A#10 B11
Result : #125=#10,#126=#11,#127=#12,#128=#13
#129=#14,#130=#15,#131=#16,#132=#17
#133=#18,#134=#19,#135=#20

EX. 2: Copy #1 ….. #5 to #256…. #260


Initial value : #256 = 101,#1 = 301
Command : G65 L7 P#256 A#1 B5
Result : #256 = #1 = 301,#257 = #2,#258 = #3,
#259 = #4,#260 = #5

EX. 3: Copy #1 ….. #5 to #101…. #105


Initial value : #256 = 101,#1 = 301
Command : G65 L7 P#900256 A#1 B5
Result : #101 = #1 = 301,#102 = #2,#103 = #3,
#104 = #4,#105 = #5
8. Logic OR

G65 L11 P#i A#j B#k ; #i = #j .OR. #k

Ex. 1: For #10 = #5 .OR. #20, #5 = 12, #20=100


Command : G65 L11 P#10 A#5 B#20
Result : #10 = 12 .OR. 100 = 108

Ex. 2: For #10 = #10 .OR. 10, #10 = 15


Command : G65 L11 P#10 A#10 B10
Result : #10 = 15 .OR. 10 = 15

9. Logic AND

G65 L12 P#i A#j B#k ; #i = #j .AND. #k

Ex. 1: For #10 = #5 .AND. #20, #5 = 12, #20=100


Command : G65 L12 P#10 A#5 B#20
Result : #10 = 12 .AND. 100 = 4

3 - 72
Chapter III Programming and Command Codes

Ex. 2: For #10 = #10 .AND. 10, #10 = 15


Command : G65 L12 P#10 A#10 B10
Result : #10 = 15 .AND. 10 = 10

10. Logic XOR

G65 L13 P#i A#j B#k ; #i = #j .XOR. #k

Ex. 1: For #10 = #5 .XOR. #20, #5 = 4, #20=100


Command : G65 L13 P#10 A#5 B#20
Result : #10 = 4 .XOR. 100 = 96

Ex. 2: For #10 = #10 .XOR. 10, #10 = 15


Command : G65 L11 P#10 A#10 B10
Result : #10 = 15 .XOR. 10 = 5

11. ROL (Rotate Left)

G65 L14 P#I A#j B#k

In a 16-bit (Bit15 to Bit0) rotation, Bit15 shifts to Bit0 when rotating to the left.
Where a calculation exceeds 16 bits, the bits after Bit15 are disregarded.

Bit 15 14 … … 2 1 0
x x x x x x x x x x x x x x x x

Ex. 1: Initial value #10 = 49152


Command : G65 L14 P#12 A#10 B1 (ROL once)
Result : #12 = 32769

Bit 15 14 … … 2 1 0
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Bit 15 14 … … 2 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1

3 - 73
HUST H8-M Operator’s Manual

Ex. 2: Initial value #10 = 7


Command : G65 L14 P#12 A#10 B1 (ROL once)
Result : #12 = 14

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0

Ex. 3: Initial value #10 = -2


Command : G65 L14 P#12 A#10 B1 (ROL once)
Result : #12 = -3

Bit 15 14 … … 2 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

Bit 15 14 … … 2 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
1

12. ROR (Rotate Right)

G65 L15 P#I A#j B#k


In a 16-bit (Bit15 to Bit0) rotation, Bit0 shifts to Bit15 during right rotation.
Where a calculation exceeds 16 bits, bits after Bit15 are disregarded.

Bit 15 14 … … 2 1 0
x x x x x x x x x x x x x x x x

Ex. 1: Initial value #10 = 3


Command : G65 L15 P#12 A#10 B 1 (ROR once)
Result : #12 = 32769

3 - 74
Chapter III Programming and Command Codes

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

Bit 15 14 … … 2 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1

Ex. 2: Initial value #10 = 6


Command : G65 L15 P#12 A#10 B 1 (ROR once)
Result : #12 =3

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0

13. LSL (Move Left)

G65 L16 P#I A#j B#k

Bit 15 14 … … 2 1 0
x x x x x x x x x x x x x x x x

Ex. 1: Initial value #10 = 13


Command : G65 L16 P#12 A#10 B2 (LSL twice)
Result : #12 = 52

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0

3 - 75
HUST H8-M Operator’s Manual

14. LSR (Move Right)

G65 L17 P#I A#j B#k

Bit 15 14 … … 2 1 0
x x x x x x x x x x x x x x x x

Ex. 1: Initial value #10 = 13


Command : G65 L17 P#12 A#10 B2 (LSR twice)
Result : #12 = 3

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1

Bit 15 14 … … 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

15. Subduplicate

G65 L21 P#i A#j ; #i #j


(Results less than 1 are discarded).

Ex. 1: For #10 #5 , #5 = 30


Command : G65 L21 P#10 A#5
Result : #10 = 5

16. Absolute

G65 L22 P#i A#j ; #i = |#j|

Ex. 1: For #10 = ABS (#5), #5 = -30


Command : G65 L21 P#10 A#5
Result : #10 = 30

17. Complement

G65 L23 P#i A#j B#k ; #i = #J-{Trunc(#j/#k) × #k}

3 - 76
Chapter III Programming and Command Codes

Trunc(x): For the integer of Function x.


Trunc(3.5) = 3

Ex. 1: For the remainder of #5/12 with #5 = 99


Command : G65 L23 P#10 A#5 B12
Result : #10 = #5 - [Trunc(#5/12)×12]
= 99 - [ 8 × 12 ]
=3

18. Combined Multiplying and Dividing Operation

G65 L26 P#i A#j B#k ; #i =( #i × #j )/#k

Note 1: The HUST H8-M controller cannot handle multiplied values greater
than 9999.999. However, if you use G65 L26 for the operation, the
multiplied value can exceed 7 digits as long as the final result after
division is less than 7 digits.
Ex.: #1 = 10000, #2 = 30000, #3 = 1000
For (#1× #2)/#3
Command: G65 L04 P#5 A#1 B#2
G65 L05 P#6 A#5 B#3
No correct value is acquired using this command, because the
computed value of G65 04 exceeds 7 digits. However, if the command
is changed to the following:
Command :G65 L26 P#1 A#2 B#3
Result :#1 = #1× #2 / #3 = 300000

Ex. 1: #5 =12, #10 = 15, #15 = 3


Command : G65 L26 P#5 A#10 B#15
Result : #5 = (#5 ×#10)/#15
= (12 × 15)/3
= 60

Ex. 2: #5 =120, #10 = 15000, #15 = 3000


Command : G65 L26 P#5 A#10 B#15
Result : #5 = (#5 ×#10)/#15
= (120 × 15000)/3000
= 600

3 - 77
HUST H8-M Operator’s Manual

19. Square Root of Sums of Squares

G65 L27 P#i A#j B#k ; #i = ( #i2 + #j2)

Ex. 1: #10 = 15, #15 = 3


Command : G65 L27 P#5 A#10 B#15
Result : #5 = (#52+#102)
= (152+ 32)
= 15.297 (rounding)
= 15
Ex. 2: #10 = 10, #15 = 30
Command : G65 L27 P#5 A#10 B#15
Result : #5 = (#52+#102)
= (102+ 302)
= 31.622 (rounding)
= 32
20. Square Root of Square Error

G65 L28 P#i A#j B#k ; #i = ( #i2 - #j2)

Ex. 1: #10 = 15, #15 = 3


Command : G65 L27 P#5 A#10 B#15

Result : #5 = (#52 -#102)


= (152 - 32)
= 14.696 (rounding)
= 15
Ex. 2: #10 = 25, #15 = 5
Command : G65 L27 P#5 A#10 B#15

3 - 78
Chapter III Programming and Command Codes

Result : #5 = (#52 -#102)


= (252 - 52)
= 24.494 (rounding)
= 24

21. Set conversion between length and number of circles

Command: G65 L30 P# number of circles A# length B#rolling radius


K#material thickness
G65 L30 P#n A#j B#r K#t
Number of circles (n) : Calculated value.
Length (Ly) : It should be multiplied by 1000 if mm is
used as the min. unit.
Rolling radius (r0) : It should be multiplied by 1000 if mm is
used as the min. unit.
Material thickness (t) : The min. unit is μ.

2
Formula: -b+ b - 4ac
2a

Ex. : Let #n=#1, #j=100mm, #r=5mm、#t=10μ


Result: G65 L30 P#1 A100000 B5000 K10
Get #1=3.177 circles

22. Sin

G65 L31 P#i A#j B#k ; #i = #j × Sin(#k)

Note 1: The angle #k has 5 integers and 2 decimals in this format.


#k = 4500 stands for #k = 45o

Note 2: Since Sin(#K) ≦ 1 and the HUST H8-M system does not operate
on decimals, the numbers after the decimal point, if any, will be
automatically disregarded. Therefore, G65 L31 must by multiplied
by a number #J. For Ex.: #1 = Sin45°= 0.707. The format of 0.707
in the system is 0000707, so the operation is G65 L31 P#1 A1000
B4500.

Ex. 1: For #1 = Sin60°

3 - 79
HUST H8-M Operator’s Manual

Command : G65 L31 P#1 A1000 B6000


Result : #1 = 1000 × Sin 60°=866

23. Cos

G65 L32 P#i A#j B#k ; #i = #j × Cos(#k)

Note 1: The angle #k has 5 integers and 2 decimals in this format.


#k = 4500 stands for #k = 45o

Note 2: Since Cos(#K) ≦ 1 and the HUST H8-M system does not operate
on decimals, the numbers after the decimal point, if any, will be
automatically disregarded.

Therefore, G65 L31 must by multiplied by a number #J. For Ex.: #1 = Cos45
°= 0.707. The format of 0.707 in the system is 0000707, so the operation is
G65 L32 P#1 A1000 B4500.

Ex. 1: For #1 = Cos 30 o


Command : G65 L32 P#1 A1000 B3000
Result : #1 = 1000 × Cos30°=866

24. Tan

G65 L33 P#i A#j B#k ; #i = #j × tan(#k)

#1 = tan 45°= 1 and in the system, 0000001 represents 1;


Therefore, the expression is G65 L33 P#1 A1000 B4500.
Result : #1 = 1000 ×tan 45°=1000

Ex. 1: For #1 = tan 60°= 1.732


Command : G65 L33 P#1 A1000 B6000
Result : #1 = 1000 ×tan 60°=1732

25. Arctangent

G65 L34 P#i A#j B#k ; #i = Tan-1(#j/#k)

Note: The acquired #i has 5 integers and 2 decimals in format.


For Ex.: #i = Tan-1( 300/300) = 4500 (45O)

3 - 80
Chapter III Programming and Command Codes

Ex. 1: For#1 = Tan-1 (577/1000) = 30°


Command : G65 L34 P#1 A577 B1000
Result : #1 = Tan-1 (577/1000) = 003000

26. Obtain Data in Register

G65 L50 P#i A#j ; #i = R(#j)

Note: Function A#j ranges from 0… 255 (R000 …. R255)

Ex. 1: Initial value #10 = 11, R5 = 3


Command : G65 L50 P#10 A#5
Result : #10 = R5 = 3

Ex. 2: Initial value #10 = 11, #5 = 3, R3 = 9


Command : G65 L50 P#10 A#5
Result : #10 = R#5 = R3 = 9

Functions G65 L51, G65 L52, G65 L53, G65 L54, G65 L55 are used to acquire
the PLC-IOCSA status signal. A#J in the function acquires 16 bits of data at a
time.

G65 L51 G65 L52 G65 L53 G65 L54 G65 L55
I-Bit O-Bit C-Bit S-Bit A-Bit
#j = 0 I000~I015 O000~O015 C000~C015 S000~S015 A000~A015
#j = 1 I016~I023 xxxxxx C016~C031 S016~S031 A016~A031
#j = 2 xxxxxxx xxxxxx C032~C047 S032~S047 A032~A047
#j = 3 xxxxxx xxxxxx C048~C063 S048~S063 A048~A063
#j = 4 xxxxxx xxxxxx C064~C079 S064~S079 A064~A079
#j = 5 xxxxxx xxxxxx C080~C095 S080~S095 A080~A095
#j = 6 xxxxxx xxxxxx C096~C111 S096~S111 A096~A111
#j = 7 xxxxxx xxxxxx C112~C127 S112~S127 A112~A127
#j = 8 xxxxxx xxxxxx C127~C143 S127~S143 A127~A143
#j = 9 xxxxxx xxxxxx C144~C159 S144~S159 A144~A159
#j = 10 xxxxxx xxxxxx C160~C175 S160~S175 A160~A175
#j = 11 xxxxxx xxxxxx C176~C191 S176~S191 A176~A191
#j = 12 xxxxxx xxxxxx C192~C207 S192~S207 A192~A207
#j = 13 xxxxxx xxxxxx C208~C223 S208~S223 A208~A223
#j = 14 xxxxxx xxxxxx C224~C239 S224~S239 A224~A239

3 - 81
HUST H8-M Operator’s Manual

#j = 15 xxxxxx xxxxxx C240~C255 S240~S255 A240~A255

27. Obtain I-Bit Data

G65 L51 P#i A#j ; #i = #j = I(#j×16)…I(#j×16+15)

Note 1: Function A#j ranges from 0… 1 (I000 …. I023).

Ex. 1: For #10 = I016 .. I023


Command : G65 L51 P#10 A1
Result : #10 = 229

xx xx xx xx xx xx xx xx I23 I22 I21 I20 I19 I18 I17 I16


0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1

28. Obtain O-Bit Data

G65 L52 P#i A#j ; #i=#j=O(#j×16)…O(#j×16+15)

Note 1: Function A#J ranges from 0… 15 (O000 …. O015).

Ex. 1: For #10 = O000 .. O015


Command : G65 L52 P#10 A1
Result : #10 = 229

O15 O14 O13 O12 O11 O10 O09 O08 O07 O06 O05 O04 O03 O02 O01 O00
0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1

29. Obtain C-Bit Data

G65 L53 P#i A#j ; #i=#j= C(#j×16)…C(#j×16+15)

Note 1: Function A#J ranges from 0… 15 (C000 …. C255).

Ex. 1: For #10 = C016 .. C031


Command : G65 L53 P#10 A1
Result : #10 = 229

C31 C30 C29 C28 C27 C26 C25 C24 C23 C22 C21 C20 C19 C18 C17 C16
0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1

3 - 82
Chapter III Programming and Command Codes

30. Obtain S-Bit Data

G65 L54 P#i A#j ; #i = #j = S(#j×16)…S(#j×16+15)

Note 1: Function A#J ranges from 0… 15 (S000 …. S255).

Ex. 1: For #10 = S016 .. S031


Command : G65 L54 P#10 A1
Result : #10 = 229

S31 S30 S29 S28 S27 S26 S25 S24 S23 S22 S21 S20 S19 S18 S17 S16
0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1

31. Obtain A-Bit Data

G65 L55 P#i A#j ; #i=#j=A(#j×16)…A(#j×16+15)

Note 1: Function A#J ranges from 0… 63 (A000 …. C1023).

Ex. 1: For #10 = A016 .. A031


Command : G65 L55 P#10 A1
Result : #10 = 229

A31 A30 A29 A28 A27 A26 A25 A24 A23 A22 A21 A20 A19 A18 A17 A16
0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1

32. Obtain Counter Data

G65 L56 P#i A#j ; #i = Counter#j

Note 1: Function A#J ranges from 0… 255 (C000 …. C255).


Ex. 1: For #3 = Counter 10,Counter 10 =100.
Command: G65 L56 P#3 A10
Result: #3 = 100

33. Register Setting

G65 L60 P#i A#j ; Register#i = #j

Note 1: Function P#i ranges from 0… 255 (R000 ….R255).

Ex.: For R10 =#3, #3=100

3 - 83
HUST H8-M Operator’s Manual

Command : G65 L60 P#10 A#3


Result : Register 10=100

34. Counter Setting

G65 L66 P#i A#j ; Counter#i = #j

Note 1: Function P#J ranges from 0… 255 (C000 …. C255).

Ex.: For CNT10 =#3, #3=100.


Command : G65 L66 P#10 A#3
Result : Counter 10=100

35. Unconditional Branching

G65 L80 Pn ; Program branches to block number 'n'.

Ex. 1:
Program: N10 G65 L80 P40
N20 X100.
N30 Y200.
N40 M02

Result: When the program runs to N10, it branches to N40 and ignores
N20 & N30.
Note: The program number in the G65 block must be same as the
program number to be located. P50, P050, and P0050 represent
different program numbers.

36. Conditional Branching 1

G65 L81 Pn A#j B#k ; If #j = #k branches to n

Ex. 1:
Program: N10 G65 L01 P#1 A10
N20 G65 L81 P50 A#1 B10
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=10, so when the program runs to N20, it branches to

3 - 84
Chapter III Programming and Command Codes

N50 and ignores N30 & N40 because #1=10 is true.


Ex. 2:
Program: N10 G65 L01 P#1 A20
N20 G65 L81 P50 A#1 B10
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=20, so when the program runs to N20 in the sequence
N10→N20→N30 because #1=10 is false.

37. Conditional Branching 2

G65 L82 Pn A#j B#k ; If #jz#k branches to n.

Ex. 1:
Program: N10 G65 L01 P#1 A20
N20 G65 L82 P50 A#1 B10
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=20, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1≠10 is true.

38. Conditional Branching 3

G65 L83 Pn A#j B#k ; If #j>#k branches to n

Ex. 1:
Program: N10 G65 L01 P#1 A20
N20 G65 L83 P50 A#1 B10
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=20, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1>10 is true.

39. Conditional Branching 4

G65 L84 Pn A#j B#k ; If #j<#k branches to n

3 - 85
HUST H8-M Operator’s Manual

Ex. 1:
Program: N10 G65 L01 P#1 A20
N20 G65 L84 P50 A#1 B100
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=100, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1<100 is true.

40. Conditional Branching 5

G65 L85 Pn A#j B#k ; If #j≧#k branches to n

Ex. 1:
Program: N10 G65 L01 P#1 A100
N20 G65 L85 P50 A#1 B10
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=100, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1≧10 is true.

Ex. 2:
Program: N10 G65 L01 P#1 A100
N20 G65 L85 P50 A#1 B100
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=100, so when the program runs to N20, it branches to
N50 and ignores N20 & N30 & N40 because #1≧100 is true.

41. Conditional Branching 6

G65 L86 Pn A#j B#k ; If #j≦#k branches to n

Ex. 1:
Program: N10 G65 L01 P#1 A20
N20 G65 L86 P50 A#1 B100
N30 X100.
N40 Y100.

3 - 86
Chapter III Programming and Command Codes

N50 M02

Result: N10 sets #1=20, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1≦100 is true.

Ex. 2:
Program: N10 G65 L01 P#1 A20
N20 G65 L86 P50 A#1 B20
N30 X100.
N40 Y100.
N50 M02

Result: N10 sets #1=20, so when the program runs to N20, it branches to
N50 and ignores N30 & N40 because #1≦20 is true.

42. User Defined Error Signal

G65 L99 Pi

Note 1: Error signals display = i+50


Note 2: 1 ≦ i ≦ 49

Constant i = 1~49. If i is not within this range, ERROR 50 appears. The


displayed number of error signals is added to 50 for the user defined error
signal.

Ex.: For ERROR-60 setting


Command: G65 L99 P10
Result: Error signal display 60 = 10 + 50

3 - 87
HUST H8-M Operator’s Manual

Ex. of Cutting Application for Sealing Machines:

In this Ex., the G65 command is used for the stop action before cutting of a
sealing machine. A sensor is used to check the changing color tones or patterns of
the material. The following only introduces part of the main program, which also
forms an independent subprogram. The program is divided into two parts: sensor
(I005 signal) On and Off.

Variable: #01 = Total cutting length


#02 = Length required for sensor inspection.
#03 = G01 feed-rate.
#04 = Sensing speed.
I007 Feeding direction

I005 On (1)
#02 #12

I005 Off (0)


Var. #01
Fig. 3-55

G65 L51 P#10 A0 ... Receive I000~I007 signal


G65 L12 P#11 A#10 B32 ... Check if s005 = 1 (On)
Note that 32 = 00100000 (binary)
G65 L82 P0010 A#11 B32 ... If I005≠1, jump to N0010
G65 L84 P0020 A#01 B#02 ... If #01 < #02, jump to N0020
G65 L03 P#12 A#01 B#02 ... #12 = #01 - #02
G01 U#12 F#03
G31 U#02 F#04 ... Program for sensor I005 = 1
M02
N0010 G01 U#01 F#03 ... Program for sensor I005 = 0
M02
N0020 G65 L99 P1 ... If #01<#02, Error 51 appears.
M02

3 - 88
Chapter III Programming and Command Codes

3.39. Part Programs

3.39.1 Loop Repetition Command, M94, M95

Format:

M94 Í Symbol used to mark the start of a loop


M95 Í Symbol used to mark the end of a loop
L Í Number of repetitions.

Ex.:

G01 X0. Í X-axis returns to position 0.


G91 Í Incremental mode
M94 L5 Í Set the start of a loop and repeat 5 times
X10. Í X10. (increment)
M95 Í End of a loop
G90 Í Absolute mode
M02 Í Program end.

Result: When M94, M95 take effect, X10. will Execute 5 times so that it will
stop at X.50 finally.

3.39.2 Auxiliary Function, M-code

M code --- The M-code ranges from 00~99 and each code represents a different
action, as shown in the following:

M00 Program Stop. When the program runs to this point, all
processing actions stop.
Press the "CYCST" key to restart the program from where it stopped.

M01 Optional Stop.


See more details in Sec.6 of Chap 8.

M02 Program End.

M30 Program Finished. Its function is the same as M02.

3 - 89
HUST H8-M Operator’s Manual

M98 Subprogram Call.

M99 Subprogram End.

Except for the above M-codes that cannot be changed, customers may define
other M-codes in the PLC if required. Attention should be paid to the following:

1. For all Mxxx codes, the controller will send the M-code Strobe signal (S024)
to the PLC. (Except for the default settings, including M02, M30, M99, M100,
M01)
2. For M000 ~ M499, the controller will not Execute the next command until the
PLC sends the M-code finished signal (C032 OOFF) to the controller. For the
Mxxx code of M5000 ~ M999, it continues to Execute the next command,
even if the signal is not sent.
S code--- The auxiliary function S-code is used to control the rpm of the
spindle. The maximum setting is S999999.

Ex.: S1000 means that the spindle rotates at 1000 rev/min

3.39.3 Subprogram

If a program or command group requires repeated execution, you can store the
program or command group in memory as a subprogram. This can simplify the
design of the program and make the structure of the main program more succinct.
The subprogram can be executed during automatic operation, and a subprogram
can call another subprogram.

Subprogram Structure

The structure of the subprogram is pretty much the same as the main program
except that the subprogram ends with M99.

PROGRAM 05 .....Subprogram code


................ Program content
................ Program content
M99 ..... Subprogram end.

If the subprogram is not called by the main program but executed by directly
pressing "CYCST", it stops after Executing 8,000,000 times.

3 - 90
Chapter III Programming and Command Codes

Execution of Subprogram:

Format:

M98 P____L____

P: Subprogram code
L: Execution times of the subprogram. If not specified, the subprogram
Executes only once.

Ex.: M98 P05 .....Execute subprogram No 5 once.


M98 P05 L3 .....Execute subprogram No 5 three times.

Subprogram Limits:

Stepwise Call: The main program calls the first subprogram, and the first
subprogram calls the second subprogram in turn. The H8-M Series controller
provides a maximum of 8 levels of stepwise calling, as shown in figure 3-56:

The M98 and M99 block settings shall not contain any displacement, such as X__,
Z__.
PROGRAM 1 PROGRAM 2 PROGRAM 7 PROGRAM 8
N1 … N1 … N1 … N1 …
. . . .
. . ..... . .
N5 M98P2 N5 M98P3 N5 M98P8 .
. . . .
. . . .
N31 M2 N31 M99 N31 M99 N31 M99

Fig 3-56 Subprogram Call


The variable settings will be sent when the main program calls the subprogram:

Format: G65 Qxxx Axxx Bxxx Cxxx …….


Qxxx : Subprogram number to be executed
Axxx ~ Zxxx: Variable data during Execution of the subprogram
(subprogram number = Qxxx)

Axxx ~ Zxxx Variable Mapping Table

3 - 91
HUST H8-M Operator’s Manual

A.xxxx #13101. N.xxxx #13114.


B.xxxx #13102. O.xxxx #13115.
C.xxxx #13103. P.xxxx #13116.
D.xxxx #13104. Q.xxxx #13117.
E.xxxx #13105. R.xxxx #13118.
F.xxxx #13106. S.xxxx #13119.
G.xxxx #13107. T.xxxx #13120.
H.xxxx #13108. U.xxxx #13121.
I.xxxx #13109. V.xxxx #13122.
J.xxxx #13110. W.xxxx #13123.
K.xxxx #13111. X.xxxx #13124.
L.xxxx #13112. Y.xxxx #13125.
M.xxxx #13113. Z.xxxx #13126.
N.xxxx #13114.
O.xxxx #13115.
P.xxxx #13116.

Ex.: Main program contents:


O001
G65 Q05 A10.000 B12.000 C2500
M02

Subprogram contents:
O005
G01 X#13101 Y#13102 F#13103
G04 X4. #13103 =2500
M99 #13102 =12.000
#13101 =10.000

3 - 92
Chapter IV Tool Compensation

4 Tool Compensation

The tool compensations of HUST H8-M CNC have two types. The
compensation data are stored in #7060~#7459 and the wear data are saved
in #7460~#7859. Up to 40 sets of tool compensation data can be stored in
each item. These data can be called by G41, G42, G43, G44 commands.
Use G40, G49 to cancel the compensation if required.

1. Tool radius compensation


To compensate the error in X- or Y-axis resulting from tool radius.

2. Tool length compensation


To compensate the error in the tool axis (Z-axis) resulting from
differences in tool lengths.

The G41, G42, G43, G44, G40, and G49 tool compensation commands
involve both declaration and moving actions. Particular attention
should be paid when using CAD/CAM to convert the program.

X-W listed in the following table are length compensation and R is radius
compensation.
Tool Length Variable Address Table
Group X Y Z A B C U V W R
1 #7060 #7061 #7062 #7063 #7064 #7065 #7066 #7067 #7068 #7069
2 #7070 #7071 #7072 #7073 #7074 #7075 #7076 #7077 #7078 #7079
3 #7080 #7081 #7082 #7083 #7084 #7085 #7086 #7087 #7088 #7089
: : : : : : : : : : :
40 #7450 #7451 #7452 #7453 #7454 #7455 #7456 #7457 #7458 #7459

X-W listed in the following table are length wear compensation and R is
radius wear compensation.
Tool Wear Variable Address Table
Group X Y Z A B C U V W R
1 #7460 #7461 #7462 #7463 #7464 #7465 #7466 #7467 #7468 #7469

4-1
HUST H8-M Operator’s Manual

2 #7470 #7471 #7472 #7473 #7474 #7475 #7476 #7477 #7478 #7479
3 #7480 #7481 #7482 #7483 #7484 #7485 #7486 #7487 #7488 #7489
: : : : : : : : : : :
40 #7850 #7851 #7852 #7853 #7854 #7855 #7856 #7857 #7858 #7859

4-2
Chapter IV Tool Compensation

4.1 Tool radius and radius wear compensation, G40, G41,


G42

Format:

G41 D___ X___ Y___ Tool radius compensation - Left


G42 D___ X___ Y___ Tool radius compensation - Right
G40 Tool radius compensation - Cancel

D : Tool number, 1~40. D0 = D1.


X, Y : Insert the coordinates of tool radius compensation.

The tool size of a milling machine varies significantly from 1mm to 50mm,
and the tool radius compensation G41, G42 can be used to ensure that the
tool cuts along the profile of the design plan.
Whether G41 or G42 is used depends on the relative position between the
tool direction and the tool-tip. To the direction of the arrow in Fig. 4-1,
G42 is used when the central point of the tool radius is located at the right
side of the tool path (radius offset to the right). G41 is used when the
central point radius is located at the left side of the tool path (radius offset
to the left). G41 and G42 are Model G-codes and can only be cancelled
using G40.

Center G41 (Left Side of the Path


Direction)
r
Workpiece Tool Path Dir.

r G42 (Right Side of the Path


Direction)

Fig. 4-1 G41 and G42 Application

Execution of Tool Wear Compensation

Tool radius wear compensation is executed in the same way that the tool
radius compensation is. When the G41/G42 command is calling the tool
number for radius compensation using the D-code, the HUST controller
simultaneously selects the radius and wear compensation values for the
called toll number and compensation of the program.

Ex.: The D3 tool compensation value is

4-3
HUST H8-M Operator’s Manual

Radius compensation=2.000 mm radius wear compensation=-0.010mm


Tool radius compensation=2.000-0.010=1.990mm
Please note that the radius wear compensation value is input with a (-) sign.

4.1.1 The Initial Setting of the Tool Radius Compensation


When G41, G42 are executed, the tool will make a linear motion to the X,
Y coordinatesspecified in the G41, G42 blocks at G01 speed. When
reaching the specified X, Y coordinates, the tool-tip will shift at a distance
equivalent to the tool radius. The start setting of the G41, G42 commands
are only available in the G00 or G01 linear cutting model. The system will
send an error message if it is executed in the G02, or G03 arc cutting mode.
A simple description of the tool start setting function is given below:
1. Tool radius compensation is executed when the tool travels from A to
B. Insertion of the radius compensation is complete at B.
N1 G01 F200
N2 G41(G42) D______ X______ Y______
N3 X______
G41
A

B
Program path
G42

N2 N3

Fig. 4-2 Radius compensation-1


2. Radius compensation is complete at the start point (B) of the arc cutting.
N1 G01 F200.00
N2 G41(G42) D______ X______ Y______
N3 G02 X______ Y______ J______

G41
A

B Program path
G42

N2 N3

Fig. 4-3 Radius compensation-2

4-4
Chapter IV Tool Compensation

4.1.2 Relationship between Radius Compensation and Tool


Path

G41, G42 are Modal G-code command, so when the insertion of the G41,
G42 in the tool path is complete and before they are cancelled by G40, the
tool-tip does a vector offset to the amount of the tool radius value “r” along
the program path. Calculation of the path is executed automatically for the
tool-tip path. When the direction of the program path changes, the path of
the tool-tip also changes and special attention must be paid to the corner of
the changed path. Different corners are described as follows:

1 Inside corner (θ≦180°)


A small part of the work-piece can’t be cut from the inside corner (Fig
4-40, P Point).

G01 Program Path


P Fig. 4-4

2 Outside corner (θ≦180°)


The tool-tip moves in an arc motion (Fig. 4-5, P point) along the corner
to create a new path. In this case, it is the proper cutting along the corner.
A B

P
G01 Program Path Fig. 4-5

If the angle is convex as shown in Fig 4-6, the corner cut is correct
while the correctness of cutting on the inside corner depends on the
distance from the opening C. If the distance is less than the tool
diameter, no cutting is possible. If it is greater than the tool diameter, the
tool cuts toward the inside corner, part of the work-piece cannot be cut
in the sharp inside corner.

4-5
HUST H8-M Operator’s Manual

G42 G41

A
P
C

B Program Path

Fig. 4-6
3. Compensation Direction Change
H8-M does not accept the direct change of compensation direction from
G41 to G42 or from G42 to G41. Where changing of the direction is
required, the compensation must be cancelled using G40 before the
direction can be changed.
4. Tool Radius Change
Like the direction change, H8-M does not accept the direct change from
one tool number to another for radius compensation. Where changing of
the tool number is required, the compensation must be cancelled using
G40 before the tool number can be changed.
4.1.3 Tool Radius Compensation – Cancellation
Once G41 or G42 is executed successfully, G40 command must be used to
cancel the tool radius compensation. The movement during the cancellation
of the radius compensation can only be executed in the G00 or G01 mode.
G40 is not directly available for G02, G03 blocks and the cancellation can
be executed only after the arc cutting is executed successfully. Below are
some examples of the cancellation of the tool radius compensation.
1. N20 G41(G42) D___..........


N31 G01 X_____ F______
N32 G40 X_____ Y______

G41 B

A
Program Path

G42

N31 N32 G40

Fig. 4-7

2. N10 G41(G42) D___ .............

4-6
Chapter IV Tool Compensation



N15 G02 X____ Y____ I____ J____ F____
N20 G01
N25 G40 X____ Y____

B
G41 A
Program Path

G42 Fig. 4-8


N3 N25 G40

4-7
HUST H8-M Operator’s Manual

4.1.4 Notes on Tool Radius Compensation

1. When cutting around an inside corner, the arc radius of the inside corner
must be equal to or greater than the tool radius (r). Otherwise an alarm
will generate an alarm signal. The arc cutting around an outside corner
is not subject to this regulation.
2. G41, G42 commands are not applicable to canned cycles
(G80~G89).They must be cancelled using G40 before a canned cycle
can be executed.
3. Where an arc cutting command exists during the tool radius
compensation (G41,42), the writing method of the radius value “R” is
applicable.
4. Where multiple axes are controlled simultaneously, the tool radius
compensation of the HUST H8-M is only valid on the X, Y plane not on
the Z- axis.
5. The tool radius compensation function is not available for MDI
operation.
6. When cutting a stepwise work-piece with a step value smaller than the
tool radius, over-cutting many occur as shown in Figure 4-9.

Fig. 4-51 Over-cutting (Shaded area)

Programming Examples of Tool Radius Compensation:

N1 G91 ...Incremental coordinates setting


N2 G01 Z-2.500 F150. ...Z-axis cutting by 2.5mm
N3 G17 F300. ...X-Y cutting plane setting
N4 G41 D10 Y30.000 ...Point A, initial setting of tool radius
compensation
N5 Y100.000 ...Linear cutting from A~B
N6 X30.000 Y40.000 ...Linear cutting from B~C
N7 G02 X100.000 I50.000 ...Half-circle cutting from C~D
N8 G01 X30.000 Y-40.000 ...Linear cutting from D~E
N9 Y-100.000 ...Linear cutting from E~F
N10 X-40.000 ...Linear cutting from F~G

4-8
Chapter IV Tool Compensation

N11 G03 X-80.000 R50.000 ...Arc cutting from G~H


N12 G01 X-70.000 ...Linear cutting from H~I
N14 Z2.500 ...Z-axis rising by 2.5mm
N15 G40 ...Compensation cancelled, ready for
direction change
N16 M01 ...Program suspension.
N17 G0 X130. Y90. F200. ...Position to N
N18 G01 Z-2.500 F150. ...Z-axis cutting by 2.5mm
N19 G42 Y-40.000 F300. ...Linear cutting from N~O
Compensation direction change
N20 X-60.000 ...Linear cutting from O ~ J
N21 Y30.000 ...Linear cutting from J~K
N22 G02 X80.000 I40.000 ...Arc cutting from K~L
N23 G01 Y-30.000 ...Linear cutting from L~M
N24 X-60.000 ...Linear cutting from M~P
N25 Z2.500 ...Z-axis rising by 2.5mm
N26 G40 X-60.00 Y-80.00 ...Tool compensation cancelled; tool
returning to S point.
N27 M02 ...Program end.

50
X
C D
40

B 40 N E
K L
40
J P O M 30
100

50

A H G F
I 50
30
S
30 40 80 40

Fig. 4-10 Program Example

4-9
HUST H8-M Operator’s Manual

4.2 Tool length compensation, G43,G44,G49


Tool length compensation is available for the position of Z-axis to correct
the error of the tool length. There are up to 40 sets of tool compensation
data.
Format:
G43(G44) Z_____ H_____ Length compensation setting
or G43(G44) H_____ Length compensation setting
G49 Length compensation
cancellation
Z : Initial compensation coordinates
H : Tool number for which the length compensation is executed.1~40,
When G43 is executed, the controller selects the specified compensation
value and adds it directly to the Z-axis.
When G44 is executed, the controller selects the specified compensation
value and adds it to the Z-axis for compensation after changing direction.
Compensation direction is defined based on the direction of the Z-axis. A
positive compensation means that the tool moves positively along the Z-
axis after compensation. A negative compensation means that the tool
moves negatively along the Z-axis after compensation.The relationship
between the compensation direction and the positive/negative value of the
length compensation under the G43/G44 command is described as follows:
MCM, positive value MCM, negative value
G43 Positive compensation Negative compensation
G44 Negative compensation Positive compensation
Ex. 1: G00 Z0.000
N2 G0 X1.000 Y2.000
N3 G43 Z-20.000 H10 (10th length compensation - 3.000)
N4 G01 Z-30.000 F200
N5 G49 Z0.000

N3 Block N4 Block

-20 -30
-23 -33
(Aft. Compensation) (Aft. Compensation)
Fig. 4-11

4 - 10
Chapter IV Tool Compensation

Ex. 2: N1 G00 X-2.000 Y-2.000


N2 G44 Z-30.000 H1 (1st length compensation - 4,000)
N3 G01 Z-40.000
N4 G49 Z0.000

N2 Block N3 Block

-30 -40
-34 -44
(Aft. Compensation) (Aft. Compensation)
Fig. 4-12
Ex. 3: N0 G91
N1 G00 X120.000 Y80.000
N2 G43 Z-32.000 H01
N3 G01 Z-21.000 F100.
N4 G04 X2.000
N5 G00 Z21.000
N6 X30.000 Y-50.000
N7 G01 Z-41.000
N8 G00 Z41.000
N9 X50.000 Y30.000
N10 G01 Z-25.000
N11 G04 X2.000
N12 G00 Z57.000
N13 G49 X-200.000 Y-60.000
N14 M02
Y

X 20

30

Start 30

120 30 50 Fig. 4-13

4 - 11
HUST H8-M Operator’s Manual

4 - 12
Chapter Controller Keys and Screens

5 Controller Keys and Screens

HUST H8-M Controller Panel and Keys

X Y Z G F M

U V W 7 8 9

I J K 4 5 6

R S T 1 2 3

重置 N 0 #

刪除 清除

插入 輸入
F1 F2 F3 F4 F5 F6 F7 F8

Fig. 5-1 HUST H8-M Series Controller LCD Panel and Keys

The HUST H8-M Series controller panel consists of three areas.

1st area: For dsplaying, editing, and operating of coordinates and


programs.
nd
2 area: For operating the function modes with the numerical and
command code keys.
rd
3 area: special keys.

The HUST H8-M Series controller is equipped with an easy-to-use LCD


display, which customers can utilize to design a simple LCD screen mode
with our own screen editing software and HCON transfer software,
according to their PLC planning requirements.

In addition to their standard functions, all keys on the controller can be


customerized by customers according to their PLC planning requirements
(refer to the wiring manual).

Refer to Chapter VI (Program Editing and Input) for detailed information


about editing, manual operation and program keys.

This Chapter describes the 2nd and 3rd areas (function mode and key areas).

5-1
HUST H8-M Operator’s Manual

5.1 Controller Keys and Function Mode Selection


The letters marked on the key indicate the functions of their corresponding
key.If you press a mode selection or letter key once, the key functions as
indicated by the larger letter on it.If you press a letter key twice with 0.5
scond, the key functions as indicated by the smaller letter on it, or as the
mode selection keys below.

X Y Z The key group is the letter key.

U A V B WC

I O
J P
KQ

RD SE TL

G F M/ NH
#
0 ~ 9 The key group is the numerical key.

Press this key to move the cursor up by one item.


Press the key to move the cursor down or display the
CURSOR
next block.
Press the key to move the cursor left.
Press the key to move the cursor right.

Press this key to display the previous page or block.


PAGE
Press this key to display the next page or block.

重置 Reset the controller.

F1 F2 F3 F4 F5 F6 F7 F8
Special keys.

5-2
Chapter Controller Keys and Screens

5.2 Screen Description


As shown in the previous section, the controller has 11 screen modes,
including the power-on screen, which can be controlled using the seven
keys. More than one standard screen mode is not allowed to be used at the
same time.Theses 11 standard screen modes are described as follows.
5.2.1 Power-on Screen
A screen, as shown in Fig. 5-2, is displayed on the LCD, after power-on or
reset .

Fig. 5-2

5-3
HUST H8-M Operator’s Manual

5.2.2 Coordinate Screen


Program Coordinate Screen

Switch to Auto mode in “Mode Selection” and you will see a screen as
shown in the following figure. Press Execute to execute the program in
Auto Mode. The coordinate screen shows data as follows:

Program G00 Rate magnification


Factor
Coordinate G0 Rate magnification Facto
Spindle Speed magnification
Factor
Execute M-CODE
Execute T-CODE
Execute S-CODE
Spindle Speed
Feed-rate

Fig. 5-3

Machine Coordinate Screen

Switch to “Origin Mode” in “Mode Selection” and press Start to


execution homing to the machine rigin. The coordinate screen shows data
as follows:

Fig. 5-4

5-4
Chapter Controller Keys and Screens

5.2.3 Edit Screen

Switch to Edit mode in “Mode Selection” to edit the new or old


program (refer to section 6.2 and 6.3 for detailed opertions). A screen is
displayed on the LCD, as shown in the following figure 5-5. The Edit
screen shows data as follows:

Fig. 5-5

You can use the cursor key, CURSOR← , CURSOR→ , to check a


block. The PAGE↑ , PAGE↓ keys can also be used to check blocks.Data
can be be entered to chage contents of a block.
5.2.4 File Directory Screen
Switch to “Program Selector” in “Mode Selection”. After entering the
Program Selector mode, a screen appears on the LCD display, as shown in
Fig. 5-6. The File Directory screen shows data as follows:

Fig. 5-6

5-5
HUST H8-M Operator’s Manual

The program selection key is used to display the current program number.
You can use Cursor↑ , Cursor↓ to display another program number. In
Program Selector mode, move the cursor to the desired part program and
press Enter . (Refer to Section 6.1 for details.)

5.2.5 JOG Screen


Switch to Jog mode in Mode Selection and you will see a screen on the
LCD display as shown in Fig. 5-7. The JOG screen shows data as follows:

Fig. 5-7

5-6
Chapter Controller Keys and Screens

5.2.6 Tutorial screen


Switch to Tutorial mode in “Mode Selection” and the controller will
display the tutorial screen.

Fig. 5-8

5-7
HUST H8-M Operator’s Manual

5.2.7 Computer Transmission Mode Screen

Switch to Computer Transmission Mode in “Mode Selection” and the


controller will display the computer transmission screen.

5-8
Chapter VI Program Editing

6 Program Editing

The program editing operation includes:

1. Program selection,
2. New program editing,
3. Existing program modification, and
4. Program editing in Tutorial Mode.

6.1 Program Selection

The HUST H8-M controller can store programs numbered O000 ~ O999.
You can select any one of the programs to edit or execute.

Program selection: Switch to “Program Selector” in “Mode Selection” and


you will see a file directory page on the LCD display as shown in Fig. 6-1.
Move the cursor to the desired program and press Enter .

Fig. 6-1

You can enter the program comments in this mode with a maximum of 12
characters.

Example: To add the comment “ TYPE-201” to O01


1. Move the cursor to O001
2. Press T Y P E - 2 0 1
3. Press Enter.

6-1
HUST H8-M Operator’s Manual

6.2 New Program Editing


1. After selecting the program number to be edited, turn the knob to
“Edit”. To edit a new program, the following screen as shown in Fig. 6-
2 displays:

Fig. 6-2

The following keys will be used for program editing:


1. Command key.
2. Numeric keys O ~ 9.
3. Cursor key, CURSOR← , CURSOR→, used to check a block.
4. PAGE↑ , PAGE↓ and CURSOR↑ , CURSOR↓ keys can also
be used to check blocks.
5. Use the Insert key to create or insert a new block.

Enter a new block in a new program or insert a new block in a program.


Press the Insert key after entering a new block.

6. Use the Enter key to enter data.


Use the Enter key after adding a command or changing a command
value in an existing block.

7. Use the Delete key to delete the program of a block.

Atomatically Generated Block Serial Number:

During editing of the program, the letter N of the block serial number can
be omitted if necessary. If not necessary, do not use #8337 (the automatic
generation start number for the program block serial number), and #8338
(the increment between automatically generated serial numbers). Otherwise,

6-2
Chapter VI Program Editing

a block serial number will be automatically generated according to the


settings of #8337, #8338 everytime you enter data or press the Insert key.
Press N and the number and Enter to modify a block serial number after
automatic generation.

Program Edition Example:


Program 1
N10 G0 X0.Y0.
N20 G4 X1.
N30 G0 U480.V-480.
N40 G4 X1.
N50 M99

Action and Description: G 0 Insert

1. Make sure the controller is in program-editing mode. Switch to “EDIT


mode”.
2. Enter data:
First block data: G 0 Insert

Press the Insert key to create a new block, as shown in Fig. 6-3: (N10
can be omitted if a block serial number has been generated
automatically)

N10 G0

Fig. 6-3
Then enter:
X 0 y Enter

Y O y Enter

6-3
HUST H8-M Operator’s Manual

The above-mentioned procedure is used to edit the first block data.


Enter the following data for 2nd ~ 5th blocks:

Second block:
G 4 Insert

X 1 y Enter

Third block:
G 0 Insert

U 4 8 0 Enter

V - 4 8 0 y Enter

(Note that - the sign INPUT can be entered before the Enter key is
pressed.

Fourth block:
G 4 Insert

X 1 y Enter

Fifth block: M 99 - Insert

You can use PAGE↑or PAGE↓ to check the block on each page
and use CURSOR← or CURSOR→ to check its contents for its correctness.

6.3 Existing Program Modification


We have created PROGRAM 1 in the previous section. We’ll take the
PROGRAM 1 as an example to explain how to modify a program.
Modification of a program includes the following aspects:

Add (or Change) a Command


Ex.: The third block program N30 U480. V-480.
Changed to N3 U480. V-480. F300

Procedure:
1. Make sure the system is in “EDIT” mode.
2. Use CURSOR↑/↓ to move the cursor to block N3.

6-4
Chapter VI Program Editing

3. Enter a command code and value to be added (changed), e.g. F300.


F 3 0 0 Enter

The screen is shown in Fig. 6-4:

N10 X0.Y0.Z0.
N20 G4 X1.
N30 U480.V-480.F300
N40 G4 X1.
N50 M02

Fig. 6-4
4. Change U480 by entering U360; U 3 6 0 y Enter

To change an incorrect command, enter the correct command and press


Enter.

Delete a Command
Ex.: The third block program N30 U480. V-480. F300
Changed to N30 U480. V-480.

Procedure:
1. Make sure the system is in “EDIT” mode.
2. Use CURSOR↑/ CURSOR↓ to move the cursor to block N3.
3. Enter a command to be deleted without values, e.g.
F Enter
(No value is entered behind F). The screen is shown in Fig. 6-6:

6-5
HUST H8-M Operator’s Manual

N10 X0.Y0.Z0.
N20 G4 X1.
N30 U480.V-480.
N40 G4 X1.
N50 M02

Fig. 6-5

Insert a Block

Ex.: Inset the block N31 U20. V-20 between


the third block N3 G0 U480. V-480.
and the fourth block N4 Z-15

Procedure:

1. Make sure the system is in “EDIT” mode.


2. Use the PAGE↑ or PAGE↓ key to move the cursor to block N30.
3. Enter

N 3 1 Insert

U 2 0 y Enter

V - 2 0 y Enter

The screen is shown in Fig. 6-6:

6-6
Chapter VI Program Editing

N10 X0.Y0.Z0.
N20 G4 X1.
N30 U480.V-480.F300
N31 U20.V-20.
N40 G4 X1.
N50 M02

Fig. 6-6
Delete a Block

Ex.: Delete the block N31 U480 V-480.

Procedure:

1. Make sure the system is in “EDIT” mode.


2. Use the PAGE↑ or PAGE↓ key to move the cursor to block N31.
3. Press Delete. The screen is shown in Fig. 6-7:
Move the cursor to block N31 after block N40 is deleted.

N10 X0.Y0.Z0.
N20 G4 X1.
N30 U480.V-
480.F300
N40 G4 X1.
N50 M02

Fig. 6-7

6-7
HUST H8-M Operator’s Manual

Delete a Program

In “Program Selector” mode, move the cursor to the program to be deleted


and press the Delete key . The following message displays:

DELTET PROGRAM?(Y/N)

Fig. 6-8

At this time, press the Y key to delete the program O01. When you press
the N key, no action will be performed.

To delete all programs 0~999. Procedure:


Enter MDI mode, and execute the G10 P2001 command.
Then the contents of all programs are cleared immediately.

Note: After the procedure is complete, all program data in the memory will
be erased. Therefore, never perform this action unless required.

6.4. Program Editing in Tutorial Mode

In Edit mode, it is sometimes difficult to get the positioning coordinate (X,


Y) through mathematical operation. A solution to this is to move the
workpiece or tool to the desired coordinate with the MPG and press “Enter”.

Although like Edit Mode, the Tutorial Mode uses different methods to enter
coordinates. A coordinate is directly entered in Edit Mode while a
coordinate is obtained through MPG in Tutorial Mode. In addition, the
functions of the keys, such as Insert , Enter , and Delete , are the same.

The reader should note that in Turtorial Mode, the work coordinate will be
entered into the program once the Enter key is pressed. To avoid errors, it

6-8
Chapter VI Program Editing

is preferable to edit the entire program in Tutorial Mode if you have started
editing in this mode.

Procedure:

1. Turn the knob to “Tutorial ” Mode.

2. Use the Insert and Enter keys to enter the relevant commands.
3. Use the MPG, or axis selection & JOG+(JOG-) keys to move the
workpiece or tool to the desired coordinate and press the Enter key.
4. Repeat Step 2 and 3 until the creation of the program is completed.

Ex.: G01 X100.000 (100.000 Use the MPG to enter the coordinate)
M02

1. Enter Tutorial Mode.


2. Enter
G 0 1 Insert
3. Use MPG to move the workpiece or tool to 100.000 and press the INPUT
key.
4. Enter
M 0 2 Insert

6.5 Entering Decimal Points

A command value is entered in either integer or decimal format with a


maximum of 7 digits. You cannot enter a decimal point for a command that
requires an integer input, so that no problem will occur when you enter the
command value. You can insert a decimal point at the specified position for
a command that requires a decimal input. The input will be correct after
being internally processed by the control unit. An error may occur when an
integer is entered for a command that needs a decimal input.This will be
further explained in the following paragraphs.

The HUST H8-M Series CNC allows customers to set the decimal format
in variables according to their needs. Once the decimal format is set, the
system will operate with the settings after each power-on. The settings can
be changed in cariables #8300~#8326 if necessary. In HUST H8-M Series
CNC, there are the following decimal formats available: 34 (four decimal
places), 43 (three decimal places), 52 (two decimal places), and 61 (one
decimal place).Take 4/3 format as an example. The 4/3 format indicates the
system allows up to a 4-digit integer with up to 3 decimal places. If the
number of digits exceeds 4, the format will convert to 70 format. But 3
decimal places will be included after internal processing.

6-9
HUST H8-M Operator’s Manual

When an integer is entered for a command (such as X, Y, I, J) that requires


a decimal input, the control unit automatically puts a decimal point at the
position specified in the given format.The table below shows the validated
values after the internal processing of the control unit.

Input 3/4 Format 4/3 Format 5/2 Format 6/1 Format


X2 X0.0002 mm X0.002 mm X0.02 mm X0.2 mm
Y250 Y0.0250 mm Y0.250 mm Y2.50 mm Y25.0 mm
Z35 Z0.0035 mm Z0.035 mm Z0.35 mm Z3.5 mm
U2500 U0.2500 mm U2.500 mm U25.00 mm U250.0 mm
V25. V25.0000 mm V25.000 mm V25.00 mm V25.0 mm
W125. V125.0000 mm W125.000 mm W125.00 mm W125.0 mm
F300 F300 mm/min F300 mm/min F300 mm/min F300 mm/min

For commands that require a decimal input, the entered integer will be
changed by the control unit, though the value actually entered by the
operator is shown on the screen. The user should pay attention to this. To
avoid errors, it is recommended to enter data with a decimal point. The "0"
after the decimal point can be omitted. The integer codes, such as G, M, N,
S, are not affected.

G, M, N, S codes: Variables Integer input.


X, Y, Z, U, V, W, I, J code Decimal input.
F code Integer input.

Suggestion: To avoid confusion, except for G, M, N, and S, all other


commands require a decimal input. the "0" after the decimal
point can be omitted.

6.6 Editing Notes

Block (Program) Serial number

1. The letter N of the block serial number can be omitted if necessary.


2. The number after N is only a symbol. The blocks are sorted in editing
order rather than by value.
For instance, if N35 is inserted behind N30, the order is:

Program 1

6 - 10
Chapter VI Program Editing

N2 G0 X0. Y0. ……First block


N20 G4 X1. ……Second block
N30 U480. V-480. ……Third block
N35 U20. V-20. ……Fourth block
N40 G4 X1. ……Fifth block
N50 M99 ……Sixth block

If the block serial number N35 is changed to N350, the program


execution order remains the same.

3. The serial number of a block number is edited in the form of a "string".


That is to say, N10, N010, N0010 represent different block serial
numbers and a complete string must be entered to search a block serial
number.

Block
1. Do not use two G-codes in the same block.
(This rule is not applied if the program codes are converted using
CAD/CAM)

2. Do not repeat any coordinate code of a command, such as X, Y, Z, U, V,


I W, J and R, in the same block.

3. If you specify absolute coordinates and incremental coordinates for the


same axis in a block, only the incremental coordinates will be executed.
Example:

G1 X100. U50. ------ Only U50 will be executed.

4. A maximum of 64 characters can be entered in a bock, or the Err-18


message displays.

6 - 11
HUST H8-M Operator’s Manual

6 - 12
Chapter VII MCM Parameter Settings

7 MCM Parameter Settings

7.1 MCM Parameter Setting


The MCM parameter setting function allows the user to define the system constants of
the controller according to mechanical specifications and machining conditions. The
correct and proper setting of these constants is important in the operation of the
mechanical system and fabrication of the work-piece. Make sure that the setting is
correct. Press Reset to restart the machine when the MCM parameter has been set
successfully.
The MCM parameters are stored in variables 7000 ~ 9999.
Variable #7000 = parameter #0

How to Read and Change MCM parameters:

(1) Directly Change from CNC:


1. Enter “M9998” in MDI mode and press “Execute”, as shown in Fig. 7-1:
2. Switch to JOG mode and press Tool Length Compensation. The MCM will then
appear at the bottom of the screen. Press F3 to show the Parameter Setting List for
modification.
3. To change all parameters, press “Page Down” when the Parameter Setting List is
displayed, and All MCM appears. Press All MCM to change all parameters.

Fig. 7-1
*M9998 is disabled after emergency stop or power off.
(2) Change via Upload from RS232C:
Use the transmission software to send parameters to the PC for saving as a text file.
Change the parameters with PE2, HE, or other document processing software and
transmit them back to the CNC. Refer to Chapter IX for detailed information.

Reset all MCM parameters to factory default settings.


Enter MDI mode and execute the command G10 P1000.

7 - 1
HUST H8-M Operator’s Manual

Parameter Setting List Screen

The numerator or denominator of the resolution is set based on the specifications of


the mechanical axial gearing (such as the ball screw) and the encoder pulses of the
servomotor. No unauthorized setting change is allowed.

Ball screw pitch


Resolution = × GR
Motor encoder ×multiplication factor

#9000~#9015 #9040~#9047

Ex. 1:
X-axis serves as the linear axis (#9340 = 0) and the ball screw pitch is 5.000 mm = 5000
Motor Encoder = 2500 pulses, multiplication factor = 4 (#9040 = 4)
Gear Ratio= 5:1(Servomotor rotates 5 turns = ball screw Rotates 1 turn)

5000 1
Resolution = ×
2500 × 4 5
1
=
10

7 - 2
Chapter VII MCM Parameter Settings

X-axis resolution denominator (#9001) = 10


X-axis resolution numerator (#9000) = 1

The maximum feed rate is calculated as follows:


Fmax = 0.95 x RPM (the maximum rpm of the servomotor) x Pitch (ball
screw pitch) ÷ GR
(Value Recommended for Use)
Ex: The highest rotation speed of the servomotor on X-axis is 3000 rpm, the ball
screw pitch is 5mm. And GR = 5:1 (Servomotor rotates 5 turns = ball screw
rotates 1 turn)
Fmax = 0.95 × 3000 × 5 ÷ 5 = 2850
Recommended #9140 setting: 2850
Homing Action Diagram
Velocity: #9180~#9187
Direction: #9160~9167 Touch the limit switch
#9126~#9267 Leave limit switch
Velocity: #9180~#9187 ×1/4
Velocity First Velocity Direction: #9200~#9207 = 1

Identify encoder index


Second Velocity: #9220~#9227
Third Direction: #9200~#9207 = 1

Tool Position

Length Limits of Homing Action


>< 0 During homing, the length limit of the grid point is found after
leaving the origin switch. The alarm Error 26 appears if the grid
point is not found within the limit length.
= 0 During homing, the motor stays at the position when leaving the
origin switch, rather than finding the the grid point, after leaving
the origin switch.
(As shown in the Homing Action Diagram above, homing is
finished when the second action is done.)

=======================================================

Linear/Rotary Axis
=0, linear axis
=1, rotary axis (0 ~ 360 degrees)

=======================================================

7 - 3
HUST H8-M Operator’s Manual

The concept and description of OT limit


EM-STOP
Software OT limit

Machine Origin

Software OT limit
EM-STOP

About5~10mm
About5~10mm

Determine whether the motor can be driven or not.


=0, it is cannot be driven.
=1, it can be driven.
Origin Shift
After homing is completed, you can shift the origin using these settings when there is a
difference between the origin and the point you need.
After homing is completed and the grid point is found, these settings will be changed.

G00 acceleration/deceleration: Acceleration time to a specified speed for the motor


from stop status (ms) during execution of G00.
G01 acceleration/deceleration: Acceleration time to a specified speed for the motor
from stop status (ms) during execution of G01.
G99 acceleration/deceleration: Acceleration time to a specified speed for the motor
from stop status (ms) during execution of G99.
Spindle acceleration/deceleration: Acceleration time to a specified speed for the
spindle motor from stop status (ms) when the spindle speed command is given.
Spindle encode: Number of feedback pulses of the spindle motor encoder.
Spindle speed at 10V: Motor speed at 10V output.
Counter upper limit: Set the upper limit for the number of executions. (Press the “0”
key in Auto mode to clear the number of executions)
Spindle number: Specify an axis for the spindle; the default is 8.The V-axis is set as
the spindle.
Spindle model: 0 represents the inverter spindle and 1 represents the servo spindle.

7 - 4
Chapter VII MCM Parameter Settings

Motor need execute Home command:For display only. It is not configurable. Binary
is used for display. Homing depends on the parameter settings of the motor.
When BIT0 is ON, X must execute homing; otherwise an alarm message appears, which
does not affect execution.
When BIT1 is ON, Y must execute homing; otherwise an alarm message appears, which
does not affect execution.
When BIT2 is ON, Z must execute homing; otherwise an alarm message appears, which
does not affect execution.
When BIT3 is ON, A must execute homing; otherwise an alarm message appears, which
does not affect execution.
Ex.:
When it is set to 5, X and Z should execute a homing action to make the alarm message
disappear.
When it is set to 7, X, Y and Z should execute a homing action to make the alarm
message disappear.

Graph display setting: 0-graph function, 1- servo voltage response function.


When it is set to 0, the mode is switches to Graph mode to enable the graph function.
When it is set to 0, the mode is switches to Graph mode to enable the servo voltage
response function.
When the servo voltage response function is enabled in Graph Mode,
use the “left arrow” and “right arrow” keys to switch between axes;
use the “up arrow” and “down arrow” keys to switch between time formats; or
use the “Page Up” and “Page Down” keys to switch between voltage formats.
Master/Slave mode setting:
#8336=0 Not in Master/Slave mode.
#8336=1 X-axis as the master.
#8336=2 Y-axis as the master
#8336=8 V-axis as the master.
#8336=256 Non-stop mode.
In-position setting (unit: pulses)
This setting is used for the non-stop mode in Master/Slave mode. In Master/Slave mode,
validation of position will be performed between blocks if the non-stop mode is enabled.
The next block will not be executed until the given setting value is reached.
Spindle direction: When the servo spindle is used as spindle, this setting can be used to
change the spindle direction.
In-position angle at the stop of the spindle: When the servo spindle is used as spindle,
this setting can be used to define the in-position angle at the stop of
the spindle. The G15 Rxx command can be also used to define the in-
position angle.

7 - 5
HUST H8-M Operator’s Manual

MCM Parameter Setting List

#07000-#07058 G54 ~ G59 work coordinate (X,Y,Z,A,B,C,U,V)


#07060~#07069 1st tool length compensation setting
|
#07450~#07459 40th tool length compensation setting
#07460~#07469 1st wear compensation setting
|
#07850~#07859 40th wear compensation setting
#7900 X-axis ball screw pitch error compensation setting (-1, 0, 1)
#7901 X-axis segment length for pitch error compensation
#7902~#7999 X-axis 98 segments compensation
#8000 Y-axis ball screw pitch error compensation setting (-1, 0, 1)
#8001 Y-axis segment length for pitch error compensation
#8002~#8099 Y-axis 98 segments compensation
#8100 Z-axis ball screw pitch error compensation setting (-1, 0, 1)
#8101 Z-axis segment length for pitch error compensation
#8102~#8199 Z-axis 98 segments compensation
#8200 A-axis ball screw pitch error compensation setting (-1, 0, 1)
#8201 A-axis segment length for pitch error compensation
#8202~#8299 A-axis 98 segments compensation
#8300 A integer and decimal places setting
|
#8325 Z integer and decimal places setting
#8326 "/" integer and decimal places setting

#8330 G01 power-on speed


#8331 In G01 or G00 status after power-on
#8332 In G17, G18, or G19 status after reset
#8333 Set to Metric or British system
#8334 In G98 or G99 mode after reset
#8335 == #00 RADUIS, <> #00 DIAMETER PROGRAMING
#8336 Master/Slave mode setting
#8337 Start number for automatic generation of program block numbers
Increment of numbers during automatic generation of program block
#8338
numbers

7 - 6
Chapter VII MCM Parameter Settings

#8339 RS232 baud rate


#8340 In position
#8341 Spindle axis setting
#8342 Spindle Encoder setting (PULSES/REV)
#8343 Spindle speed at 10V
#8344 Spindle acceleration/deceleration time (ms)
#8345 G00 acceleration/deceleration time
#8346 G01 acceleration/deceleration time
#8347 Acceleration/deceleration time for feed-rate per revolution
#8348 MPG hand-wheel acceleration/deceleration time
#8349 =1, S curve acceleration/deceleration
#8350 G02, G03 LIMIT
#8351 Arc cutting error
#8352 G83 DRILL CLEARANCE
#8353 Spindle Type
#8400 System display font size~
Program display window- X (program editing, program currently
#8401
running)
#8402 Program display window - Y
#8403 Width of the program display window
#8404 Height of the program display window
#8405 Display the X position of the MDI command
#8406 Display the Y position of the MDI command
#8407 Display the width of the MDI command
#8408 Display the X position of the program number
#8409 Display the Y position of the program number
#8410 Display the X position of the input area
#8411 Display the Y position of the input area
#8412 Display the X position of the RS232 mode
#8413 Display the Y position of the RS232 mode
#8414 Start position of X in Graph mode
#8415 Start position of Y in Graph mode
#8416 X horizontal distance in Graph mode
#8417 Coordinate axis displayed in Graph mode
#8418 Display the X position of the error message in Graph mode
#8419 Display the Y position of the error message in Graph mode
#8420 Display the X coordinate (machine coordinate)

7 - 7
HUST H8-M Operator’s Manual

#8421 Display the Y coordinate (machine coordinate)


#8422 Display the X coordinate (program coordinate)
#8423 Display the Y coordinate (program coordinate)
#8424 Display the X coordinate of follow error
#8425 Display the Y coordinate of follow error
#8426 Display the X coordinate (relative coordinate)
#8427 Display the Y coordinate (relative coordinate)

#8440 Display X position of ZDNC


#8441 Display Y position of ZDNC

#8445 X coordinate of the start position of the form


#8446 Y coordinate of the start position of the form
#8447 Display the X coordinate of the G04 countdown message
#8448 Display the Y coordinate of the G04 countdown message
#8449 Display the X coordinate of the error message position
#8450 Display the Y coordinate of the error message position
#8451 Display the X coordinate of the notification message position
#8452 Display the Y coordinate of the notification message position
#8453 Display the X coordinate of the search command
#8454 Display the Y coordinate of the search command
#8455 Display the voltage limit value for the servo response
#8456 Time of each segment when servo response is displayed

#8461 Background color


#8462 Text color
#8463 Softkey color
#8464 Blank color
#8465 Graph color
#8466 Cursor color

#8469 Backlight time setting for multiplication factor saving

#9000 X-axis resolution numerator (pulses)


#9001 X-axis resolution denominator (īm)

7 - 8
Chapter VII MCM Parameter Settings

#9002 Y-axis resolution numerator (pulses)


#9003 Y-axis resolution denominator (īm)
#9004 Z-axis resolution numerator (pulses)
#9005 Z-axis resolution denominator (īm)
#9006 A-axis resolution numerator (pulses)
#9007 A-axis resolution denominator (īm)
#9008 B-axis resolution numerator (pulses)
#9009 B-axis resolution denominator (īm)
#9010 C-axis resolution numerator (pulses)
#9011 C-axis resolution denominator (īm)
#9012 U-axis resolution numerator (pulses)
#9013 U-axis resolution denominator (īm)
#9014 V-axis resolution numerator (pulses)
#9015 V-axis resolution denominator (īm)

#9040 X-axis feedback signal multiplication factor


#9041 Y-axis feedback signal multiplication factor
#9042 Z-axis feedback signal multiplication factor
#9043 A-axis feedback signal multiplication factor
#9044 B-axis feedback signal multiplication factor
#9045 C-axis feedback signal multiplication factor
#9046 U-axis feedback signal multiplication factor
#9047 V-axis feedback signal multiplication factor

#9060 1 means X-axis can be driven and 0 means it can’t be driven.


#9061 1 means Y-axis can be driven and 0 means it can’t be driven.
#9062 1 means Z-axis can be driven and 0 means it can’t be driven.
#9063 1 means A-axis can be driven and 0 means it can’t be driven..
#9064 1 means B-axis can be driven and 0 means it can’t be driven.
#9065 1 means C-axis can be driven and 0 means it can’t be driven.
#9066 1 means U-axis can be driven and 0 means it can’t be driven.
#9067 1 means V-axis can be driven and 0 means it can’t be driven.

#9080 Motor rotation direction on X-axis


#9081 Motor rotation direction on Y-axis

7 - 9
HUST H8-M Operator’s Manual

#9082 Motor rotation direction on Z-axis


#9083 Motor rotation direction on A-axis
#9084 Motor rotation direction on B-axis
#9085 Motor rotation direction on C-axis
#9086 Motor rotation direction on U-axis
#9087 Motor rotation direction on V-axis

#9100 X-axis software OT Limit (+)


#9101 Y-axis software OT Limit (+)
#9102 Z-axis software OT Limit (+)
#9103 A-axis software OT Limit (+)
#9104 B-axis software OT Limit (+)
#9105 C-axis software OT Limit (+)
#9106 U-axis software OT Limit (+)
#9107 V-axis software OT Limit (+)

#9120 X-axis software OT Limit (-)


#9121 Y-axis software OT Limit (-)
#9122 Z-axis software OT Limit (-)
#9123 A-axis software OT Limit (-)
#9124 B-axis software OT Limit (-)
#9125 C-axis software OT Limit (-)
#9126 U-axis software OT Limit (-)
#9127 V-axis software OT Limit (-)

#9140 X-axis maximum feed rate


#9141 Y-axis maximum feed rate
#9142 Z-axis maximum feed rate
#9143 A-axis maximum feed rate
#9144 B-axis maximum feed rate
#9145 C-axis maximum feed rate
#9146 U-axis maximum feed rate
#9147 V-axis maximum feed rate

#9160 X-axis homing direction

7 - 10
Chapter VII MCM Parameter Settings

#9161 Y-axis homing direction


#9162 Z-axis homing direction
#9163 A-axis homing direction
#9164 B-axis homing direction
#9165 C-axis homing direction
#9166 U-axis homing direction
#9167 V-axis homing direction

#9180 X-axis homing velocity


#9181 Y-axis homing velocity
#9182 Z-axis homing velocity
#9183 A-axis homing velocity
#9184 B-axis homing velocity
#9185 C-axis homing velocity
#9186 U-axis homing velocity
#9187 V-axis homing velocity

#9200 X-axis homing grid direction


#9201 Y-axis homing grid direction
#9202 Z-axis homing grid direction
#9203 A-axis homing grid direction
#9204 B-axis homing grid direction
#9205 C-axis homing grid direction
#9206 U-axis homing grid direction
#9207 V-axis homing grid direction

#9220 X-axis homing grid velocity


#9221 Y-axis homing grid velocity
#9222 Z-axis homing grid velocity
#9223 A-axis homing grid velocity
#9224 B-axis homing grid velocity
#9225 C-axis homing grid velocity
#9226 U-axis homing grid velocity
#9227 V-axis homing grid velocity

7 - 11
HUST H8-M Operator’s Manual

#9240 X-axis homing grid length limit


#9241 Y-axis homing grid length limit
#9242 Z-axis homing grid length limit
#9243 A-axis homing grid length limit
#9244 B-axis homing grid length limit
#9245 C-axis homing grid length limit
#9246 U-axis homing grid length limit
#9247 V-axis homing grid length limit

#9260 X-HOME LIMIT INPUT NO. (+=no,-=nc)


#9261 Y-HOME LIMIT INPUT NO.
#9262 Z-HOME LIMIT INPUT NO.
#9263 A-HOME LIMIT INPUT NO.
#9264 B-HOME LIMIT INPUT NO.
#9265 C-HOME LIMIT INPUT NO.
#9266 U-HOME LIMIT INPUT NO.
#9267 V-HOME LIMIT INPUT NO.

#9280 X-axis origin shift


#9281 Y-axis origin shift
#9282 Z-axis origin shift
#9283 A-axis origin shift
#9284 B-axis origin shift
#9285 C-axis origin shift
#9286 U-axis origin shift
#9287 V-axis origin shift

#9300 X-axis program coordinates clearing when encountering M02, M30, M99~
#9301 Y-axis program coordinates clearing when encountering M02, M30, M99~
#9302 Z-axis program coordinates clearing when encountering M02, M30, M99~
#9303 A-axis program coordinates clearing when encountering M02, M30, M99~
#9304 B-axis program coordinates clearing when encountering M02, M30, M99~
#9305 C-axis program coordinates clearing when encountering M02, M30, M99~
#9306 U-axis program coordinates clearing when encountering M02, M30, M99~
#9307 V-axis program coordinates clearing when encountering M02, M30, M99~

7 - 12
Chapter VII MCM Parameter Settings

#9320 The X-axis coordinate command is absolute or incremental in the program


#9321 The Y-axis coordinate command is absolute or incremental in the program
#9322 The Z-axis coordinate command is absolute or incremental in the program
#9323 The A-axis coordinate command is absolute or incremental in the program
#9324 The B-axis coordinate command is absolute or incremental in the program
#9325 The C-axis coordinate command is absolute or incremental in the program
#9326 The U-axis coordinate command is absolute or incremental in the program
#9327 The V-axis coordinate command is absolute or incremental in the program

#9340 X-axis is linear or rotary


#9341 Y-axis is linear or rotary
#9342 Z-axis is linear or rotary
#9343 A-axis is linear or rotary
#9344 B-axis is linear or rotary
#9345 C-axis is linear or rotary
#9346 U-axis is linear or rotary
#9347 V-axis is linear or rotary

#9360 X-axis position gain


#9361 Y-axis position gain
#9362 Z-axis position gain
#9363 A-axis position gain
#9364 B-axis position gain
#9365 C-axis position gain
#9366 U-axis position gain
#9367 V-axis position gain

#9380 G28 X-axis 1st reference point


#9381 G28 Y-axis 1st reference point
#9382 G28 Z-axis 1st reference point
#9383 G28 A-axis 1st reference point
#9384 G28 B-axis 1st reference point
#9385 G28 C-axis 1st reference point
#9386 G28 U-axis 1st reference point

7 - 13
HUST H8-M Operator’s Manual

#9387 G28 V-axis 1st reference point

#9400 G30 X-axis 2nd reference point


#9401 G30 Y-axis 2nd reference point
#9402 G30 Z-axis 2nd reference point
#9403 G30 A-axis 2nd reference point
#9404 G30 B-axis 2nd reference point
#9405 G30 C-axis 2nd reference point
#9406 G30 U-axis 2nd reference point
#9407 G30 V-axis 2nd reference point

#9420 X-axis backlash compensation setting


#9421 Y-axis backlash compensation setting
#9422 Z-axis backlash compensation setting
#9423 A-axis backlash compensation setting
#9424 B-axis backlash compensation setting
#9425 C-axis backlash compensation setting
#9426 U-axis backlash compensation setting
#9427 V-axis backlash compensation setting

#9440 X-axis JOG speed


#9441 Y-axis JOG speed
#9442 Z-axis JOG speed
#9443 A-axis JOG speed
#9444 B-axis JOG speed
#9445 C-axis JOG speed
#9446 U-axis JOG speed
#9447 V-axis JOG speed

7 - 14
Chapter VII MCM Parameter Settings

7.2 Description of MCM Parameters


In this section the decimal format for parameters is described based on the 4/3 format.

1 #7000~#7059 G54 ~ G59 work coordinate system.

The work coordinates of MCM parameters #0~48 are set by G54~G59.That is, to set the
work origin of the work coordinates, the machine coordinates of the work origin are
relative to the machine coordinates, with the machine origin as the zero point.(Refer to
Chapter III for work origin setting)

#7000~#7009 G54 work coordinates setting.


#7000 G54 X-axis work coordinates setting.
#7001 G54 Y-axis work coordinates setting.
#7002 G54 Z-axis work coordinates setting.
#7003 G54 A-axis work coordinates setting.
#7004 G54 B-axis work coordinates setting.
#7005 G54 C-axis work coordinates setting.
#7006 G54 U-axis work coordinates setting.
#7007 G54 V-axis work coordinates setting.
#7008 System Reserved
#7009 System Reserved
#7010~#7019 G55 work coordinates setting.
#7020~#7029 G56 work coordinates setting.
#7030~#7039 G57 work coordinates setting.
#7040~#7039 G58 work coordinates setting.
#7050~#7059 G59 work coordinates setting.

2 #7060~#7459 1st ~ 40th tool length compensation.


#7060~#7069 1st tool length compensation.
#7060 1st X-axis tool length compensation.
st
#7061 1 Y-axis tool length compensation.
st
#7062 1 Z-axis tool length compensation.
st
#7063 1 A-axis tool length compensation.
st
#7064 1 B-axis tool length compensation.
st
#7065 1 C-axis tool length compensation.
st
#7066 1 U-axis tool length compensation.
st
#7067 1 V-axis tool length compensation.
st
#7068 1 Radius compensation.

7 - 15
HUST H8-M Operator’s Manual

#7070~#7079 2nd tool length compensation.




#7450~#7459 40th tool length compensation.

3 #7460~#7859 1st ~ 40th tool wear compensation.


#7460~#7469 1st tool wear compensation.
#7460 1st X-axis tool wear compensation.
st
#7461 1 Y-axis tool wear compensation.
st
#7462 1 Z-axis tool wear compensation.
st
#7463 1 A-axis tool wear compensation.
st
#7464 1 B-axis tool wear compensation.
st
#7465 1 C-axis tool wear compensation.
st
#7466 1 U-axis tool wear compensation.
st
#7467 1 V-axis tool wear compensation.
st
#7468 1 Radius compensation.

#7470~#7479 2nd tool wear compensation.




#7850~#7859 40th tool wear compensation.

4 #7900~#8299 Ball screw pitch error compensation.(X.Y.Z.A)


#7900 X-axis ball screw pitch error compensation (-1, 0, 1)
#7901 X-axis segment length for pitch error compensation.
#7902~#7999 X-axis 98 segments compensation setting.

#8000 Y-axis ball screw pitch error compensation (-1, 0, 1)


#8001 Y-axis segment length for pitch error compensation.
#8002~#8099 Y-axis 98 segments compensation setting.

#8100 Z-axis ball screw pitch error compensation (-1, 0, 1)


#8101 Z-axis segment length for pitch error compensation.
#8102~#8199 Z-axis 98 segments compensation setting.

7 - 16
Chapter VII MCM Parameter Settings

#8200 A-axis ball screw pitch error compensation (-1, 0, 1)


#8201 A-axis segment length for pitch error compensation.
#8202~#8299 A-axis 98 segments compensation setting.

X-axis Y-axis Z-axis A-axis Explanation


0 0 0 0 Cancel compensation
The tool is at the machine origin; negative
-1 -1 -1 -1
compensation
The tool is at the machine origin; positive
1 1 1 1
compensation

Ex. 1: #7900=-1, #7900=1

Coordinate-100.000 Coordinate 100.000


Machine origin
#7900 = -1 #7900 = 1
Coordinate=0
Negative compensation Positive compensation

4.1 The compensation segment length is the total length of the ball-screw divided by
the number of segments.
Ex.: The total length of the X-axis ball screw is 1m(1000mm), which is to be
divided into 10 compensation segments.

1000 mm

100mm
The average length of each segment is 100mm and the setting of MCM #7901
X=100.000. The compensation of each segment is determined by MCM
#7902~#7999.

4.2 If the length of a compensation segment is less than 20 mm, it will be set to 20
mm.

4.3 The HUST H8-M uses an average compensation approach and sets up 8 points for
each segment length as a basis for compensation. The compensation for each
point is 1/8th of the parameters in MCM #7902~#7999. The value of the
compensation is an integer, with μm as its unit. The remainder of the 1μm will
be added into the next point for compensation.

7 - 17
HUST H8-M Operator’s Manual

Ex.: The X-axis is divided into 10 segments for compensation and the average
length of each segment is 100 mm. Compensation setting: MCM #7902 =
0.026 mm; the average compensation of each point = 0.026/8=0.00325mm.
The compensation for the eight points in the first segment is described in
the following table:

Aggregated
Compensation Tool position, Avg. comp. of Actual comp. of
compensation,
point mm each point, mm each point, mm
mm
1 12.5 0.00325 0.003 0.003
2 25 0.00325 0.003 0.006
3 37.5 0.00325 0.003 0.009
4 50 0.00325 0.004 0.013
5 62.5 0.00325 0.003 0.016
6 75 0.00325 0.003 0.019
7 87.5 0.00325 0.003 0.022
8 100 0.00325 0.004 0.026

The compensation value is incremental, and is either positive or negative. If the


number of segments is less than 98, all other parameters must be set to zero.

Ex.: There are only 10 compensation segments. Therefore, compensation from


#11 to #98 (#7912~7999 for X-axis, #8012~8099 for Y-axis, # 8122~8199
for Z-axis, and #8222~8299 for A-axis) must be set to zero (0).

5 #8300~#8325 A ~ Z integer and decimal places.


#8300 A integer and decimal places.
#8301 B integer and decimal places.
#8302 C integer and decimal places.

#8325 Z integer and decimal places.

If the thousands digit is 1, it means that either positive or negative figure can be entered.
Tens digit = number of digits (including decimals).
Unit digit = decimal places.

Ex.:
#8300=1073 Î When editing A, you can enter a positive or negative 7-digit
figure for A (4-digit integers and 3-digit decimals)

7 - 18
Chapter VII MCM Parameter Settings

#8306=20 Î When editing G, you can enter a 2-digit figure (2-digit integers
without decimals)

6 #8330 G01 power-on speed.


This value is applied if the F value is not set for G01 when the program starts
running after power-on. If the F value is set, the set F value prevails.

7 #8331 In G01 or G00 status after power-on


This setting is applied if G00 or G01 is not specified when performing power-on.
#8331=0 G00 status.
#8331=1 G01 status.(Default)

8 #8332 In G17, G18, or G19 status after reset.


Specify a plane for arc cutting after reset.
#8332=0 G17
#8332=1 G18
#8332=2 G19

9 #8333 Set to Metric or British system.


#8333=0 Metric system.
#8333=1 British system.

10 #8334 In G98 or G99 mode after reset.


When #8334=0, it indicates that the system is in G98 mode after being reset.
When #8334=1, it indicates that the system is in G99 mode after being reset.

11 #8335 Radius/diameter editing.


#8335=0 Radius editing.
#8335=1 Diameter editing.

12 #8336 Master/Slave mode setting.


#8336=0 Not in Master/Slave mode.
#8336=1 X-axis as the master.
#8336=2 Y-axis as the master.
#8336=8 V-axis as the master.
#8336=256 Non-Stop mode – no axis is specified as the
spindle.

7 - 19
HUST H8-M Operator’s Manual

13 #8337 Start number for automatic generation of program


block numbers.
14 #8338 Increment for numbers during automatic generation of
program block numbers.
The block number is generated automatically when you press the INSERT key in
EDIT or TUTORIAL mode. When you press the RESET key, the block number
will be recounted from the configured parameters of MCM #8337 or #8338.

15 #8339 RS232 baud rate


Set RS232C baud rate to one of the following: 4800,9600,19200,38400,57600
16 #8340 IN POSITION SET. (UNIT: pulses)
In non-stop mode, it indicates in-position settings between blocks.
A higher setting value will lead to a slight speed variation between blocks. In this
case, the operation is smoother at the cost of precision.
A lower setting value will lead to a large speed variation between blocks. Precision
gains at the cost of speed.
This setting should be used with the Master/Slave mode settings (MCM8336 = 256).
17 #8341 Set the spindle axis.
#8341=0 Î No spindle.
#8341=1 Î X-axis is the spindle.
#8341=2 Î Y-axis is the spindle.
#8341=3 Î Z-axis is the spindle.
#8341=4 Î A-axis is the spindle.
#8341=5 Î B-axis is the spindle.
#8341=6 Î C-axis is the spindle.
#8341=7 Î U-axis is the spindle.
#8341=8 Î V-axis is the spindle.
18 #8342 Spindle encoder setting (pulses/rev).
Set the number of feedback pulses of the spindle per revolution.

19 #8343 Spindle speed set to 10V (RPM).


Set the max. spindle speed to 10V.

20 #8344 Spindle acceleration/deceleration time (ms).


Acceleration time to a specified speed for the spindle from stop.

21 #8345 G00 acceleration/deceleration time (ms).


Acceleration time to the maximum speed from stop during execution of G00.
Range:4~512

7 - 20
Chapter VII MCM Parameter Settings

22 #8346 G01 acceleration/deceleration time (ms).


Acceleration time to a specified speed from stop during execution of G01.
Range:10~1024
23 #8347 Acceleration/deceleration time for feed-rate per
revolution (ms).
Set the acceleration time to a specified speed from stop during feeding (G99 mode).
Range:4~1024
24 #8348 MPG hand-wheel acceleration/deceleration time (ms).
Set the axial speed when the MPG hand-wheel is rotated.

25 #8349 Acceleration/deceleration types.


#8349=0 Linear acceleration/deceleration.
#8349=1 S curve acceleration/deceleration.
If it is set to S curve acceleration/deceleration, the actual acceleration/deceleration
time will be twice the linear acceleration/deceleration time.

26 #8351 Arc cutting error


Range: 1~32

The smaller the value is, the more precise


the arc will be.

Arc cutting error

For arc cutting, the ideal cutting path is an arc, but actually the motor moves along
the arc chord (a straight line). Therefore, the cutting error must be taken into
account when arc cutting is required.

The smaller the value is, the more precise the arc will be. The ideal value is 1.
However, sometimes the motor cannot operate if the value is not greater than 1,
resulting in a greater cutting error.

27 #8352 G83 DRILL CLEARANCE


G83 reserved distance. Quickly feed to the last drilling depth – reserved distance.
28 #8353 SPINDLE TYPE SET
8353=0 OPEN LOOP SPINDLE OPERATION
8353=1 CLOSE LOOP SPINDLE OPERATION

29 #8400 System display font size. (0,1,2)

7 - 21
HUST H8-M Operator’s Manual

30 #8401 Program display window – X coordinate.


The program window includes program editing, the program that is running, I/O,
and MCM. This setting is applied.
31 #8402 Program display window – Y coordinate.
32 #8403 Width of the program display window.
33 #8404 Height of the program display window.

34 #8405 Display the X coordinate of the MDI command.

35 #8406 Display the Y coordinate of the MDI command.


36 #8407 Display the width of the MDI command.

37 #8408 Display the X coordinate of the program number.


38 #8409 Display the Y coordinate of the program number.

39 #8410 Display the X coordinate of the input area.


40 #8411 Display the Y coordinate of the input area.

41 #8412 Display the X coordinate of the RS232 mode.


42 #8413 Display the Y coordinate of the RS232 mode.

43 #8414 Start position of X-axis in Graph mode.


44 #8415 Start position of Y-axis in Graph mode.
The start position is the origin.
45 #8416 X horizontal distance in Graph mode.
Graphing width.
46 #8417 Coordinate axis displayed in Graph mode.
=0 X-Y plane
=1 Y-Z plane
=2 Z-X plane
=3 X-Y-Z 3D diagram

47 #8418 Display X coordinate of the error message in Graph


mode.
48 #8419 Display Y coordinate of the error message in Graph
mode.

49 #8420 Display the X coordinate (machine coordinate).


50 #8421 Display the Y coordinate (machine coordinate).
The position is displayed when the system is set to display the “machine
coordinate” by itself.

7 - 22
Chapter VII MCM Parameter Settings

51 #8422 Display the X coordinate (program coordinate).


52 #8423 Display the Y coordinate (program coordinate).
The position is displayed when the system is set to display the “program
coordinate” by itself.

53 #8424 Display the X coordinate of the follow error.


54 #8425 Display the Y coordinate of the follow error.
The position is displayed when the system is set to display the “follow error” by
itself.

55 #8426 Display the X coordinate (relative coordinate).


56 #8426 Display the X coordinate (relative coordinate).
The position is displayed when the system is set to display the “relative coordinate”
by itself.

57 #8440 Display the X coordinate of the ZDNC (DNC_EXE


message).
58 #8441 Display the Y coordinate of the ZDNC (DNC_EXE
message).

59 #8445 X coordinate of the top left of the form.


60 #8446 Y coordinate of the top left of the form.

61 #8447 Display the X coordinate of the G04 countdown


message.
62 #8448 Display the Y coordinate of the G04 countdown
message.

63 #8449 Display the X coordinate of the error message position


64 #8450 Display the Y coordinate of the error message position

65 #8451 Display the X coordinate of the notification message


position.
66 #8452 Display the Y coordinate of the notification message
position.

67 #8453 Display the X coordinate of the search command.


68 #8454 Display the Y coordinate of the search command.

69 #8455 Display the voltage limit value for the servo response.
70 #8456 Time of each segment when servo response is
displayed.

71 #8461 Background color.

7 - 23
HUST H8-M Operator’s Manual

72 #8462 _Text color.

73 #8463 Softkey color.

74 #8464 Blank color.

75 #8465 Graph color.

76 #8466 Cursor color.

77 #8469 Backlight time setting for multiplication factor


saving(min).

To increase the life of the display, the backlight function will be disabled automatically
when the unit is not operated for a specified time.

78 #9000 X-axis resolution numerator (pelses).


79 #9001 X-axis resolution denominator (īm).

80 #9002 Y-axis resolution numerator (pelses).


81 #9003 Y-axis resolution denominator (īm).

82 #9004 Z-axis resolution numerator (pelses).


83 #9005 Z-axis resolution denominator (īm).

84 #9006 A-axis resolution numerator (pelses).


85 #9007 A-axis resolution denominator (īm).

86 #9008 B-axis resolution numerator (pelses).


87 #9009 B-axis resolution denominator (īm).

88 #9010 C-axis resolution numerator (pelses).


89 #9011 C-axis resolution denominator (īm).

90 #9012 U-axis resolution numerator (pelses).


91 #9013 U-axis resolution denominator (īm).

92 #9014 V-axis resolution numerator (pelses).


93 #9015 V-axis resolution denominator (īm).

7 - 24
Chapter VII MCM Parameter Settings

The numerator or denominator of the resolution is set based on the specifications of


the mechanical axial gearing (such as the ball screw) and the encoder pulses of the
servomotor. No unauthorized setting change is allowed.

all screw pitch


Resolution = × GR
Motor encoder × multiplication

#9000~#9015 #9040~#9047
Ex. 1:
X-axis serves as the linear axis (#9340 = 0) and the ball screw pitch is 5.000 mm = 5000
Motor Encoder = 2500 pulses, multiplication factor = 4 (#9040 = 4)
Gear Ratio= 5:1 (Servomotor rotates 5 turns = ball screw rotates 1 turn)
5000 1
Resolution = ×
2500 × 4 5
1
=
10

X-axis resolution denominator (#9000) = 10


X-axis resolution numerator (#9001) = 1

Ex. 2:
Y-axis is rotary axis (#9341=1), angle per rotation = 360.000°
Motor Encoder = 2500 pulses, multiplication factor = 4 (#9041 = 4)
Gear Ratio= 5:1(Servomotor rotates 5 turns = Y-axis Rotates 1 turn)

360000 1
Resolution = ×
2500 × 4 5
36
=
5
Y-axis resolution denominator (#9002) = 5
Y-axis resolution numerator (#9003) = 36

Note: When the resolution is below 1/100, the software OT limit must be within the
range from –999999 to 999999.
Otherwise an error message displays, which cannot be removed.

94 #9040 X-axis feedback signal magnification factor.


95 #9041 Y-axis feedback signal magnification factor.
96 #9042 Z-axis feedback signal magnification factor.
97 #9043 A-axis feedback signal magnification factor.
98 #9044 B-axis feedback signal magnification factor.

7 - 25
HUST H8-M Operator’s Manual

99 #9045 C-axis feedback signal magnification factor.


100 #9046 U-axis feedback signal magnification factor.
101 #9047 V-axis feedback signal magnification factor.

Setting = Setting = 1, encoder pulses multiplied by 1.


Setting = 2, encoder pulses multiplied by 2.
Setting = 4, encoder pulses multiplied by 4.

7 - 26
Chapter VII MCM Parameter Settings

Only one of the four values can be used for MCM # #9040~#9047.

Note:
The setting of the multiplication factor is dependent on the rigidity of the
structure. Vibration of the motor during feeding of power to the structure
suggests that the rigidity of the structure is too high. This can be corrected by
reducing the multiplication factor of the axis concerned.

Example: The servomotor encoder pulses at 2000 per rotation. When MCM
#161 is set to 2, the pulses of Y-axis are 2000 x 2 = 4000.

102 #9060 X-axis can or cannot be driven.


103 #9061 Y-axis can or cannot be driven.
104 #9062 Z-axis can or cannot be driven.
105 #9063 A-axis can or cannot be driven.
106 #9064 B-axis can or cannot be driven.
107 #9065 C-axis can or cannot be driven.
108 #9066 U-axis can or cannot be driven.
109 #9067 V-axis can or cannot be driven.
#9060~#9067: You can set a certain axis to be drivable, but you have to make sure
the hardware contains these axes. They will be unusable when set to be drivable if
the hardware does not contains these axes.

110 #9080 Motor rotation direction on X-axis.


111 #9081 Motor rotation direction on Y-axis.
112 #9082 Motor rotation direction on Z-axis.
113 #9083 Motor rotation direction on A-axis.
114 #9084 Motor rotation direction on B-axis.
115 #9085 Motor rotation direction on C-axis.
116 #9086 Motor rotation direction on U-axis.
117 #9087 Motor rotation direction on V-axis.
Use 0 and 1 to change the motor rotation direction and homing direction.

118 #9100 X-axis software OT Limit (+)


119 #9101 Y-axis software OT Limit (+)
120 #9102 Z-axis software OT Limit (+)
121 #9103 A-axis software OT Limit (+)
122 #9104 B-axis software OT Limit (+)
123 #9105 C-axis software OT Limit (+)
124 #9106 U-axis software OT Limit (+)

7 - 27
HUST H8-M Operator’s Manual

125 #9107 V-axis software OT Limit (+)

126 #9120 X-axis software OT Limit (-)


127 #9121 Y-axis software OT Limit (-).
128 #9122 Z-axis software OT Limit (-).
129 #9123 A-axis software OT Limit (-).
130 #9124 B-axis software OT Limit (-).
131 #9125 C-axis software OT Limit (-).
132 #9126 U-axis software OT Limit (-).
133 #9127 V-axis software OT Limit (-).

Concept and description of over travel limit:

EM-STOP
Software OT limit

Machine Origin

Software OT limit

EM-STOP

About 5~10mm About 5~10mm


Note: The distance between the software OT Limit and EM-STOP is about 5~10mm.

134 #9140 X-axis maximum feed rate.


135 #9141 Y-axis maximum feed rate.
136 #9142 Z-axis maximum feed rate.
137 #9143 A-axis maximum feed rate.
138 #9144 B-axis maximum feed rate.
139 #9145 C-axis maximum feed rate.
140 #9146 U-axis maximum feed rate.
141 #9147 V-axis maximum feed rate.

7 - 28
Chapter VII MCM Parameter Settings

The maximum feed rate is calculated as follows:

Fmax = 0.95 × RPM (the maximum rpm of the servomotor) x Pitch (ball
screw pitch) ÷ GR
(Value Recommended for Use)

Ex: The max. X-axis servo motor rpm is 3000 with a 5mm pitch and GR = 5:1
(Servomotor rotates 5 turns = ball screw rotates 1 turn)
Fmax = 0.95 × 3000 × 5 ÷ 5 = 2850
Recommended setting: 2850

142 #9160 X-axis homing direction.


143 #9161 Y-axis homing direction.
144 #9162 Z-axis homing direction.
145 #9163 A-axis homing direction.
146 #9164 B-axis homing direction.
147 #9165 C-axis homing direction.
148 #9166 U-axis homing direction.
149 #9167 V-axis homing direction.

150 #9180 X-axis homing velocity.


151 #9181 Y-axis homing velocity.
152 #9182 Z-axis homing velocity.
153 #9183 A-axis homing velocity.
154 #9184 B-axis homing velocity.
155 #9185 C-axis homing velocity.
156 #9186 U-axis homing velocity.
157 #9187 V-axis homing velocity.

158 #9200 X-axis homing grid direction.


159 #9201 Y-axis homing grid direction.
160 #9202 Z-axis homing grid direction.
161 #9203 A-axis homing grid direction.
162 #9204 B-axis homing grid direction.
163 #9205 C-axis homing grid direction.
164 #9206 U-axis homing grid direction.
165 #9207 V-axis homing grid direction.

166 #9220 X-axis homing grid velocity.

7 - 29
HUST H8-M Operator’s Manual

167 #9221 Y-axis homing grid velocity.


168 #9222 Z-axis homing grid velocity.
169 #9223 A-axis homing grid velocity.
170 #9224 B-axis homing grid velocity.
171 #9225 C-axis homing grid velocity.
172 #9226 U-axis homing grid velocity.
173 #9227 V-axis homing grid velocity.
First velocity: The velocity of X, Y, Z, A, B, C, U and V is set respectively in
#9180~#9187, while the direction is set in #9160~9167.
Second velocity: The second velocity of X, Y, and Z is set to 1/4 of the first velocity
when it drops to 0. The direction is set in #9200~#9207.
Third velocity: This velocity is the encoder homing grid velocity and is set in
MCM#9220~#9227. The direction is set in #9200~#9207.

When the tool returns to home, the machine moves to the limit switch at the first
velocity; the length of the limit switch must be greater than the distance
required for deceleration. Otherwise the machine will run over the limit switch
and result in a homing error.

The equation to calculate the length of the limit switch is:


Length of limit switch t (FDCOM × ACC) ÷ 60000

Note: c FDCOM = Homing velocity 1, (#9180~#9187)


d ACC = G01 accel./decel. time (MCM #8346)
e 60000 msec ( 60 secs × 1000 = 60000 msec )

Ex.: FDCOM, the homing velocity 1 = 3000 mm / min


ACC, accel/decel time = 100 ms
Minimal Length of Limit Switch = (3000 × 100) ÷ 60000 = 5 mm

R231 =1, X-axis homing operation, R231=2, Y-axis homing operation, R231=4 Z-
axis homing operation, R231=8, A-axis homing operation, R231=15, X, Y, Z, A
simultaneous homing operation.
(Homing will be executed if R231 is specified as a number.)

Velocity: #9180~#9187
Direction: #9160~9167 Touch the limit switch
#9126~#9267 Leave limit switch
Velocity: #9180~#9187 ×1/4
Velocity First Velocity Direction: #9200~#9207 = 1

Identify encoder index


Second Velocity: #9220~#9227
Third Direction: #9200~#9207 = 1

174 #9240 X-axis homing grid length limit. Tool Position

7 - 30
Chapter VII MCM Parameter Settings

175 #9241 Y-axis homing grid length limit.


176 #9242 Z-axis homing grid length limit.
177 #9243 A-axis homing grid length limit.
178 #9244 B-axis homing grid length limit.
179 #9245 C-axis homing grid length limit.
180 #9246 U-axis homing grid length limit.
181 #9247 V-axis homing grid length limit.
An error message (ERROR 12) appears when it exceeds the homing grid length
limit after leaving the origin switch.

182 #9260 X-HOME LIMIT INPUT NO.


183 #9261 Y-HOME LIMIT INPUT NO.
184 #9262 Z-HOME LIMIT INPUT NO.
185 #9263 A-HOME LIMIT INPUT NO.
186 #9264 B-HOME LIMIT INPUT NO.
187 #9265 C-HOME LIMIT INPUT NO.
188 #9266 U-HOME LIMIT INPUT NO.
189 #9267 V-HOME LIMIT INPUT NO.
Set the input point for each axis to move to the origin switch.
When #9260=1, it indicates INPUT 1 (NO contact) is the origin switch for the X-
axis.
When #9261=-2, it indicates INPUT 2 (NC contact) is the origin switch for the Y-
axis.

190 #9280 X-axis origin shift


191 #9281 Y-axis origin shift
192 #9282 Z-axis origin shift
193 #9283 A-axis origin shift
194 #9284 B-axis origin shift
195 #9285 C-axis origin shift
196 #9286 U-axis origin shift
197 #9287 V-axis origin shift
After homing is completed, you can shift the origin using these settings when there
is difference between the origin and the point you need.
After homing is completed and the grid point is found, these settings will be
changed for the origin shift.

198 #9300 X-axis program coordinates clearing when encountering


M02, M30, M99.
199 #9301 Y-axis program coordinates clearing when encountering
M02, M30, M99.

7 - 31
HUST H8-M Operator’s Manual

200 #9302 Z-axis program coordinates clearing when encountering


M02, M30, M99.
201 #9303 A-axis program coordinates clearing when encountering
M02, M30, M99.
202 #9304 B-axis program coordinates clearing when encountering
M02, M30, M99.
203 #9305 C-axis program coordinates clearing when encountering
M02, M30, M99.
204 #9306 U-axis program coordinates clearing when encountering
M02, M30, M99.
205 #9307 V-axis program coordinates clearing when encountering
M02, M30, M99.
When #9300=0, the X-axis program coordinates will not be cleared when
encountering M02, M30, M99.
When #9300=1, the Y-axis program coordinates will be cleared when encountering
M02, M30, M99.

206 #9320 The X-axis coordinate command is absolute or


incremental in the program~
207 #9321 The Y-axis coordinate command is absolute or
incremental in the program~
208 #9322 The Z-axis coordinate command is absolute or
incremental in the program~
209 #9323 The A-axis coordinate command is absolute or
incremental in the program~
210 #9324 The B-axis coordinate command is absolute or
incremental in the program~
211 #9325 The C-axis coordinate command is absolute or
incremental in the program~
212 #9326 The U-axis coordinate command is absolute or
incremental in the program~
213 #9327 The V-axis coordinate command is absolute or
incremental in the program~
When #9320=1, X is an absolute coordinate command.
When #9321=0, Y is an incremental coordinate command.
When U and V are set to be incremental commands, they will become the
incremental commands of the X- and Y-axes, not the U- and V-axes.

214 #9340 X-axis is linear or rotary.

7 - 32
Chapter VII MCM Parameter Settings

215 #9341 Y-axis is linear or rotary.


216 #9342 Z-axis is linear or rotary.
217 #9343 A-axis is linear or rotary.
218 #9344 B-axis is linear or rotary.
219 #9345 C-axis is linear or rotary.
220 #9346 U-axis is linear or rotary.
221 #9347 V-axis is linear or rotary.
When #9340=0, X-axis is a linear axis.
When #9341=1, Y-axis is a rotary axis.

222 #9360 X-axis position gain.


223 #9361 Y-axis position gain.
224 #9362 Z-axis position gain.
225 #9363 A-axis position gain
226 #9364 B-axis position gain.
227 #9365 C-axis position gain.
228 #9366 U-axis position gain.
229 #9367 V-axis position gain.

Adjustment for smooth motor operation: (recommended procedure)


(1) Adjust the servo driver (refer to the driver operating manual)
(2) Adjust the encoder pulse multiplication factor (1,2,4) in the MCM
#9040~#9047. Normally, the servo error switches between 0 and 1 when the
motor is locked. If the servo error switches between 4 and 5, adjust the
MCM #9040~9047 amplification factor; i.e. 4 --> 2 or 2 --> 1.
(3) Adjust the position gain settings in MCM #9360~#9367.

230 #9380 G28 X-axis 1st reference point


231 #9381 G28 Y-axis 1st reference point
232 #9382 G28 Z-axis 1st reference point
233 #9383 G28 A-axis 1st reference point
234 #9384 G28 B-axis 1st reference point
235 #9385 G28 C-axis 1st reference point
236 #9386 G28 U-axis 1st reference point
237 #9387 G28 V-axis 1st reference point
Set the coordinates of the reference point to which the G28 command moves.

238 #9400 G30 X-axis 1st reference point

7 - 33
HUST H8-M Operator’s Manual

239 #9401 G30 Y-axis 1st reference point


240 #9402 G30 Z-axis 1st reference point
241 #9403 G30 A-axis 1st reference point
242 #9404 G30 B-axis 1st reference point
243 #9405 G30 C-axis 1st reference point
244 #9406 G30 U-axis 1st reference point
245 #9407 G30 V-axis 1st reference point
Set the coordinates of the reference point to which the G30 command moves.

246 #9420 X-axis backlash compensation setting


247 #9421 Y-axis backlash compensation setting
248 #9422 Z-axis backlash compensation setting
249 #9423 A-axis backlash compensation setting
250 #9424 B-axis backlash compensation setting
251 #9425 C-axis backlash compensation setting
252 #9426 U-axis backlash compensation setting
253 #9427 V-axis backlash compensation setting
Set the backlash compensation for each axis.

254 #9440 X-axis JOG speed.


255 #9441 Y-axis JOG speed.
256 #9442 Z-axis JOG speed.
257 #9443 A-axis JOG speed.
258 #9444 B-axis JOG speed.
259 #9445 C-axis JOG speed.
260 #9446 U-axis JOG speed.
261 #9447 V-axis JOG speed.
Set the JOG speed for each axis.

7 - 34
Chapter VIII Wiring Diagram

8. Wiring Diagram
8.1. H8-M External Dimensions

Fig. 8-4 H8-M Series Case Dimensions

z H8-M Series Case Dimensions (Top View)

Fig. 8-5 H8-M Series Case Dimensions (Top View)

8 - 1
Chapter VIII Wiring Diagram

8.2. H8-M Series Cutout Dimensions

z Control Unit Cutout Dimensions

M4

CUT OUT

Fig. 8-6 Control Unit Cutout Dimensions

z Operator Panel Cutout Dimensions

CUT OUT

Fig. 8-7 Operator Panel Cutout Dimensions

8 - 2
Chapter VIII Wiring Diagram

8.3. Connector Types

The connector types on the back of the H8-M control unit are listed below. Each
connector symbol is followed by the letter M (for male) or F (for female).

DB9L : 9-pin connector.


DB25LF : 25-pin connector.
TBxx : Terminal connector; the pins are represented with “XX”.

8.3.1. Connector Designation

The H8-M connector designation is marked on the back of the control unit case and the
corresponding types are listed below:

Connector
Connector Name Type
Designation
Standard Output Interface OUT1 DB25LM (Male)
Standard Input Interface IN1 DB25LF (Female)
Standard Output Interface OUT2 DB25LM (Male)
Standard Input Interface IN2 DB25LF (Female)
D/A Spindle Analog Output D/A DB15LM (Male)
X-axis Servo X-axis DB9LF (Female)
Y-axis Servo Y-axis DB9LF (Female)
Z-axis Servo Z-axis DB9LF (Female)
A-axis Servo A-axis DB9LF (Female)
B-axis Servo B-axis DB9LF (Female)
C-axis Servo C-axis DB9LF (Female)
U-axis Servo U-axis DB9LF (Female)
V-axis Servo V-axis DB9LF (Female)
MPG MPG DB9LM (Male)
Expandable I/O SIO DB15LF (Female)
RS232C Interface Connector RS232 DB9LF (Female)
Operator Panel Connector KEY DB15LM (Male)

Table 8-1 Connector Designations and Types

8 - 3
Chapter VIII Wiring Diagram

8.4. System Cables and Wiring Diagram

* System Wiring Diagram (Fig. 8-2)


To avoid noise, the total length of an RS232C cable should not be more than 15m.

OUTPUT Standard O (2)


OUT1
CPU INPUT Standard I (3)
Main
IN1
Board
OUTPUT Standard O (2)
(1)
0UT2
INPUT Standard I (3)

IN2
D/A (4)
D/A
Servo Motor (5)
X-Axis
Driver
X-AXIS
Servo Motor (5)
Y-Axis
Y-AXIS Driver
Servo Motor (5)
Z-Axis
Driver
Z-AXIS
Servo Motor (5)
A-Axis
A-AXIS Driver
Servo Motor (5)
B-Axis
B-AXIS Driver
Servo Motor (5)
C-Axis
C-AXIS Driver
Servo Motor (5)
U-Axis
U-AXIS Driver
Servo Motor (5)
V-Axis
V-AXIS Driver

MPG MPG(6)

SIO I/O Serial Inp/Out (7)

RS232
RS232C (8)

Fig. 8-2 System Wiring Assembly

8 - 4
Chapter VIII Wiring Diagram

* AC Power Supply Connection

AC power supply for the HUST H8-M Series = AC 110V/220V ± 10%.


A constant voltage regulator should be used with shielded twisted cables if the voltage
fluctuations exceed the above range.

8.4.1. Positioning Control (Servo Driver/Pulse Generator) Connection


The servo deriver is connected to the X-axis, Y-axis……..V-axis connectors and the
pulse generator is connected to the MPG, as shown in Fig. 8-3. The servo driver and
pulse generator connection varies depending on the brand. Refer to the operating
manuals for details.
The servo driver and pulse generator connection vary

1
X-AXISA
2
A-
B 3
CPU Servo
Main Board B- 4
Signal
Z 5
6
Z-
VCMD 7 Positioning Command
8 -10 ~ +10V
0V 0V
+5V 9
Case Ground

A 1
Y-AXIS
2
A-
B 3
Servo
4
B- Signal
5
Z
6
Z-
7 Positioning Command
VCMD -10 ~ +10V
8
0V 0V
+5V 9
Case Ground

1
(MPG)A

2
B MPG
Signal
3
+5V
0V
7.8

Case Ground

Fig. 8-3 Positioning Control Connection

8 - 5
Chapter VIII Wiring Diagram

* AC Power Supply Connection

CNC Power-on
Servo Power-on Time
Time
servo on delay
To CPU Power supply R
AC220V R
AC220V S To CPU Power supply T
AC220V T
Timer Delay Contact

Servo
Driver
power-off power-on
Power-On Relay
Power-On Timer Relay

Connection of the parts arts within


the dotted is not mandatory. Fan

AC 220V R T0 Servo AMP Power TB P


AC 220V S T0 Servo AMP Power TB N

R S T

Fig. 8-4 System AC Power Supply Connection

* MPG Connection
If the tool moves in the direction opposite to that indicated by the MPG, please
exchange signal lines A and B in the MPG.

CPU Main
MPG
Board 1
+5V 0V A B
2
3
4
5
6
7
0V
8
0V

Fig. 8-5 MPG Connection

8 - 6
Chapter VIII Wiring Diagram

8.5. RS232 Connector Pin Assignment and Connection

1. The distance between the RS232 port and the PC should not be more than 15
meters.

2. If the connection is established in an environment where there is a source of noise,


such as electric discharge from machining or a welding machine, establish the
connection using shield twisted cables or avoid installing in such an environment.
The control unit and PC should not share a power outlet with an electrically
discharging machining or welding machine.

3. The interface voltage of the PC should range from 10 to 15V.

OOOOOO
I 傳 手 編自
6 6 6 6 6 7 6
X3Y3Z1A7
3 89
8 9
U3V3W1G4
3 6
5 6
I2J2K1F1
2 23
2 3 DC DC
R3S3T2M1
3 0
1 1#
4 4 2 4 4
5 5 5 5 5 4 4 4 5 4 輸4

HUST H8-M Control Unit PC COM2

2 3 RXD
TXD
3 2 TXD
RXD
DB9LM DSR
4 20 DTR DB25LF
5 7
CONNECTOR SG
6
SG CONNECTOR
6
DTR DSR
7 4
CTS RTS
8 5
RTS CTS

HUST H8-M Control Unit PC COM2 COM1

2 2
TXD RXD
3 3
RXD TXD
DB9LM DSR
4 4
DTR DB9LF
5 5
CONNECTOR SG
6 6
SG CONNECTOR
DTR DSR
7 7
CTS RTS
8 8
RTS CTS

Fig. 8-6 RS232 Connection

8 - 7
Chapter VIII Wiring Diagram

8.6. I/O Interface Connection Overview

The input signal is transmitted to the control unit from an


external machine through the button, limit switch, relay board contact, or
proximity switch. The output signal is transmitted to the external machine
from the control unit. The output circuit of the HUST H8-M Series is a
transistor circuit with open collectors, which is used to drive the relay or
LED of the machine.

The +24V power used by the I/O interface should be provided


externally.

The I/O interface can be connected by one of the following two methods:

(1) I/O devices are directly controlled by the controller.


(2) I/O devices are controlled by the controller via an input / output board
(output relay board).

I. 3 types of input boards are available.

1. Input board with conventional terminal (PC board number: AB058)


2. Modular input board with conventional terminal (PC board number:
IO\PIO\TB_V02_DI S/N: AB208)
3. Input board with CE compliant terminal (PC board number: NPNI_21
S/N: AB146)

II. 4 types of output boards are available.

1. Output board with conventional terminal (PC board number: AB055)


2. Modular output board with conventional terminal (PC board number:
O\PIO\TB_V02_DO S/N: AB209)
3. 16-channel relay output board with CE-compliant terminal (PC board
number: NPNO_2 S\N: AB147)
4. 4-channel relay output board with CE-compliant terminal (PC board
number: H6A\PIOEXT\OUT_V1: AB154)

5. I/O devices are directly controlled by the controller


Input/output signals are directly connected to the OUT1/IN1, and

8 - 8
Chapter VIII Wiring Diagram

OUT2/IN2 connectors of the HUST H8-M Series.

8 - 9
Chapter VIII Wiring Diagram

8.7. Controller I/O Interface Connector Pin Assignment

The I/O connector designation and pin assignments are shown in Table 5-1 and Fig. 8-1.
Note that there are 24 input points and 16 output points.

Table 8-7 I/O Connector Designations and Pin Assignment


Connector I/O Pin Assignment
OUT1 O 000 ~ O 015
IN1 I000 ~ I023
OUT2 O016 ~ O031
IN2 I024 ~ I047

(Female) Connector Input (Male) Connector Output


(Input Point) Pin Assignment (Output Point) Pin Assignment

13 12 1 00
24VGND 25 13 14
12 11 2 01
23 24 14 15
11 10 3 02
22 23 16
10 09 4 03
21 22 17
9 08 5 04
20 21
8 07 +24V power for 18
6 05
19 20 I/O should be 19
7 06 7 06
18 19 provided 20
6 05 8 07
17 18 externally. 21
5 04 9 08
16 17 +24V 22
4 03 10 09
15 16 +24V 23
3 02 11 10
14 15 24VGND 24
2 01 12 11
13 14 24VGND 25
1 00 13 12

Fig. 8-8 I/O Interface Connector Pin Assignment (NPN-type)

8.7.1. Input Signal Wiring for Direct Control of I/O Devices by the
Controller

* Input Signal Specifications:


Input voltage: 0V.
Input current: 6 mA.

8 - 10
Chapter VIII Wiring Diagram

* Input Signal Wiring Diagram (direct input to the controller)


Directly connected to the IN1/IN2 connector on the controller case, as
shown in Fig. 8-9.
Machine Controller Circuit +24V Power Supply

Signal Contact 24V 5V 5V 24V


3.3K 3.3K
Resistance R R Resistance R Diode

24VGND
INPUT OUTPUT
+24V
I POINT
R
24VGND
5VGN
INPUT DB25LF Connector +24V power should be provided
externally for OUTPUT DB25LM
PIN1-PIN24 is I point
connector.
PIN25 is 24VGND PIN22-PIN23 is 24V
PIN24-PIN25 is 24VGND
Fig. 8-9 Input Signal Wiring Diagram (direct input to the controller)

8.7.2. Output Signal Wiring for Direct Control of I/O Devices by the
Controller

* Output Signal Specifications


Output voltage: 24V.
Output current: 100 mA.
Each contact of the transistor output lines of the HUST H8-M Series is
capable of handling 100mA at 24V.

8 - 11
Chapter VIII Wiring Diagram

* Output Signal Wiring Diagram (direct output from the controller)


Directly connected to the OUT1/OUT2 connector on the controller case, as
shown in Fig. 8-10.

Controller Circuit +24V Power Supply Machine

24V 5V 5V 24V
3.3K
24V
3.3K
Resistance R R Resistance R Diode
RELAY
24VGND
INPUT OUTPUT
+24V
R
5VGND 24VGND

OUTPUT DB25LM +24V power should be provided externally for


Connector OUTPUT DB25LM connector.
PIN1-PIN16 is O-point
PIN22-PIN23 is 24V
PIN24-PIN25 is 24VGND

Fig. 8-10 Output Signal Wiring Diagram (direct output from the controller)

8.7.3 I/O devices are controlled by the controller via input / output
boards (input board / output relay boards)

The input signal cables are connected to the HUST input board and to the
input connector on the HUST H8-M Series via the DB25LF connector of
the input board. One advantage of using the HUST input board is that
protection for the HUST H8-M Series CNC controller can be ensured. This
connection method is only suitable for the NPN-type input connector.

The output signal cables are connected to the HUST output board (output
relay board) and to the output connector on the HUST H8-M Series via the
DB25LM connector of the output board. One advantage of using the HUST
output board is that protection for the HUST H8-M Series CNC controller
can be ensured. This connection method is only suitable for the NPN-type
output connector.

8.8. Input Signal Wiring for Controlling I/O Devices via Input Boards (3
types available)

8.8.1. Input Board with Conventional Terminal


(PC board number: AB058)

8 - 12
Chapter VIII Wiring Diagram

* Input signal specifications for input board with conventional terminal

Input voltage: 0V.


Input current: 6 mA.

* Input Signal Wiring Diagram (input to the controller via input board
with conventional terminal)

+24V voltage should be supplied for the controller output


terminal.
Machine Input Board Controller Circuit
Signal Contact
24V 5V
I-Point
3.3K
Resistance
R R

INPUT

24VGN
5VGN

PS: +24V power should be supplied INPUT DB25LF Connector


externally for the OUTPUT PIN1-PIN24 is I-point.
DB25LM connector of the PIN25 is 24VGND
controller.

Fig. 8-11 Input Signal Wiring (input to controller via input board with
conventional terminal)

* Wiring Diagram of Input Board with Conventional Terminal

D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24

I00 I01 I02 I03 I04 I05 I06 I07 I08 I09 I10 I11 I12 I13 I14 I15 I16 I17 I18 I19 I20 I21 I22 I23 GND24V

AB05

Fig. 8-12 Wiring of Input Board with Conventional Terminal

8 - 13
Chapter VIII Wiring Diagram

* Contact Number Assignment for Input Board with Conventional


Terminal
LED Indicator
INPUT DB25LF Connector The indicator is on at I
POINTON.

D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24

I00 I01 I02 I03 I04 I05 I06 I07 I08 I09 I10 I11 I12 I13 I14 I15 I16 I17 I18 I19 I20 I21 I22 I23 GND24V

AB05

Fig. 8-13 Contact Number Assignment for Input Board with Conventional
Terminal

8.8.2. Modular input board with conventional terminal


(PC board number: IO\PIO\TB_V02_DI S/N: AB208)

* Input signal specifications for modular input board with conventional


terminal
Input voltage: 0V.
Input current: 6 mA.

* Input Signal Wiring Diagram (input to controller via modular input


board with conventional terminal)

+24V voltage should be supplied for the controller output


terminal.

8 - 14
Chapter VIII Wiring Diagram

Machine I-Point Controller Circuit +24V Power Supply


Signal Contact 24V 5V

I-Point 3.3K
Resistance R R
24V INPUT 24VGND

+24V
24VGND
5VGND

INPUT DB25LF Connector


PIN1-PIN24 is I-point.
PIN25 is 24VGND.

Fig. 8-14 Input Signal Wiring (input to controller via modular input board
with conventional terminal)

* Wiring Diagram of Modular Input Board with Conventional Terminal


I00 I01 I02 I03 I04 I05 I06 I07 I08 I09 I10 I11 I12 I13 I14 I15 +24V GND
IO\PIO\TBV02_DI S/N:AB208

24V

24V

I16 I17 I18 I19 I20 I21 I22 I23 +24V +24V +24V +24V +24V GND GND GND GND GND

Fig. 8-15 Wiring of Modular Input Board with Conventional Terminal

* Contact Number Assignment for Modular Input Board with


Conventional Terminal
I00 I01 I02 I03 I04 I05 I06 I07 I08 I09 I10 I11 I12 I13 I14 I15 +24V GND
IO\PIO\TBV02_DI S/N:AB208

LED Indicator
I00 I01 I02 I03 I04 I05 I06 I07 I08 I09 I10 I11 I12 I13 I14 I15
At I POINTON, the indicator
is on.
INPUT DB25LF Connector
I16 I17 I18 I19 I20 I21 I22 I23
+24V Power Input

I16 I17 I18 I19 I20 I21 I22 I23 +24V +24V +24V +24V +24V GND GND GND GND GND

Fig. 8-16 Contact Number Assignment for Modular Input Board with
Conventional Terminal

8 - 15
Chapter VIII Wiring Diagram

8.8.3. Input board with CE compliant terminal


(PC board number: NPNI_21 S/N: AB146)

* Input signal specifications for input board with CE compliant terminal

Input voltage: 0V.


Input current: 6 mA.

* Input Signal Wiring Diagram (input to controller via input board with
CE compliant terminal)

+24V voltage should be supplied for the controller output


terminal.

Machine I-Point Controller Circuit +24V Power Supply


Signal Contact 24V 5V
3.3K
R R
Resistance
24VGND
INPUT
+24V
24VGND

5VGND
I-Point
INPUT DB25LF Connector
PIN1-PIN24 is I-point.
PIN25 is 24VGND.

Fig. 8-17 Input Signal Wiring (input to controller via input board with CE
compliant terminal)

8 - 16
Chapter VIII Wiring Diagram

* Wiring Diagram for Input Board with CE Compliant Terminal

+24V +24V +24V


GND GND GND
I07 I15 I23

+24V GND
+24V +24V +24V

+24V
GND GND GND
I06 I14 I22
+24V +24V +24V
GND GND GND
I05 I13 I21
+24V +24V +24V
GND GND GND
I04 I12 I20
+24V +24V +24V
GND GND GND
I03 I11 I19
+24V +24V +24V
GND GND GND
I02 I10 I18

NPNI_21 S/N:
+24V +24V +24V
GND GND GND
I01
AB146
I09 I17
+24V +24V +24V
GND GND GND
I00 I08 I16

Fig. 8-18 Wiring Diagram for Input Board with CE Compliant Terminal

8 - 17
Chapter VIII Wiring Diagram

* Contact Number Assignment for Input Board with CE Compliant


Terminal

+24V +24V +24V


GND GND GND
I07 I15 I23

+24V GND
+24V +24V +24V +24V

+24V
GND GND GND Power Input
I06 I14 I22
+24V +24V +24V
GND GND GND
LED Indicator
I05 I13 I21 At I POINTON, the
+24V +24V +24V indicator is on.
GND GND GND
I04 I12 I20
+24V +24V +24V
GND GND GND
I03 I11 I19
+24V +24V +24V INPUT DB25LF Connector
GND GND GND
I02 I10 I18 NPNI_21 S/N:
+24V +24V +24V
GND GND GND
I01 I09 I17
AB146

+24V +24V +24V


GND GND GND
I00 I08 I16

Fig. 8-19 Contact Number Assignment for Input Board with CE Compliant
Terminal

8.9. Output Signal Wiring for Controlling I/O Devices via Output
Boards (output relay board) (4 types available)

8.9.1 Output Board with Conventional Terminal


(PC board number: AB055)

* Output signal specifications for output board with conventional


terminal

Max. current: 500 mA.

8 - 18
Chapter VIII Wiring Diagram

Each output on the output board with the conventional terminal (output
relay board) can withstand up to AC 110V or DC 25V and 500 mA current.
All outputs are of the dry contact type.

* Output Signal Wiring Diagram (output from controller via output


board with conventional terminal)
Controller Circuit Output Relay Board Machine +24V Power Supply

5V 24V
3.3K
Resistance R Diode
AC110
OUTPUT
24VGND
AC110
+24V
R

Controller Circuit Output Relay Board Machine +24V Power Supply

5V 24V 24V
3.3K
Resistance R Diode
24VGND
OUTPUT
+24V

R
24VGND

Fig. 8-20 Output Wiring (output from controller via output board with
conventional terminal)

8 - 19
Chapter VIII Wiring Diagram

* Wiring Diagram for Output Board with Conventional Terminal

O00 O01 O02 O03 O04 O05 O06 O07 O08

24V
AB055

24V

O09 O10 O11 O12 O13 O14 O15 +24V GND

Fig. 8-21 Wiring of Output Board with Conventional Terminal

* Contact Number Assignment for Output Board with Conventional


Terminal

O00 O01 O02 O03 O04 O05 O06 O07 O08


Surge Absorber

D25 D26 D27 D28 D29 D30 D31 D32 D33 LED Indicator
AB055

OUTPUT
DB25LM
D34 D35 D36 D37 D38 D39 D40 Connector
+24V
Power Input

O09 O10 O11 O12 O13 O14 O15 +24V GND

Fig. 8-22 Contact Number Assignment for Output Board with Conventional
Terminal

8 - 20
Chapter VIII Wiring Diagram

8.9.2. Modular Output Board with Conventional Terminal


(PC board number: IO\PIO\TB_V02_DI S/N: AB208)

* Output signal specifications for modular output board with


conventional terminal

Output voltage: 24V.


Output current: 100 mA.

Each contact on the modular output board with the conventional terminal
(output relay board) can withstand up to AC 110V and 500 mA current. All
outputs are of the open collector type.
* Output Signal Wiring Diagram (output from controller via modular
output board with conventional terminal)
Controller Circuit Output Relay Board Machine +24V Power Supply

5V 24V 24V
3.3K
Resistance R Diode

+24V
OUTPUT

24VGND
R

Fig. 8-23 Output Wiring (output from controller via modular output board
with conventional terminal)

8 - 21
Chapter VIII Wiring Diagram

* Wiring Diagram for Modular Output Board with Conventional


Terminal

O00 O01 O02 O03 O04 O05 O06 O07 O08 O09 O10 O11 O12 O13 O14 O15 +24V GND

IO\PIO\TBV02_DO S/N:AB209
24V

Fig. 8-24 Wiring of Modular Output Board with Conventional Terminal

* Contact Number Assignment for Modular Output Board with


Conventional Terminal

O00 O01 O02 O03 O04 O05 O06 O07 O08 O09 O10 O11 O12 O13 O14 O15 +24V GND
IO\PIO\TBV02_DO S/N:AB209

O00 O01 O02 O03 O04 O05 O06 O07 O08 O09 O10 O11 O12 O13 O14 O15
+24V
Power Input
LED Indicator

OUTPUT
DB25LM Connector

Fig. 8-25 Contact Number Assignment for Modular Output Board with
Conventional Terminal

8.9.3 16-channel Relay Output Board with CE-compliant Terminal


(PC board number: NPNO_2 S\N: AB147)

* Output signal specifications for 16-channel relay output board with CE


compliant terminal

Output voltage: 24V.


Output current: 100 mA.

Max. current: 500 mA.

8 - 22
Chapter VIII Wiring Diagram

Each contact on the 16-channel output board with the CE compliant


terminal (output relay board) can withstand up to 500 mA current.

* Output Signal Wiring Diagram (output from controller via 16-channel


output board with CE compliant terminal)

Controller Circuit Output Relay Board Machine +24V Power Supply

5V 24V
3.3K
Resistance R Diode

+24V
OUTPUT
24VGND

OUTPUT DB25LM Connector PS: +24V power should be provided externally.


PIN1-PIN16 is O-point.
PIN22-PIN23 is 24V.
PIN24-PIN25 is 24VGND.

Fig. 8-26 Output Signal Wiring Diagram (output from controller via
16-channel output board with CE compliant terminal)

8 - 23
Chapter VIII Wiring Diagram

* Wiring Diagram for 16-channel Output Board with CE Compliant


Terminal

O00 O01 O02 O03 O04 O05 O06 O07


NO00
COM0
+24V
NO01
COM1
+24V

NO04
COM4
+24V
NO05
COM5
+24V

M7N
CO
+24V
NO02
COM2
+24V

NO06
COM6
+24V
NO03
COM3
+24V
24VGND
NPNO_2 S\N:AB147

24V

+24V
GND
Surge Absorber +24V

NO12
COM12
+24V
NO13
COM13
+24V

NO15
COM15
+24V
NO10
COM10
+24V

NO14
COM14
+24V
NO11
COM11
+24V
NO09
COM9
+24V
NO08
COM8
+24V

O08 O09 O10 O11 O12 O13 O14 O15

Fig. 8-27 Contact Number Assignment for 16-channel Output Board with
CE Compliant Terminal

8 - 24
Chapter VIII Wiring Diagram

* Contact Number Assignment for 16-channel Output Board with CE


Compliant Terminal

O00 O01 O02 O03 O04 O05 O06


0
0NO0
COM
+24V
1
1NO0
COM
+24V

4
4NO0
COM
+24V
5
5NO0
COM
+24V

7
7NO0
COM
+24V
2
2NO0
COM
+24V

6
6NO0
COM
+24V
3
3NO0
COM
+24V
LED Indicator
NPNO_2 S\N:AB147

RELAY Surge Absorber

O08
O09
O10

O12
O13
O14
O15
O11
O00
O01
O02
O03
O04
O05
O06
O07

+24V
GND +24V
+24V Power Input

RELAY Dip Switch


OUTPUT
DB25LM
2
2NO01
COM1
+24V
3
3NO01
COM1
+24V

5
5NO01
COM1
+24V
0
0NO01
COM1
+24V

4
4NO01
COM1
+24V
1
1NO01
COM1
+24V
09
9NO
COM
+24V
08
8NO
COM
+24V

Connector

O08 O09 O10 O11 O12 O13 O14

Fig. 8-28 Contact Number Assignment for 16-channel Output Board with
CE Compliant Terminal

8.9.4 4-channel Relay Output Board with CE-compliant Terminal


(PC board number: H6A\PIOEXT\OUT_V1: AB154)

* Output signal specifications for 4-channel relay output board with CE


compliant terminal

Output voltage: 24V.


Output current: 100 mA.

O12, O13, O14, and O15 are dry contacts.


Max. current: 500 mA.

The typical contacts on the 4-channel output board with the CE


compliant terminal (output relay board) can withstand up to AC 24V
and 100 mA current. O12, O13, O14, and O15 are dry contacts.

8 - 25
Chapter VIII Wiring Diagram

* Output Signal Wiring Diagram (output from controller via 4-channel


output board with CE compliant terminal)

Controller Circuit Output Relay Board Machine +24V Power Supply


5V 24V
3.3K
Resistance R Diode

+24V
OUTPUT

24VGND
R

OUTPUT DB25LM Connector PS: +24V power should be provided externally.


PIN1-PIN16 is O-point.
PIN22-PIN23 is 24V.
PIN24-PIN25 is 24VGND.

Fig. 8-29 Output Signal Wiring Diagram (output from controller via
4-channel output board with CE compliant terminal)

8 - 26
Chapter VIII Wiring Diagram

* Wiring Diagram for 4-channel Output Board with CE Compliant


Terminal

+24V

NO15
NO14

+24V
+24V

+24V

+24V

COM1
GND

COM1
O08

H6A\PIOEXT\
5
4

OUT_V1
+24V Surge Absorber
O07
+24V +24V
O06 24V O15

+24V +24V
O05 O14
+24V +24V
O04 O13
+24V +24V
O03 O12
+24V +24V
O02 O11
+24V +24V
O01 O10
+24V +24V
NO13
NO12

+24V
+24V

+24V

+24V

COM1
COM1
GND

O00
3
2

O09

Fig. 8-30 Wiring for 4-channel Output Board with CE Compliant Terminal

8 - 27
Chapter VIII Wiring Diagram

* Contact Number Assignment for 4-channel Output Board with CE


Compliant Terminal

+24V O14 Dry Contact O15 Dry Contact


Power Input 1 Output Terminal Output Terminal

OUT_V1 S/N:AB154
+24V

COM15
COM14

NO15
NO14

+24V
+24V

+24V

+24V
GND

H6A\PIOEXT\
O08 Surge Absorber
+24V
LED Indicator
O07
OUTPUT
+24V +24V DB25LM
Connector
O06 O15

+24V +24V

O05 O14

+24V +24V

O04 O13

+24V +24V

O03 O12

+24V +24V

O02 O11

+24V +24V

O01 O10
COM13
COM12

NO13
NO12

+24V
+24V

+24V

+24V
GND

+24V +24V

O00 O09

+24V O12 Dry Contact O13 Dry Contact


Power Input 2 Output Terminal Output Terminal

Fig. 8-31 Contact Number Assignment for 4-channel Output Board with
CE Compliant Terminal

8 - 28
Chapter VIII Wiring Diagram

* Notes for 4-channel Output Board with CE Compliant Terminal

1. The 24V voltage contacts should be connected to +24V power input 1 or


+24V power input 2. When using 24V voltage for input, the +24V
output voltage will appear on each set of the output terminals marked
with ☉+24V.

2. The output signals are standard NPN +24V


+24V
type. Do not connect +24V power Oxx Power
input to the output pins because of the
voltage on these pins.

3. For output devices, conduction +24


between the ☉ Oxx point and 24V +24V

GND is performed when the output Oxx


24VGND
pin ☉+24V connected the power O
point is ON.

4. There are 4 special type dry contacts,


including O12 ~ O15, on the output NO13 O13 ON Conduction
board. For these 4 contacts, COM13 O13 OFF Not Conduction

conduction is performed between ☉ +24V ------ 24V Voltage Output

N013 and ☉COM13, not 24VGND.


Therefore, utilize this output terminal
if the output device uses another
signal type (not +24V signals). Note
that only dry contacts are available
when developing I/O signal
definitions.

8 - 29
Chapter VIII Wiring Diagram

8.10.Emergency Stop Circuit

When the CNC controller is energized, it takes 100 ms for its electrical
components to become stabilized. Never turn on the servo motor during
this unstable 100ms interval.

Fig. 8-24 shows the emergency stop circuit. The figure shows that the
controller will switch to the Emergency Stop mode, and that the Servo-on
switch will be turned on when the limit switch is attained or the E-Stop key
is pressed. For safety reasons, the E-stop key, limit switch, and E-Stop
Relay must be connected in series, and the Servo-Release Button and limit
switch (OT or Overtravel) must be connected in parallel. The
normal-closed type E-Stop and OT switch should be used.
(E-Stop)
+24VGND Emergency Stop
Limit Switch Button
INPUT Contact

Servo Release

Servo Driver
Spark Killer
Servo-On
Signal Output
In PLC
24V
External Relay A

Spark Killer Spark Killer


Output
In PLC
24V 24V
SERVO ON Relay C External Relay B

Fig. 8-32 Emergency Stop Circuit


Note:
1. Relay A and B comprise the power-on protection circuit, and are
used to prevent damage to the mechanical structure when power on
failure occurs under full output.
2. Relay C is a SERVO ON RELAY.

8 - 30
Chapter VIII Wiring Diagram

3. Relay A and B are outputs of the two PLCs (OUTPUT).


4. Relay C is generally a multi-contact relay. Each driver requires an
independent contact and a parallel connection, because multiple
drivers are not allowed since some drivers cannot be connected in
parallel for use.
5. The PLC scheme for SERVO ON is illustrated in Fig. 8-26.
Incorrect Wiring:

Servo Driver
Servo-On
Signal

Servo
Start
Command Servo Driver
24V Servo-On
RELAY C Signal

Correct Wiring:

Servo Driver
Servo-On
Signal

Servo Start Command

24V
Servo Driver
Servo-On
Signal

RELAY C
Fig. 8-25 Correct and Incorrect Driver Wiring for Relay C

TMR T 000
50
A 0127
msec #30 O 0000

O 0000

Fig. 8-33 PLC Scheme for SERVO ON

8 - 31
Chapter VIII Wiring Diagram

8 - 32
Chapter IX PC RS232C Connection

9 PC RS232C Connection
9.1 ZNDC Operation Instructions via PC

Procedures:

1. Press the Reset key on the HUST H8-M Series controller.

Fig. 9-1

2. Run ZDNC.exe, as shown in the following figure.

9-1
HUST H8-M Operator’s Manual

3. [DSR] and [CTS] at the top right will be highlighted if the connection
is normal after entering ZNDC. If they are not highlighted, which
means there is no connection, open [Config] to check the connection
settings. Follow the following procedures:
(1). Enable [Config] hidden options in pointer [DSR]. Right-
click to switch between [EnAble_ConfigSetUp] and
[DisAble_ConfigSetUp].

(2). Press [Option] to show the settings page.

9-2
Chapter IX PC RS232C Connection

(3). Set the following parameters: ComPort, BaudRate, ParityBit,


DataBit, StopBit => their defaults are Com1, 38400, Even,
7DataBits, 2StopBits respectively.
(4). It is recommended to select RTS/CTS for HandShak in
accordance with the Hust_Cnc specifications.
(5). For backward compatibility, select the default, 9015, for the
protocol whenever possible. Do not select other settings
unless linking with an earlier model is required.
(6). To be compatible with various PLCs with different
specifications, ResetCnc can be set to send the ResetCnc
command automatically, or it can be sent manually by the
operator when configuring the send/receive function.
(7). After checking, right-click [EnAble_ConfigSetUp] in
pointer [DSR] to show the Parameter Setting page.
(8). When setup of [UpdateDCB] is completed, remember to
press [Store Parameters]. If not, the previous settings (factory
settings) will still be in effect.
(9). Press DisConnect to change settings. After doing so, press
Connect.
4. As shown in the following figure, select Jobfile vs DncExec in TX.
Then, press OpenFile on the right to select the path of the desired
part program. After confirmation, press the SendOut key to have the
PC send the part program and have the controller execute the part
program and receive data.

9-3
HUST H8-M Operator’s Manual

9.2 HCON.EXE Operation


Run Start screen:

CommPort DataBits
Com1 Com2 Com3 Com4 Com5 7Bits 8Bits

BaudRate StopBits
9600 19200 38400 57600 115200 1Bits 2Bits

Parity Check Manual

None Odd Even Mark Space Default Modify

Select Cnc (Path)


D:\HCON\H03X

Link to Cnc

Fig. 9-4
Note: CommPort is a Rs232 communication port.
BaudRate should be identical to the setting of parameter #168 of
the controller.
ParityCheck For compatibility with the H8 Series, it is fixed to
☉Even.
DataBit For compatibility with the H8 Series, it is fixed to
☉7 Bits.
StopBit For compatibility with the H8 Series, it is fixed to
☉2 Bits.

9-4
Chapter IX PC RS232C Connection

X:xxxx,xxx A:xxxx,xxx Hcode#0:xxxx-xxxx


Y:xxxx,xxx B:xxxx,xxx RxD_Rate Cps=0570
Z:xxxx,xxx C:xxxx,xxx yyyy-mmdd 09:49:37
Monitor
I000 000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 ColorOn Cordinate
I016 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 PsCounter
I032 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 ColorOff FollowErr
I048 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063
PlcRit
I064 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 I-Bit
I080 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 PlcRct
I096 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 O-Bit VarUser
I112 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 C-Bit VarSys
I128 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
I144 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 S-Bit CncInfo
I160 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 A-Bit McmData
I176 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 A+256 Motion
I192 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
I208 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 A+512 FileSvc
I224 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 A+768 Remote
I240 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
Close
KeyIn MDIgo ReSet DSR CTS

When the connection between the PC and the


controller is normal, DSR and CTS are highlighted.
Fig. 9-5

Key Description:
PlcBit : Display the I / O / C / S / A signal status.
VarUser : Display variable 0 ~ 9999.
VarSys : Display variable 10000 ~ 13999.
CncInfo : Display system special variable 10900 ~ 10999.
McmData : Display the MCM parameters.
Motion : Reserved.
FileSvc : Data transmission (*Note 1).
MDIgo : Press this key to execute a block command after it is entered in
the message field.
ReSeT : Reset the controller.

* Note 1: The FileSvc function is described as follows:


◎ Send File to CNC : PC sends data to the controller
◎ Recv File fm CNC : PC reads data from the
controller
Recv File fm CNC:TYPE >> 0: CNC PC reads the main program.
1: CNC_ALL PC reads all programs.
2: MCM PC reads parameters.
9: Var–0099 PC reads variable 0 ~ 99.
A: Var–0199 PC reads variable 0 ~
199.

9-5
HUST H8-M Operator’s Manual

Select the controller data to be read on the PC and press the RecvIn key.
The PC starts to read data and stores it memory temporarily. Press the
SaveFile key and type a filename.

Send File to CNC:TYPE >> 0: CNC PC transmits the part program to


the controller
1: CNC PC transmits the part program to
the controller
2: MCM PC transmits parameters to the
controller
3: PLC PC transmits PLC to the
controller
4: CRT PC transmits your customized
screen to the controller
5: SYS PC transmits the main system to
the controller
6: KEY PC transmits your customized
keys to the controller
7: MOT (only for HUST-H6)

After selecting the desired item, press the OpenFile key and enter the
filename to be sent. Press the SendOut key after the PC reads the file and
stores it in memory. ˇ W2Flash represents data that is automatically
burned to Flash-Rom after being sent.

9-6
Chapter IX PC RS232C Connection

9.3 USB Description


H8CMUSB operating steps:
1. Turn the knob to Transmission Mode (as shown below).

2. Power is supplied via USB and wait for the connection between the
controller and USB device (yellow light appears).

3. After connection, press and hold the D2 key for 3 seconds to enter the
operating screen (as shown below).

※ Make sure the function keys are used to go to or out of folders.


※ Upload: CNC → USB
※ Download: USB → CNC
Example: Downloading steps of one plc file.
1. Enter the operating screen.
2. Move the cursor to the plc file.
3. Switch to the download screen for the plc file.

9-7
HUST H8-M Operator’s Manual

4. Press the corresponding function key.


5. Check if the transmission icon is displayed on the top right
corner of the screen.
6. Check if burning is performed after transmission.

Note: ※To download data, move the cursor to the file to be downloaded
and press the required function key.
※ To upload data, enter a filename and press the required function key.
※ Press the Main Screen, Reset, or D2 key to quit the operating
interface.
※ Reset the system after ZNDC operation.

Transmission Formats are shown as below:

Data Content Extension Format


Program *.CNC
MCM Parameter *.MCM
User Variable *.VAR
System *.SYS
PLC *.PLC
LCD *.TBL
F-KEY *.FSK
TABLE *.KFN

9-8
Chapter IX PC RS232C Connection

9.4 RS232C Connection

The following figure shows how to connect the HUST H8 CNC controller
to a PC. Attention should be paid to the following during connection:

1. The cable between the RS232 port and PC should not be more than 15
meters.

2. If the connection is established in an environment where there is a


source of noise, such as an electrical discharge machine or welding
machine, establish the connection with shielded twisted-pair cables, or
avoid installing in such an environment. The control unit and PC
should not share the same power outlet with an electrical discharge
machine or welding machine.

3. The interface voltage of the PC should range from 10 to 15V.

OOOOOO
I 傳 手 編自
6 6 6 6 6 7 6
X3Y3Z1A778899
3
U3V3W
3 1G44 55 66 DCE DCE
I2J2K1F1122 33
2
R3S3T2M
3 1 10 1#
F F F F F
5 5 5 5 5
4
4
N
4 2 4 4
4 4 5 4 輸
4

HUST Controller P7 PC COM2

2 3
TXD 3 2 RXD
RXD TXD
DB9LM DSR
4 20
DTR
DB25LF
5 7
CONNECTO SG 6 6 SG CONNECTO
R DTR 7 4 DSR R
CTS 8 5 RTS
RTS CTS

HUST Controller P7 PC COM1

2 2
TXD 3 3 RXD
RXD TXD
DB9LM DSR
4 4
DTR
DB9LF
5 5
CONNECTO SG 6 6 SG CONNECTO
R DTR 7 7 DSR R
CTS 8 8 RTS
RTS CTS

Fig. 9-6 RS232 Connection

9-9
HUST H8-M Operator’s Manual

9 - 10
Chapter X Error Message Explanations

10 Error Message Explanations

When an error occurs during the execution of a program, an error message


is displayed on the LCD of the HUST H8-M Series controller. (Fig 10-
1).Possible error messages of the HUST H8-M Series controller and their
solutions are described in the following:

ERROR 22 Fig. 10-1

Error Message

ERROR-01 MCM DATA ERROR OR BATTERY FAILURE

Message:
MCM parameter settings are incorrect or the memory battery has low
power.

Recommended Remedy:
1. Check that the MCM parameters are correct, or enter “MDI” mode.
Execute command “G10 P1000” to clear the incorrect parameters and
reset the program.
2. If the controller has not been switched on for more than one year, the
data in the memory will be lost. If the controller generates a (BT1) low
power message, contact the dealer.

ERROR-02 SERVO ALARM, PLEASE HOME AGAIN

Message:
An error occured in the servo loop system. The possible error conditions
include:

10 - 1
HUST H8-M Operator’s Manual

1. The control unit is sending commands too quickly, and the servomotor
cannot respond in time.
2. The control unit is not receiving feedback.

Recommended Remedy:
1. Verify that the F value is set appropriately.
2. Verify that the resolution is correct.
3. Make sure that the machine and motor are functioning appropriately
and the wiring is correct.

ERROR-03 COUNTER LIMIT

Message:
One of the M02, M30 and M99 counters exceeds the settings of MCM
#13266.

Recommended Remedy:
1. Clear the MCM #13265 counter value to 0 and press the Reset key to
remove the error.

ERROR-04 G70 G71 G72 G73 DATA ERROR


'U' G70 G71 G72 G73 'U' DATA ERROR
'W' G70 G71 G72 G73 'W' DATA ERROR
'R' G70 G71 G72 G73 'R' DATA ERROR
'P' G70 G71 G72 G73 'P' DATA ERROR
'Q' G70 G71 G72 G73 'Q' DATA ERROR
'N' G70 G71 G72 G73 'N' SEQUENCE ERROR

Verify that the G70, G71, G72, and G73 formats are correct.

ERROR-05 INSTRUCTION ERROR, SYSTEM ERROR

A system error has occurred, resulting from electrical noise or other


problems. An unexpected error has occurred.

ERROR-06 ZERO-DIVIDE ERROR, SYSTEM ERROR

The divisor or dividend is 0 when a division operation is performed.

Recommended Remedy:

10 - 2
Chapter X Error Message Explanations

Determine whether the variables in the program are 0 and correct them if
necessary.

ERROR-07 FLASH ROM WRITE FAILURE.

A error occurred when burning to FLASH ROM.Verify that the data to be


burned and the addresses are correct.

ERROR-08 OVER 64 CHARACTERS FOR ONE BLOCK

Message:
A block in the program contains more than 64 characters.

Recommended Remedy:
Check the program and make sure that no block contains more than 64
characters.

ERROR-09 PITCH DATA INPUT ERROR.

ANY POINT ERROR > 1000um THEN ERROR 09


Incorrect screw compensation.
When the compensation for any point is more than 1000um, ERROR
09 appears.

ERROR-10 RS232 ERROR

Message:
An error in the RS232C communication signal of the controller.

Recommended Remedy:
1. Check to make sure that the baud rate of the controller (i.e. MCM #168)
is the same as the baud rate of the computer or MMI.
2. Check the cable connection between the controller and the computer or
MMI.

ERROR-11 PROGRAM MEMORY ERROR

Message:
An error in program memory. The battery may have no power or the data
size may exceed the memory capacity.

Recommended Remedy:

10 - 3
HUST H8-M Operator’s Manual

Double-click AUTO to enter “MDI” mode and execute command “G10


P2001”. ClearMDIall program data and check the battery. If the controller
generates a (BT1) low power message, turn on the controller to recharge
the battery (if the controller has not been switched on for more than one
year, the data in the memory will be lost.)

ERROR-12 PROGRAM SIZE > FLASH ROM SPACE

ERROR-13 ERROR G CODE COMMAND

Message:
An incorrect G-code exists in the program data of the HUST H8-M Series
controller and cannot be accepted.

Recommended Remedy:
Check the program and make sure the G-code is correct.

ERROR-14 X/Y/Z AXIS OVER TRAVEL

Message:
The tool moves beyond the pre-set hardware over-travel limit.

Recommended Remedy:
Use the JOG (single step) function to return the axial movement from the
limit to within normal range.

ERROR-15 G73 REPEAT NO. >= #1000

ERROR-18 END OF FILE NOT FOUND

Message:
Program end error (M02, M30 missing).

Recommended Remedy:
Check the end of the program and add an M02 or M30 block.

ERROR-19

10 - 4
Chapter X Error Message Explanations

Message:
An error occurs during G8x drilling canned cycle.

Recommended Remedy:
Check if the current Z-axis coordinates are between the R and Z settings.

ERROR-20 SOFTWARE OVER-TRAVEL

Message:
The program runs beyond the software over-travel limit.

Recommended Remedy:
Check the program or reset the #9100~#9107 software over-travel limit (+)
and #9120~#9127 software over-travel limit (-).

ERROR-22 EM-STOP, HOME AGAIN

Message:
The controller is now in the emergency stop state.

Recommended Remedy:
After the cause of the emergency is removed, restore the emergency stop
button and press “reset”.

ERROR-23 BUFFER LENGTH ERROR (FOR INTERNAL USE)

ERROR-24 M98 EXCEEDS 8 LEVELS

Message:
Subprogram calls exceed 8 levels.
Recommended Remedy:
Modify the part program and make sure the subprogram calls do not exceed
8 levels.

ERROR-25 WRONG CIRCLE FORMAT OR DATA ERROR

Message:
The arc command or data format in the program is incorrect.

Recommended Remedy:

10 - 5
HUST H8-M Operator’s Manual

Check the part program and recalculate the intersection of the arc. Make
sure the coordinates of the intersection point are correct.

ERROR-26 HOME GRID ERROR

An error occurs during homing of the grid point.


The grid point was not found within the given distance.
#9240~#9427 is used to set the homing grid distance for each axis.

ERROR-27 ENCODER PHASE 'A' FBK. ERROR


An error has occurred with feedback signal A.

ERROR-28 ENCODER PHASE 'B' FBK. ERROR


An error has occurred with feedback signal B.

ERROR-29 ENCODER PHASE 'G' FBK. ERROR


An error has occurred with feedback signal G.

ERROR-30.1 BATT. LOW

Message:
The controller battery (BT1) has failed.

Recommended Remedy:
Replace the battery (BT1).

ERROR-31 NONE PLC

Message:
The PLC program does not exist.

Recommended Remedy:
Check that the PLC simulation program exists in the FLASH ROM and is
properly inserted (EVN, ODD location).

ERROR-32 NONE PROGRAM DATA AFTER CYCST

ERROR-36 EXECUTION MODE ERROR

Message:

10 - 6
Chapter X Error Message Explanations

An error occurred in the selection of execution modes.

Recommended Remedy:
Check the selected execution mode for correctness.

ERROR-37 NC ALARM

Message:
An error occured in the external control device.

Recommended Remedy:
Check the external control device. Fix the error and RESET the function.

ERROR-38 BACK GROUND EXEC. BLOCK NO. > 320


The number of lines that are running in the backgroung is more than 320.

ERROR-39 1ST & 2ND FBK. ERROR.

The 1st and 2nd feedback signals are abnormal.

ERROR-50~99

Message:
The user defined G65 error signal is incorrectly set.

Recommended Remedy:
Verify that the user defined G65 error signal is correctly set.

MESSAGE 01 Feed rate = 0


MESSAGE 02 G00 MFO=0
MESSAGE 03 G01 G02 G03 MFO=0
MESSAGE 05 EXCEED COUNTER LIMIT MESSAGE.
MESSAGE 06 Spindle off~
MESSAGE 10 THREAD CUT RETURN NOT ENOUGH FOR
CHAMFER
AUTO SHRINK CHAMFER LENGTH
MESSAGE 11 G76 THREAD CUT DEPTH < RELIEF DISTANCE.
MESSAGE 12 TIME OUT. FOR USER TIMER LIMIT OPERATION
MESSAGE 18 Program is blank or ends without a end symbol
(M02、M30、M99).

10 - 7
HUST H8-M Operator’s Manual

MESSAGE 20 R point is not suitable for drilling canned cycle. R may


be more than Z.
MESSAGE 24 G02 G03 'R' WITHOUT 'X' 'Y' COMMAND
MESSAGE 25 Incorrect G02 and G03 formats.

10 - 8
Chapter XI Attachment A

11 Attachment A
11.1 How to Chose a Servo Motor with Appropriate Inertia
Choosing a servo motor with appropriate inertia.
As shown in servo motor catalogues, the maximum JM setting can be 10
times greater than JL
According to an experienced rule of thumb, the JM setting is 5 times greater
than JL
JM = Motor inertia (refer to servo motor catalogues)
JL = Load inertia (refer to the formula described in the next section)
ÖActually, the motor will operate slowly when JM is 10 times greater than
JL; hence it is set to a value that is 5 times less.

11.1.1 Load Inertia Calculation


1) Roller Inertia

(a) Gear
Servo Motor
(c) Roller

(b) Gear R

Fig. 11-1

JL Formula:
(b) Gear Inertia  (c) Roller Inertia
Load Inertia J L  (a) Gear Inertia
(Grar Ratio)2
Unit: kg.cm2, kg.m2×10-4

Description:
1
1. (a) Gear, (b) Gear, (c) Roller with rotary inertia : MR 2
2
2. M Mass , R Radius
(b) Number of Teeth
3. Gear Ratio
(a ) Number of Teeth

11 - 1
HUST H4 Controller

2) Table Inertia

(a) Gear
Servo Motor

R
(b) Gear
(d) Table
(c) Ball
Fig. 11-2
Screw

JL Formula:
(b) Gear Inertia  (c) Ball Screw Inertia  (d ) Table Inertia
Load Inertia J L  (a) Gear Inertia
(Gear Ratio) 2
Unit: kg.cm2, kg.m2×10-4

Description:
1
1. (a) Gear, (b) Gear, (c) Ball Screw with rotary inertia : MR 2
2
2. M Mass , R Radius
P 2
3. (d )Table Inertia )M(
2S
4. M Mass , P Pitch , S 3.1416
(b) Number of Teeth
5. Gear Ratio
( a ) Number of Teeth

Table Inertia:

Note: Check Table 11-1 for table inertia if M and P are given.

Ball Screw Inertia:

Note: Check Table 11-2 for the ball screw inertia if the screw diameter
and weight are given.
Note: Check Table 11-3 for the ball screw inertia if the screw diameter
and length are given.

Example:
Assume 1. Gear a: 100g, ‡40mm
2. Gear b: 300g, ‡120mm
3. Ball screw: 6kg, ‡20mm with a pitch 5

11 - 2
Chapter XI Attachment A

4. Table: 60kg
5. Gear ratio = 5 : 1

Calculation Gear a inertia: 1/2MR2 = 1/2×0.1×(2)2=0.2 kg.cm2


Gear b inertia: 1/2MR2 = 1/2×0.3×(6)2=5.4 kg.cm2

P 2
Table Inertia: M( ) *P: unit - cm

2
: 60×(0.5cm÷6.2832)
: 0.380
Ball Screw Inertia: We can determine that it is 3 by checking
Table 11-2.

Servo Motor Inertia:

5.4  3  0.380
2
) + 0.2 = 0.351 + 0.2 = 0.551 kg.cm2
(5)

11 - 3
HUST H4 Controller

11.2 How to Choose the Appropriate Motor For Your Needs


Conditions: Maximum load radius, minimum radius, load weight, and
speed (mm/min)

Ex.:
How to choose a winding machine; aluminum foil is used for the
tension motor
Known conditions:
Outer diameter of aluminum foil: 240mm
Inner circle diameter: 40mm 40 mm 240 mm
Weight: 15kg
Maximum winding speed: 20m/min

Calculation:
Rotary inertia during loading Formula: 1/2 MR2 M (mass) R(radius)
Result: 1/2 ×15 × (12)2=1080 Kg.cm2
(Rotor inertia)
[Inertia can be reduced by utilizing the gear ratio, as the rotary inertia (rotor
inertia) is too high.]
Minimum Circumference x Rotational Speed (rpm) = Distance
Minimum Radius =40 mm ÷2=20 mm
Minimum Circumference 2 ×3.1416 ×20=125.66 mm
125.66 mm ×rpm=20000 mm rpm=159.159
[It is assumed that the gear ratio is 6 : 1 (the motor rotates 6 turns while
the aluminum foil rotates 1 turn)]
1080 Kg.cm2 ÷62 (Gear Ratio)2=30 Kg.cm2 (Rotor Inertia)

Take the YE LI motor as an example (refer to the YE LI motor standard


specifications for information about rotor inertia)
Note: The rotor inertia that the YE LI and MITSUBISHI brands can
withstand is up to 5 times greater than the original inertia.

Since it is not suitable for a low-inertia motor to work with inertia that is 5
times greater than the original inertia, we choose a medium-inertia motor.
A medium-inertia 1 KW motor, which rotates at 2000 rpm, has a rotor
inertia of 7.82 Kg.cm2.
7.82 Kg.cm2 ×5=39.1 Kg.cm2. 39.1 Kg.cm2>30 Kg.cm2
159.159 (rpm) ×6 (gear ratio) = 955 rpm 2000 rpm>955 rpm ×2
[The maximum rotational speed (rpm) of the tension motor (approximately

11 - 4
Chapter XI Attachment A

twice its normal speed) can be used as the following speed, as the
following feed of the motor should be taken into account.]

Therefore, we choose a medium-inertia 1 KW motor

11 - 5
HUST H4 Controller

Table 11-1 Table Inertia (kg.cm2, kg.m2 ×10-4)


Table Weight (kg)
Pitch
50 100 150 200 250 300 350 400 450 500
(mm)
3 0.114 0.228 0.342 0.456 0.570 0.684 0.798 0.912 1.026 1.140
4 0.203 0.405 0.608 0.811 1.013 1.216 1.418 1.621 1.824 2.026
5 0.317 0.633 0.950 1.267 1.583 1.900 2.216 2.533 2.850 3.166
6 0.456 0.912 1.368 1.824 2.280 2.736 3.192 3.648 4.104 4.559
7 0.621 1.241 1.862 2.482 3.103 3.724 4.344 4.965 5.585 6.206
8 0.811 1.621 2.432 3.242 4.053 4.863 5.674 6.485 7.295 8.106
9 1.026 2.052 3.078 4.104 5.129 6.155 7.181 8.207 9.233 10.259
10 1.267 2.533 3.800 5.066 6.333 7.599 8.866 10.132 11.399 12.665
11 1.532 3.065 4.597 6.130 7.662 9.195 10.727 12.260 13.792 15.325
12 1.824 3.648 5.471 7.295 9.119 10.943 12.766 14.590 16.414 18.238
13 2.140 4.281 6.421 8.562 10.702 12.842 14.983 17.123 19.264 21.404
14 2.482 4.965 7.447 9.929 12.412 14.894 17.377 19.859 22.341 24.824
15 2.850 5.699 8.549 11.399 14.248 17.098 19.948 22.797 25.647 28.497
16 3.242 6.485 9.727 12.969 16.211 19.454 22.696 25.938 29.181 32.423
17 3.660 7.320 10.981 14.641 18.301 21.961 25.622 29.282 32.942 36.602
18 4.104 8.207 12.311 16.414 20.518 24.621 28.725 32.828 36.932 41.035
19 4.572 9.144 13.716 18.288 22.861 27.433 32.005 36.577 41.149 45.721
20 5.066 10.132 15.198 20.264 25.330 30.396 35.462 40.528 45.595 50.661
21 5.585 11.171 16.756 22.341 27.927 33.512 39.097 44.683 50.268 55.853
22 6.130 12.260 18.390 24.520 30.650 36.780 42.910 49.039 55.169 61.299
23 6.700 13.400 20.100 26.799 33.499 40.199 46.899 53.599 60.299 66.999
24 7.295 14.590 21.885 29.181 36.476 43.771 51.066 58.361 65.656 72.951
25 7.916 15.831 23.747 31.663 39.579 47.494 55.410 63.326 71.241 79.157
26 8.562 17.123 25.685 34.247 42.808 51.370 59.931 68.493 77.055 85.616
27 9.233 18.466 27.699 36.932 46.164 55.397 64.630 73.863 83.096 92.329
28 9.929 19.859 29.788 39.718 49.647 59.577 69.506 79.436 89.365 99.295
29 10.651 21.303 31.954 42.606 53.257 63.908 74.560 85.211 95.863 106.51
30 11.399 22.797 34.196 45.595 56.993 68.392 79.790 91.189 102.59 113.99

11 - 6
Chapter XI Attachment A

Table 11-2 Ball Screw Inertia (kg.cm2, kg.m2 ×10-4)


Ball Screw Diameter (mm)
Ball Screw
20 25 30 35 40 45 50
Weight (Kg)
1 0.5 0.781 1.125 1.531 2 2.531 3.125
1.5 0.75 1.172 1.688 2.297 3 3.797 4.688
2 1 1.563 2.250 3.063 4 5.063 6.250
2.5 1.25 1.953 2.813 3.828 5 6.328 7.813
3 1.5 2.344 3.375 4.594 6 7.594 9.375
3.5 1.75 2.734 3.938 5.359 7 8.859 10.938
4 2 3.125 4.500 6.125 8 10.125 12.500
4.5 2.25 3.516 5.063 6.891 9 11.391 14.063
5 2.5 3.906 5.625 7.656 10 12.656 15.625
5.5 2.75 4.297 6.188 8.422 11 13.922 17.188
6 3 4.688 6.750 9.188 12 15.188 18.750
6.5 3.25 5.078 7.313 9.953 13 16.453 20.313
7 3.5 5.469 7.875 10.719 14 17.719 21.875
7.5 3.75 5.859 8.438 11.484 15 18.984 23.438
8 4 6.250 9.000 12.250 16 20.250 25.000
8.5 4.25 6.641 9.563 13.016 17 21.516 26.563
9 4.5 7.031 10.125 13.781 18 22.781 28.125
9.5 4.75 7.422 10.688 14.547 19 24.047 29.688
10 5 7.813 11.250 15.313 20 25.313 31.250
10.5 5.25 8.203 11.813 16.078 21 26.578 32.813
11 5.5 8.594 12.375 16.844 22 27.844 34.375
11.5 5.75 8.984 12.938 17.609 23 29.109 35.938
12 6 9.375 13.500 18.375 24 30.375 37.500
12.5 6.25 9.766 14.063 19.141 25 31.641 39.063
13 6.5 10.156 14.625 19.906 26 32.906 40.625
13.5 6.75 10.547 15.188 20.672 27 34.172 42.188
14 7 10.938 15.750 21.438 28 35.438 43.750
14.5 7.25 11.328 16.313 22.203 29 36.703 45.313
15 7.5 11.719 16.875 22.969 30 37.969 46.875
15.5 7.75 12.109 17.438 23.734 31 39.234 48.438
16 8 12.500 18.000 24.500 32 40.500 50.000
16.5 8.25 12.891 18.563 25.266 33 41.766 51.563
17 8.5 13.281 19.125 26.031 34 43.031 53.125
17.5 8.75 13.672 19.688 26.797 35 44.297 54.688
18 9 14.063 20.250 27.563 36 45.563 56.250
18.5 9.25 14.453 20.813 28.328 37 46.828 57.813
19 9.5 14.844 21.375 29.094 38 48.094 59.375
19.5 9.75 15.234 21.938 29.859 39 49.359 60.938
20 10 15.625 22.500 30.625 40 50.625 62.500

11 - 7
HUST H4 Controller

Table 11-3 Ball Screw Inertia (kg.cm2, kg.m2 ×10-4)


Ball Screw Diameter (mm)
Ball
Screw
10 15 20 25 30 35 40 45 50
Length
(mm)
200 0.0153 0.0775 0.2450 0.5983 1.241 2.298 3.921 6.280 9.572
400 0.0306 0.1551 0.4901 1.1965 2.481 4.596 7.841 12.560 19.144
600 0.0459 0.2326 0.7351 1.7948 3.722 6.895 11.762 18.841 28.716
800 0.0613 0.3101 0.9802 2.3930 4.962 9.193 15.683 25.121 38.288
1000 0.0766 0.3877 1.2252 2.9913 6.203 11.491 19.604 31.401 47.860
1200 0.0919 0.4652 1.4703 3.5895 7.443 13.789 23.524 37.681 57.432
1400 0.1072 0.5427 1.7153 4.1878 8.684 16.088 27.445 43.962 67.004
1600 0.1225 0.6203 1.9604 4.7860 9.924 18.386 31.366 50.242 76.576
1800 0.1378 0.6978 2.2054 5.3843 11.165 20.684 35.286 56.522 86.148
2000 0.1532 0.7753 2.4504 5.9825 12.405 22.982 39.207 62.802 95.720
2200 0.1685 0.8529 2.6955 6.5808 13.646 25.281 43.128 69.082 105.292
2400 0.1838 0.9304 2.9405 7.1790 14.886 27.579 47.048 75.363 114.864
2600 0.1991 1.0079 3.1856 7.7773 16.127 29.877 50.969 81.643 124.437
2800 0.2144 1.0855 3.4306 8.3755 17.368 32.175 54.890 87.923 134.009
3000 0.2297 1.1630 3.6757 8.9738 18.608 34.474 58.811 94.203 143.581
3200 0.2450 1.2405 3.9207 9.5720 19.849 36.772 62.731 100.483 153.153
3400 0.2604 1.3181 4.1658 10.1703 21.089 39.070 66.652 106.764 162.725
3600 0.2757 1.3956 4.4108 10.7685 22.330 41.368 70.573 113.044 172.297
3800 0.2910 1.4731 4.6558 11.3668 23.570 43.667 74.493 119.324 181.869
4000 0.3063 1.5507 4.9009 11.9650 24.811 45.965 78.414 125.604 191.441
4200 0.3216 1.6282 5.1459 12.5633 26.051 48.263 82.335 131.885 201.013
4400 0.3369 1.7057 5.3910 13.1616 27.292 50.561 86.256 138.165 210.585
4600 0.3523 1.7833 5.6360 13.7598 28.532 52.860 90.176 144.445 220.157
4800 0.3676 1.8608 5.8811 14.3581 29.773 55.158 94.097 150.725 229.729
5000 0.3829 1.9383 6.1261 14.9563 31.013 57.456 98.018 157.005 239.301

11 - 8
Chapter XI Attachment A

11.3 How to Calculate the Amperage of a Transformer


A 400W motor.
If the actual efficiency is 100%, the motor has 400VA (volt-ampere): 400 ÷
1 = 400VA.
If the actual efficiency is 90%, the motor has 444VA (volt-ampere): 400 ÷
1 = 444VA.
Power formula: P = V (voltage) x I (current)
Amperage Calculation

Wattage (W) Voltage (220) Calculation Amperage


300VA 1-phase 3000VA÷220V 13.63
300VA 3-phase 3000VA÷[ 3 ×220] 7.87

Example:

Power required by a winding machine


1. 400W Motor x 9 = 3600w
2. 750W Motor x 2 = 1500w
3. One spot welding machine 4A [24V×4A = 96W]
4. Born off .3A .35V[35V×3A = 105W]
5. Two controllers [5V×3A×2 = 30W]
6. One 24V power [24V×8A = 192W]
One 5V±12 power [5V×3 = 15W]

[3600W+1500W+96W+105W+30W+192W+15W]× 1.5 =8307VA


8307 = 1.732 (3-phase voltage) VI
= 8307 ÷[1.732 × 415 (according to your local voltage) ]≒ 11.55A

Note: 1mm2 electric wire can withstand currents of 8A.

11 - 9
HUST H4 Controller

11 - 10
12 Attachment B

12.1 NPN-RELAY

For External 24V Power Supply

ON DIP ON DIP

O9
GND
24V 1 2 3 4 5 6 7 8 SW3 1 2 3 4 5 6 7 8 SW1
SW4

24V
DIP

1 2 3 4 5 6 7 8

O8
24V
ON

O7
DIP

1 2 3 4 5 6 7 8

24V

O6
ON

24V
SW2

24V

O5
O10

24V
155 24V
O4
O11

24V
24V
O3
O12

24V
24V
O2
O13

24V
24V
O1
O14

24V
24V
O0
O15

24V

107

Instructions for Dry Contact Mode:

1. Turn the DIP Switches (SW1 ~ SW4) to OFF when the output board
is switched to “Dry Contact Mode”.
ON DIP ON DIP ON DIP ON DIP

1 2 3 4 5 6 7 8 SW1 1 2 3 4 5 6 7 8 SW2 1 2 3 4 5 6 7 8 SW3 1 2 3 4 5 6 7 8 SW4

SW1 (O0~O7) SW2 (O8~O15) 12-1 SW3 (O0~O7) SW4 (O8~O15)


2. When Output 0 is configured as dry contact output and the rest as
voltage output, connect Output 0 to the NO/COM terminal, and the
rest to the NO/24V terminal.

Make sure the DIP Switches 1 of SW1 and SW3 are turned to “OFF”.

ON DIP ON DIP
24V O0
1 2 3 4 5 6 7 8 SW1 1 2 3 4 5 6 7 8 SW3

SW1 (O0~O7) SW3 (O0~O7)


ON DIP ON DIP
NO COM
1 2 3 4 5 6 7 8 SW2 1 2 3 4 5 6 7 8 SW4

SW2 (O8~O15) SW4 (O8~O15)

Instructions for Voltage Output Mode:

1. Turn the DIP Switches (SW1 ~ SW4) to ON when the output board is
switched to “Voltage Output Mode”.
ON DIP ON DIP ON DIP ON DIP

1 2 3 4 5 6 7 8 SW1 1 2 3 4 5 6 7 8 SW2 1 2 3 4 5 6 7 8 SW3 1 2 3 4 5 6 7 8 SW4

SW1 (O0~O7) SW2 (O8~O15) SW3 (O0~O7) SW4 (O8~O15)

2. When the Output 7 is configured as voltage output and the rest as dry
contact output, connect Output 7 to the NO/24V terminal, and the rest
to the NO/COM terminal.
(1) When the DIP Switch 8 is turned to ON with Output 7 configured
as output, the voltage measured at the NO terminal and O7 will be
0V and 24V respectively.
(2) This output board is NPN-TYPE.

Make sure the DIP Switches 8 of SW1 and SW3 are turned to “ON”.

ON DIP ON DIP
24V O7
1 2 3 4 5 6 7 8 SW1 1 2 3 4 5 6 7 8 SW3

SW1 (O0~O7) SW3 (O0~O7)


ON DIP ON DIP
Output NO
1 2 3 4 5 6 7 8 SW2 1 2 3 4 5 6 7 8 SW4

SW2 (O8~O15) SW4 (O8~O15)

12-2
Supplement Voltage Output Mode:

1. SW1 ~ SW2(O0∼O15):
(1) Catch Diode.
(2) Prolong the life of a relay.
24V NO COM
2. SW3 ~ SW4(O0∼O15):
(1) When a DIP Switch is turned to ON, COM = 24V GND.
(2) During output, NO and COM = 24V GND.

12-3
12.2 I/O Connection
I-point Table

I00 G31 USE I24 MPG X


I01 X HOME LIMIT (*) I25 MPG Y
I02 Y HOME LIMIT (*) I26 MPG Z
I03 Z HOME LIMIT (*) I27 MPG A
I04 A HOME LIMIT (*) I28 MPG B
I05 B HOME LIMIT (*) I29 MPG C
I06 C HOME LIMIT (*) I30 MPG U
I07 U HOME LIMIT (*) I31 MPG *1
I08 I32 MPG *10
I09 U OT- I33 MPG *100
I10 U OT+ I34
I11 C OT- I35
I12 C OT+ I36
I13 B OT- I37
I14 B OT+ I38
I15 A OT- I39
I16 A OT+ I40
I17 Z OT- I41
I18 Z OT+ I42
I19 Y OT- I43
I20 Y OT+ I44
I21 X OT- I45
I22 X OT+ I46
I23 EM-STOP I47

12-4
O-point Table

O00 Spindle rotation CW O16


O01 Spindle rotation CCW O17
O02 Coolant O18
O03 O19
O04 O20
O05 Lubricant O21
O06 O22
O07 O23
O08 O24
O09 U SERVO ON O25
O10 C SERVO ON O26
O11 B SERVO ON O27
O12 A SERVO ON O28
O13 Z SERVO ON O29
O14 Y SERVO ON O30
O15 X SERVO ON O31

Note: If not all 7 axes are used, please create a short circuit for the
I-point limit signal corresponding to the axes that are not used.
Example: If only 5 axes (XYZAB) are used, please create a short
circuit for the limit signal I09-I12 for the C- and U-axis.

12-5
M CODE
M03 ÍSpindle rotation CW M10 ÍLubricant on (O5 ON)
M04 ÍSpindle rotation CCW M11 ÍLubricant off (O5 OFF)
M05 ÍSpindle stop
M8 ÍCoolant on (O2 ON) M9998 ÍUnlock the MCM
Password
M9 ÍCoolant off (O2 OFF)
M202 ÍBlock display (ON) M201 ÍBlock display (OFF)

T CODE
T7 ÍO10 ON, O11 OFF
T8 ÍO11 ON, O10 OFF
T9 ÍO10 OFF, O11 OFF

12-6
12.3 Servo spindle applicaion

Setting: 1.Enter the parameter page 2 and set “Spindle Type” to 1 (Servo).
(For details, refer to chapter VII)
2. The “Spindle Direction” option can be used to change the
spindle direction when the direction is wrong.
3. For H8CM, if the servo is used as spindle, the actual position of
the spindle will be used as the zero point during each startup.
When the spindle is receiving a stop command, it will stop at
this point. Therefore, this point can be set in “In-position angle
at the stop of the spindle” or execute G15 Rxx in MDI mode to
define the spindle position.

Ex.: If G15 R90 is typed, the in-position angle will be 90


degrees.

12-7
Description setting of H8 servo main shaft original point:
Setting procedure:
1. Enter parameter table and set related parameter setting of V axis. (Enter
parameter table, please see description on Page 7-1 of the manual.)
Parameters that must be included in the setting:
MCM#9014 V axis resolution denominator
MCM#9015 V axis resolution numerator
Find GRID point distance on MCM#9247 V axis. (If it could not be found in
setting value, DRID will show ERR26 mesasge.)
MCM#9267 V HOME LIMIT IPPUT NO (preset at 8) .
MCM#9287 V axis original point is deviated. Setting is required only when
deviation of original point is used for positioning of main axis.
Other V-axis related setting shall be revised and programmed depending on
requirements.
2. Main axis setting closed circuit control (MCM#8353=1).
3. Turn knob to original point mode.
4. F3 will show optional functions of main axis original point as shown below.
(Main axis will appear only in closed circuit.)

5. Press F3 to execute main axis original point action.


6. When the screen shows MESSAGE 6 and ROM READ WRITE END, it
indicates completion of action.

12-8
Description of main axis positioning method:
After main axis has completed returning to original point action, and the command to
stop M05 main axis is given, it will set the position according to the positioning angle
setting of main axis.
How to revise setting value:
1. Before main axis original point is completed, enter Page 2 of MCM parameter
setting, to revise setting of main axis positioning angle.
2. After completion of main axis original point action, use G15RXX to set
positioning angle of main axis.
Ex. In MDI mode, input G15R90 to set the positioning angle at 90 degree
position
* When methods 1 and 2 are used to set the position of main axis, the deviation
value of V-axis original point in the parameters should be zero
(MCM#9287=0).
3. In setting V-axis original point deviation, before main axis original point action,
first set the deviation value of original point on V axis, when original point on
main axis is set, the position of V-axis original point deviation is the position to
stop when main axis give M05 command, when position is made for original
point deviation, the aforementioned methods 1 and 2 are not necessary.
Ex: #91014=10000 #9015=36000 #9287=9000 (this setting represents one
circle=36mm each mm=10 degrees)
V axis returns to original point with deviation of 9mm=90 degree position,
when switch back to main axis, main axis will set the 90 degree position
and the stop position for M05 command.
* When original point deviation is used for positioning, parameter positioning
angle setting should be zero. (MCM#9299=R191=0)
※ MESSAGE 6 [main axis close message], because when main axis original point is
acting, PLC will switch between main axis and axial shaft, resulting in temporary
switching off of main axis operation, so it is a normal message, until after main
axis original point operation is completed, switch the image or use replacement to
erase it.
※ Main axis original point operation, after each switching on and completion of
transmission, it is necessary to renew operation once, so positioning point will not
be displaced, after completion of the operation, no operation is necessary.
Execution is needed again after re-starting re-transmission.

12-9
12.4 In-position application

Setting:
Master/Slave Mode: Set 265 for non-stop mode (MCM8336)
IN POSITION: unit pulses (MCM8340)
Description:
1. When machining is performed at a short section and a value is set
in IN POSITION, its speed should be set in accordance with the
line section distance between blocks. An unreasonable speed value
will result in a calculation error due to a faster speed value.
Reasonable speed equation:
F=Number of blocks processed by controller per second * Line
section distance between blocks * 60
For H8CM, when three axes operate simultaneously, 200 blocks
can be processed in one second.
Assuming that the average distance between blocks is
approximately 0.01 mm.
Place these values in the above equation: F=200*0.01*60=120 ㎜
/min

2. As shown in the following path and oscillograms, when the


Master/Slave Mode (MCM8336) is set to
256 and IN POSITION (MCM8340) is set to 0 (Fig. 1), X-axis

12-10
operates smoothly.
When the Master/Slave Mode (MCM8336) is set to 256,and IN
POSITION (MCM8340) is set to 100 (Fig. 2), the next block will
not be performed until the given setting value is reached. At this
time, speed adjustment will be performed and the operation will be
slightly affected with better precision.

Ex.:
G00 X0. Y0.
8336=0 Y
G01 X10.Y10.F200.
8340=0
X20.Y0.
X30.Y10. 8336=265
X40.Y0. 8340=0
X50.Y10. 8336=265
X60.Y0. X
8340=100
M30
X-Y Path
F

Y
S

8336=0
8340=0
Oscillogram 1

F F

IN POSITION

X X
S
Y Y S

8336=256 8336=256
8340=0 8340=100
Oscillogram 2 Oscillogram 3

12-11
12-12

You might also like