You are on page 1of 150

HUST H9C CNC

CONNECTING MANUAL
(Suitable for the controller: H6CH6CLH9CH9CL)

Feb , 2011

HUST Automation Inc.


No. 80 Industry Rd., Toufen, Miaoli, Taiwan, R.O.C.
Tel: 886 37 623242
Fax: 886 37 623241

Contents

TABLE OF CONTENTS
1

INTRODUCTION

1-1

INSTALLATION AND DIMENSION

2-1

2.1
2.2
2.3
2.4
2.4.1

2.4.2

2.4.3

2.4.4
2.4.5

Environmental Requirements
Cabinet Considerations
Thermal Design for the Cabinet
External Dimensions And Diagrams
HUST H9C Controller and accessories
H9C Controller by All Series
H9C Accessories
HUST H9C/H6C Controller Dimensions (8 LCD)
H9C Series
H6C Series
HUST H9CL/H6CL Controller Dimensions (10.4 LCD)
H9CL Series
H6CL Series
HUST H9C Single board
H9C Accessories
Single Board
H9C/H6C Auxiliary Panel
H9CL/H6CL Auxiliary Panel

CONNECTING DIAGRAMS
3.1
3.2
3.3

3-1

Connector Type
Connector Designation
Connector Pin Definition
DA/AD Pin Assignment
DA/AD Control Signals
G31 INPUT Control Signals
Axial Control, pin assignment and wiring

Servo on wiring diagram -1


Servo on wiring diagram -2
MPG Hand-wheel Connecting Diagram
Wiring of Spindle Control
Wiring of Spindle Control Voltage command
Wiring of Spindle ControlPulse command

AC Power System Connection


Emergency-Stop wiring diagram -1
Emergency-Stop wiring diagram -2

RS232 Connector Pin Assignment and Connection Diagram

2-1
2-1
2-2
2-3
2-3
2-3
2-3
2-4
2-4
2-6
2-8
2-8
2-10
2-12
2-13
2-13
2-15
2-15

I/O (Input/Output) INTERFACE CONNECTION


i

3-1
3-1
3-2
3-2
3-3
3-3
3-4
3-5
3-6
3-7
3-8
3-8
3-9
3-10
3-11
3-12
3-13

4-1

HUST H9C Connecting Manual

4.1

4.2
4.3

I/O Interface Connection


SIO Module Board
I/O Board
NPN Output Relay Board
AC Power Output Module Board
DC Power Output Module Board
Axes Control Module Board
Designation and Pin Assignment
SIO Module Board Connection
Emergency-Stop Circuit

INTERFACE BETWEEN CNC CONTROLLER AND PLC


5.1
5.1.1
5.1.2

5.2

4-1
4-2
4-6
4-6
4-7
4-7
4-8
4-8
4-9
4-16

5-1

HUST H9C Series Status Signal S-Bits


5-1
S-Bit Signal And PLC Cycle Time Chart
5-4
Descriptions Of S-Bits
5-4
Square Wave Signal with 0.75sec ON,0.25sec OFF (S000)
5-4
Reset Key Strobe (S001)
5-4
Cycle Start Key Strobe (S002)
5-4
None pre-program and ending-program(S003)
5-4
Square Wave Signal with Wave Period (S008~S011)
5-5
CNC Control Unit Alarm Signal (S016)
5-5
Key Strobe (S017)
5-5
Key Strobe for Key Being Pressed Twice in 0.5sec (S018)
5-5
Cursor Up Key Strobe (S020)
5-5
Cursor Down Key Strobe (S021)
5-5
Page Up Key Strobe (S022)
5-5
Page Down Key Strobe (S023)
5-5
M-, T-, S-Code Strobe (S024~S026)
5-5
Signal for Spindle Motor In-position or When Grid-point Found
(S030)
5-6
Signals for X/Y/Z/A/B/C/U/V/W-axes Servo Motor Running Status
(S064-S072)
5-6
In Process Status Bit (S080)
5-6
Spindle Motor Speed Less Than 60 RPM (S081)
5-6
Rotating Signal for Spindle Motor (S085)
5-6
Signals for Servo Motor Running Status (S088)
5-6
Key Signals from PC or Easyview (S104~S111)
5-7
Battery low signalS120
5-7
RS232 Linkage Signal (S123)
5-7
PLC interrupt signalS125
5-7
Key Strobe for Key Being Pressed Down and Hold Down (S126) 5-7
Ladder Simulation Mode (S127)
5-7
X/Y/Z/A/B/C/U/V/W-axes - Home Signal at Machine Coordinate=0
(S160~S168)
5-7
Positioning Execution in PLC (S208~S216)
5-7
PLC Command Signal C-bits
5-9
ii

Contents

5.2.1

C-bit explanation
5-14
Machine Lock/Feed-Hold (C000)
5-14
Effect of Feed-Hold on output control command G11
5-14
RESET (C001)
5-15
Emergency Stop Signal (C002)
5-15
Cycle Start (C004)
5-15
Program No. Selection By Enter Key (C005)
5-15
Single Block (C006)
5-16
NC Alarm and Stop key (C007)
5-16
Background edit (C008)
5-16
Program NO. Selection by external I/O (C009)
5-16
Testing the second software limit (C010)
5-16
Program Restart-1 (C011)
5-17
Program Restart-2 (C012~C013)
5-18
Program Restart-3 (C014)
5-18
Dry Run (C015)
5-19
When the program restarts, it will directly execute the contents
below the restart single block,(C017)
5-19
Cursor Up and Down Key (C020~C021)
5-20
Page Up and Down Key (C022~C023)
5-20
Bit searching function in Edit mode (C024)
5-20
The program reading function is established with use of V10932
and V13449 (C025)
5-21
Option Stop (C026)
5-21
Option Skip (C027)
5-22
Speed Deceleration Selection For G31 Skip Function (C028)
5-22
G31 velocity changes from MFO (C029)
5-22
Counter Status (C030)
5-22
PLC ladder Simulation (C031)
5-23
M-, T-, S-code Command Finish Signal (C032~C034)
5-23
Round Corner Non-stop Operation (C036)
5-23
LCD Delayed Display (C037)
5-23
The Auto-Teach mode is established (C040)
5-23
The function of dynamic software limit is established (C041)
5-24
When the fill grid restarts the program in AUTO mode, it will
hold the display of the program (C049)
5-24
When the fill grid is in the automatic state, the cursor will indicat
the program number being executed (C050)
5-24
Simulating the input signal of the spindle Encoder (C052)
5-24
MPG Hand-wheel Test Mode (C056)
5-24
Return to The Last Program Block (C057)
5-25
Program Edit And MCM Edit Function Disabled (C058~C059) 5-25
Setting a relative coordinate (C060)
5-25
Copy function (C061)
5-25
HOME Execution Command (C063)
HOME Limit Switch Signals for X/Y/Z/A/B/C-axis (C064~C072)5-25
Making Copy of A Program File (C079)
5-26
Use the Current Program Position as Working Coordinate
(C080~C088)
5-27
iii

HUST H9C Connecting Manual

Clear the Current Program and Machine Coordinate to Zero


(C096~C104)
5-28
Spindle following error and position zeroing (C111)
5-29
The spindle number indicating function is established (C112)
5-29
Program simulation mode, no V-Command output & no encoder
Feedback (C115)
5-29
Spindle Motor Control (C116~C119, C121)
5-29
Spindle Motor searching for GRID point (C116)
5-29
Spindle Motor under closed-loop control (C117)
5-29
Spindle Motor rotational direction control (C118)
5-29
Angular set position for spindle motor (G119)
5-29
Program Selection from External I/O Device (C120)
5-32
Spindle Speed Control ( in %) from External I/O Device (C121) 5-32
Set Work Coordinate (C123)
5-32
Checking that the IO does not show the KEY CODE (C124)
5-33
Simultaneous Execution for M-code, S-code, T-code (C125)
5-33
Axial Data Input Disabled in TEACH Mode (C128~ C136)
5-33
DRO Mode Enabled (C144~C1152)
5-33
Signal for Over-travel (OT) Limit Switch (C160~C177)
5-33
Clear Error-Count to Zero (C192~C200)
5-34
X/Y/Z/A/B/C/U/V/W-axis Rapid Positioning Signal (C208~C216)5-34
In Edit or Teach mode, Insert and Input functions are not used
Completely (C220)
5-36
In Edit or Teach mode, the Insert function is not used. (C221)
5-36
Input method of the milling machine tool compensation data
incremental / absolute (C222)
5-36
Rapid Positioning (increasing value) signal (C223)
Special C-bit for G28,G29 and G30 (C224~C225)
5-36
Adjustment for MCM Parameters through PLC Ladder (C226)
5-36
Variable Value Input/Output Blocked (C227)
5-37
JOG Mode Enable Command (C228)
5-37
G01 Feed-rate Adjustment by MPG Hand-wheel (C229,C230)
5-37
Load File from EPROM/FLASH-Rom (C231)
5-38
Clear G54 Work Coordinates to Zero (C233)
5-38
Program Simulation using MPG Hand-wheel (C235)
5-38
User Defined Keyboard keys (C236)
5-38
Using the second set of handwheel, (C237)
5-41
When the program restarts, M, T, S and G04 commands are
skipped, (C240)
5-41
To set the rotational axis, each rotational axis is not cleared to
zero, (C241)
5-41
MPG Hand-wheel Feed Interrupt Mode (C242)
5-41
Easyview or LCD Screen In Sleep Mode (C243)
5-41
Suppressing Alarm ERROR-2 When Following Count>4096
(C244)
5-41
User Defined Keyboard Keys (C245)
5-41
LCD Display Function Disabled (C247)
5-43
When the fill grid displays, the cursor jumps out of the fill grid
(C250)
5-43
iv

Contents

5.3
5.3.1

When functions of G40/G41/G42 are established, the tool


compensation is corrected linearly at the tangent. The round arc
correction is cancelled (C251)
5-44
Milling Function Enabled (C252)
5-44
Lathe function Enabled (C254)
5-44
User Defined Keyboard Function Output (C255)
5-45
Description of PLC Register
5-46
Register singal descriptions
5-49
Execution Mode Selection (R100)
5-49
Displaying codes (R101)
5-49
Program Numbers to be copied from & into (R102,R103)
5-49
X & Y coordinate (R104 & R105)
5-50
Current Single block display during program execution (Y)(R106)5-50
Pre-Set Program and End program ( R107 & R108)
5-51
Showing cursor location in column/row of a function table
(R109&R110)
5-51
Program Number the Cursor Aiming At (R111)
5-52
The single block line number being edited by the system (C112) 5-52
Setting the maximum program number displayed in the machining
Program (C113)
5-52
Storing the max program number (R114)
5-52
Setting the LCD display width (R115)
5-52
Display of self-defined MACRO program whan in execution
Mode (R118)
5-53
Displaying RS232 execution mode (R119)
5-53
Axial ON/OFF (R121)
5-53
Reading the status signal sent from the PC or the man-machine
interface, S104~S111 (R122)
5-53
Setting the F speed format (R123)
5-54
Displaying axial operational direction (R124)
5-54
When the program initiates the signal, the system will pre-catch
the designated single block number (R125)
5-54
Composite functions (R126)
5-55
Number of Program Blocks Pre-Fetched to the System When
Starting Program Execution (R127)
5-55
No LCD Display When Number of Program Blocks Pre-fetch
Smaller Than R128 Setting Value (R128)
5-55
LCD display of refresh frequency (R129)
5-56
Spidle Motor Speed at 10V (R130)
5-56
Home Shift Value of Spindle Motor (R131)
5-56
Spindle RPM in Manual Mode (R132)
5-56
Spindle RPM When Searching for GRID (R133)
5-56
Angular Set Position for Spindle Motor (R134)
5-56
Number of Rotation for Spindle (R135)
5-56
Spindle home shift (R138)
5-56
AD1 (R142)
5-56
AD2 (R143)
5-56
User-defined Command Code (R154)
5-57
Setting the selection of an axial relative coordinate (R157)
5-60
v

HUST H9C Connecting Manual

Feed Rate Setting for X/Y/Z/A/B/C/U/V/W-axes (R160-R168)


Absolute Coordinate Setting for X/Y/Z/A/B/C/U/V/Waxes
(R180-R188)
5-60
Motor Deceleration Selection for G31 Skip Function (R190-R198) 5-61
Page Number for Liquid LCD Screen Display (R200)
5-61
Special Display Mode (R202)
5-61
Page Number Table (R203)
5-63
X&Y-Coordinate for the Top-left Corner of the Table Screen
(R204, R205)
5-63
Read the cell value in the Function Table (R206)
5-63
Setting USB/SDC operation (R211)
5-64
Setting Feed-Rate Percentage for G00 MFO % (R220)
5-64
Setting Feed-Rate Percentage for G0x MFO % (R221)
5-65
Setting the Multiplier for MPG Pulse (R222)
5-65
Setting Spindle Gear Ratio (R223)
5-65
When C121=0, Spindle Speed Percentage=R224 Value (R224) 5-65
When C121=1, Spindle Speed Percentage=R225 Value (R225) 5-65
Selecting Program Number from External I/O Device (R226)
5-65
Setting the Selected Variable Number When Editing the
Variable Data (R227)
5-66
Selecting Work Coordinate System (R228)
5-66
Setting the Number of Decimals for Display After Power On
(R229)
5-66
Setting Page Number for Easyview Display (R230)
5-67
Setting tool compensation groups (R231)
5-67
Selecting the Axes in JOG and HOME Mode (R232)
5-67
Selecting X/Y/Z/A/B/C-Axes to Move in Positive (+) Direction
With JOG Speed (R233)
5-68
Setting X/Y/Z/A/B/C -Axes to Move in Negative (-) Direction
With JOG Speed (R234)
5-68
Display the Drivable (Enabled) Axes (R235)
5-69
Display the Axis That is on HOME Position (R236)
5-69
Display the Axis of which the HOMING Process has been
Completed (R237 )
5-70
Spindle Axis Selection (R238)
5-70
Displaying the FUNCTION KEY value (R240)
5-71
Display the Keyboard Key Code as Read by the Controller (R241) 5-71
Self-Defining Key Function (R242)
5-72
Selecting the second handwheel axial direction (R243)
5-73
Setting the second handwheel pulse rate (R245)
5-73
Displaying positive (+) direction of ERR14, 20 and axial direction
of ERR02 (R247)
5-73
Displaying positive (-) direction of ERR14, 20 and axial direction
of ERR02 (R248)
5-73
Setting axial SERVO ON (BIT=1 ON, BIT=0 OFF) (R249)
5-74
Input Signal Type for G31 (R250)
5-74
The Number of Error Code (R251)
5-75
The Number of the Mxxx Code (R252)
5-75
The Number of the Txxx Code (R253)
5-75
vi

Contents

5.4

5.5

The Number of the Sxxx Code (R254)


For storing the Current Execution Program Numbers (R255)
Specified Variables
Set the cursor size #10781
#10782 & #10783
#10784 & #10785
#10786 & #10787
#10788 & #10789
Variables
Variables #10000~#10899
Special Variables Table
ErrorList description
Variables (VM) #12001~#13500

LADDER DIAGRAM
6.1
6.1.1
6.1.2

5-75
5-76
5-77
5-77
5-77
5-78
5-78
5-79
5-80
5-80
5-81
5-82
5-83

6-1

Introduction to Ladder Diagram (PLC or Ladder Program)


Interface Signal Definitions For PLC Ladder Diagram
Maximum Input/Output Point For PLC And PLC Editor

vii

6-1
6-1
6-1

HUST H9C Connecting Manual

viii

1 Introuction

INTRODUCTION

This manual explains the HUST H9C controllers electrical as well as structural design
necessary for connecting the CNC to the machine tool. It also describes the HUST H9C
connection signals including input, output, internal signals, such as S-bits and C-bits.
This manual also describes the functions and the ladder diagram with corresponding
signals. For the functional information of HUST H9C controller, please refer to HUST
H9C Operation manual. This manual is intended for users with some basic electrical and
electronic knowledges.
HUST H9C SERIES of generally external accessories:
(1) Communication interface:
(a) RS232Connection with PC, transfer data by software
(b) USB Connection with PC, or directly transfer data
(2)

Motion control connection(AXES)


(a) H6C 1 6 Axis, can be controlled step motor and servo motor.
(b) H9C 1 9 Axis, can be controlled step motor and servo motor.
(c) Spindle control will occupation which of one axis

(3)

MPG Hand-wheel (MPG)


(a) 2 set MPG

(4)

Series Input/Output Module(SIO)


(a) SIO module board48 input//32 output
Maximum in series6 modules maximum control 256 in/256 out.
Auxiliary panel can be in series (2nd panel)
(b) Can be used with the following accessories:
I/O Connect board(24 Input/16 Output)
NPN output Relay boardMax. current for each output of the PCB is 1A .
DC power module boardMax. current for each output of the PCB is 1A .
AC power output module boardMax. current for each output of the PCB
is 1A .
Axes control module boardstep motor or servo motor

(5) Analog output/ Analog input(AD/DA)


(a) 2 Set analog output0V ~ 10V
(b) 2 Set analog input0V ~ 10V
(c) G31 Input

1-1

HUST H9C Connecing Manual

Communication Interface
(a)H6CH9C (8 screen)

USB Interface
RS232 Interface
PC
Fig1-1 H9C 8 screen Communication interface
(b)H6CLH9CL( 10.4 screen)

PC

USB Interface
RS232 Interface
Fig1-2 H9CL 10.4 Communication interface

(c)H9C single board(NO screen)

USB Interface
RS232 Interface
PC

Fig1-3 H9C single board Communication interface

1-2

1 Introuction

HUST H9C of generally external accessories:(H9CH9CLSingle Board)


DAC-2 Output(DB15LM pin

G31 Input(DB15LM pin 5)

DAC-1 Output(DB15LM pin 1)

ADC-2 Input(DB15LM pin 7)


ADC-1 Input(DB15LM pin 6)

AC Servo

AC Servo

AC Servo

AC Servo

Optional: Use in
combination as
required

MPG1
W
AC

V
AC

U
AC

C
AC

B
AC

MPG2
24in/16out
#1SIO Module
(48IN/32OUT)
Relay Board

24in/16out

AC Power Board

DC Power Board

Connected next SIO module: 6 modules.maximum.


When use AXES CONTROL MODULE BOARD
, last 64 I/O address Occupancy.
Axes control module board

Fig 1-4

1-3

HUST H9CConnection Manual

HUST H6C of

generally external accessories:(H6CH6CL)


DAC-2 Output(DB15LM pin

G31 Input(DB15LM pin 5)

DAC-1 Output(DB15LM pin 1)

ADC-2 Input(DB15LM pin 7)


ADC-1 Input(DB15LM pin 6)

MPG1

AC Servo

AC Servo

AC Servo

AC Servo

AC Servo

AC Servo

MPG2

24in/16out

#1SIO Module
(48IN/32OUT)
Relay Board

AC Power Board

Optional: Use in
combination as
required
24in/16out

DC Power Board

Connected next SIO module: 6 modules.maximum.


When use AXES CONTROL MODULE BOARD
, last 64 I/O address Occupancy.

Fig 1-5

1-4

Axes control module board

2 Installation and Dimendion

INSTALLATION AND DIMENSION

2.1

Environmental Requirements

The design of the cabinet to house the CNC unit, the keyboard panel and the LCD
display is the responsibility of the machine tool builder. The cabinet must be constructed
and the unit installed in an environment satisfying the following conditions

Ambient Temperature
When operating: 0o C to 45o C.
When storing or transporting the system: -20o C to 55o C.

Temperature Variation
Maximum: 1.1o C/minute.

Humidity
Normally: 80% RH or less (Relative Humidity).
For short period: maximum 95% RH.

Vibration
When operating: <= 0.075 mm with frequency 5 HZ.

Noise
When operating: withstand 2000V/100 sec pulse width every 10 m sec.

Contact us when installing the system in an environment with high degree of dust,
coolant, or organic solution.

2.2

Cabinet Considerations

Pay attention to the following items when designing a cabinet for HUST H6C controller.

The cabinet must be constructed to house the CNC unit, MDI panel and is always a
completely enclosed box.

The max temperature rise within the cabinet during operation should NOT exceed
10o C higher than the ambient temperature.

Sealing of the cable inlet/outlet or doors must be done thoroughly.

To avoid the noise interference, various units, the connecting cable and the AC
power source must be mounted at least 100 mm apart. In a magnetic field
environment, this distance should be increased to at least 500 mm.

When mounting the servo amplifier, please refer to the Servo Motor Manual.

2 - 1

HUST H9C Connecting Manual

2.3

Thermal Design for the Cabinet

The cabinet for the control unit must be a closed structure, and the temperature rise
within the cabinet must be 10o C or less than the ambient temperature. When designing
a metal cabinet for a CNC unit, two factors must be considered, which are the heat
source and the radiation area. The heat source is from the CNC unit itself, users cannot
do anything to reduce it. Therefore, the one thing that the user can do in controlling the
temperature rise is the radiation area. The allowable temperature rise inside a metal
cabinet can be estimated as follows:
1.
2.

With a cooling fan, the allowable temperature rise is 1o C/6 W/1 m2.
Without a cooling fan, the allowable temperature rise is 1o C/4 W/1 m2.

This means that a cabinet with a radiation area of 1 m2 and a cooling fan will have an
internal temperature rise of 1o C when a heating unit of 6 W (4W without a cooling) is
inside the cabinet. The radiation area of a cabinet is the entire surface area of the cabinet
minus the area contacting the floor.
Example 1 (with a cooling fan):
A cabinet has a 2 m2 radiation area with a temperature rise of 10o C. The maximum
allowable heat value inside the cabinet is 6 W x 2 x 10 = 120 W. Therefore, the heat
generated inside the cabinet must be kept less than 120 W. If the heat generated is 120
W or more in the cabinet, some other cooling devices, such as cooling fins, must be
incorporated in the unit.
Example 2 (without a cooling fan):
A cabinet has a 2 m2 radiation area with a temperature rise of 10o C. The maximum
allowable heat value inside the cabinet is 4 W x 2 x 10 = 80 W. Therefore, the heat
generated inside the cabinet must be kept less than 80 W. If the heat generated is 80 W
or more in the cabinet, some other cooling devices, such as fan, or cooling fins, must be
incorporated in the unit.

2 - 2

2 Installation and Dimendion

2.4

External Dimensions and Diagrams

2.4.1

HUST H9C Controller and Accessoires

* HUST H9C Controller by All Series

Screen
8
10
Single Board

Controller series
H6C
H9C
H6CL
H9CL
H9C SB

Dimensions
identical
identical

* HUST H9C Accessories


Table 2-1 HUST H9CH6C Accessories
Project
(a) SIO MODULE BOARD : 48 IN/32 OUT
(b) I/O CONNECT BOARD : 24 IN/16 OUT
H6CH9C
(c) Auxiliarypanel
(Operator panel)
H6CLH9CL
(d) NPN OUTPUT RELAY BOARD : 8 OUT
(e) AC POWER OUTPUT MODULE BOARD : 8
OUT
(f) DC POWER MODULE BOARD : 8 OUT
(g) AXES CONTROL MODULE BOARD : 8 OUT

Standard

(a)(b) item are standard accessories,all of items are 1 pcs.


(c)(d)(e)(f)(g)item are options accessories
User according to needs selection accessories.

2 - 3

Options

HUST H9C Connection Manual

2.4.2
*

HUST H9C / H6C Controller Dimensions ( 8 LCD )

HUST H9C Series

Fig 2-1 Front View

Fig 2-2 Rear View

2 - 4

2 System Installation

Fig 2-3 Top View

Fig 2-4 Cutout

2 - 5

HUST H9C Connection Manual

HUST H6C Series

Fig 2-5 Front View

Fig 2-6 Rear View

2 - 6

2 System Installation

Fig 2-7 Top View

Fig 2-8 Cutout

2 - 7

HUST H9C Connection Manual

2.4.3

HUST H9CL / H6CL Controller Dimensions ( 10.4 LCD )

* HUST H9CL Series

Fig 2-9 Front View

Fig 2-10 Rear View

2 - 8

2 System Installation

Fig 2-11 Top View

Fig 2-12 Cutout

2 - 9

HUST H9C Connection Manual

* HUST H6CL Series

Fig 2-13 Front View

Fig 2-14 Rear View

2 - 10

2 System Installation

Fig 2-15 Top View

Fig 2-16 Cutout

2 - 11

HUST H9C Connection Manual

2.4.4
*

HUST H9C Single Board

HUST H9C Single Board

Fig 2-17 Rear View

Fig 2-18 Top View

Fig 2-19 Cutout

2 - 12

2 System Installation

2.4.5

HUST H9C Accessories Dimensions

* HUST H9C \H9CL\H6C\H6CL \SINGLE BOARD

Fig 2-20 SIO module : 48 in/32 out

Fig 2-21 I/O connect board : 24 in/16 out

Fig 2-22 Axes control module board

2 - 13

HUST H9C Connection Manual

Fig 2-23 8 NPN output relay board

Fig 2-24 DC power module board

Fig 2-25 AC power output module board

2 - 14

2 System Installation

HUST H9C / H6C Auxiliary Panel

Fig 2-26 H9C Auxiliary Panel


*

HUST H9CL / H6CL Auxiliary Panel

Fig 2-27 H9CL Auxiliary Panel

2 - 15

HUST H9C Connection Manual

2 - 16

3 Connection Diagrams

CONNECTION DIAGRAMS

3.1

Connector Type

The types of connectors provided on the HUST H9C controller box are summarized
below. Each connector symbol is followed by a letter of either M (for male) or F (for
female).

DBxx
DB9L
DB9LF
DB15LM
3.2

pin number indicated by xx.


9 pins connector.
9 pins female connector.
15 pins male connector.

Connector Designation

The connector designation on HUST H9C controller is printed on the back of the
controller and their corresponding types are listed below.
Table 3-1 Connector Designation and Type
The back of the Controller
H6C/H6CL

H9C/H9CL

Connector
Designation

Type

Analog Input/Output

AD/DA

DB15LM (M)

X-axis Servo

X-AXIS

DB15LF (F)

Y-axis Servo

Y-AXIS

DB15LF (F)

Z-axis Servo

Z-AXIS

DB15LF (F)

A-axis Servo

A-AXIS

DB15LF (F)

B-axis Servo

B-AXIS

DB15LF (F)

C-axis Servo

C-AXIS

DB15LF (F)

U-axis Servo

U-AXIS

DB15LF (F)

V-axis Servo

V-AXIS

DB15LF (F)

W-axis Servo

W-AXIS

DB15LF (F)

Connector Name

MPG Handwheel

MPG

DB9LM (M)

I/O

SIO

DB15LF (F)

Front Controller
Connector Name
Communication Interface

H6C/H6CL

H9C/H9CL

Connector
Designation

Type

RS232

DB9LF (F)

USB

USB (F)

3 - 1

HUST H9C Connecting Manual

3.3

Connector Pin Definition


Table 3-2 HUST H9C Connector Pin

HUST H9C
AD/DA
DB15LM
Definitoin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
*

DAC0
DAC1
D+
DG31 IN
ADC-0
ADC-1

5V
+12V
-12V
GND

AXIS
DB15LM
Definitoin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

MPG
DB9LF (F)
Definitoin

1
2
3
4
5
6
7
8
9

CW+
CWCCW+
CCWVCC
GRD-(Z-)
TOG
VCOM
SVO+
SVOAA+
B+
BGND

A
B
5V
A
B
0V
0V

HUST H6C Series DA/AD Pin Assignment:


AD/DA PIn
AD/DA

CPU
Board

DAC-0
DAC-1
D+
DG31 IN
ADC-0
ADC-1
GNDX
VCC
+12V
-12V
GND-CN

2 set DAC 0

10V output

3
4
5
6
7
11
12

2 set ADC IN 0

10V input
G31 Hardware
stop signal

13
14
15

0V

Fig 3-1 AD/DA control wiring

3 - 2

3 Connection Diagrams

AD/DA Control signals


Table 3-3
AD/DA:

Setting of relative registers

Function Register

Description

R146

Pin 1 (DAC-0) and Pin 15 (GND) are for #1 output


signal

R147

Pin 2 (DAC-1) and Pin 15 (GND) are for #2 output


signal

DAC

Usage
1. PLC directly sets R146=5000
2. Actual output voltage=5V
ADC

R142

Indicates value of #1 analog voltage input

R143

Indicates value of #2 analog voltage input


Wiring Method

Note:
VR
Value read from #1 ADC IN will be
shown in R142
z

Pin 13 +12V
Pin 06 ADC IN
Pin 15 GND

G31 INPUT Control signals


Table 3-4
G31 INPUT: Settings for related Parameters and Registers
Description
G31 INPUT

Pin 5 (G31 IN) inputs signal to control high-speed axial stop,


responding in 0.5sec.
Setting of high-speed stop in axial direction of G31 Jump Function
Setting method

Parameter
530

BIT0/1/2/3/4/5/6/7/8 respectively represents X/Y/Z/A/B/C/U/V/W


axis.
Ex.: BIT0=1, indicates X-axis Function enabled; BIT1=1, indicates
Y-axis Function enabled
Signal format for waiting for the G31skip Function
Setting = 0, I-bit Input signal is an ascending (01) trigger signal

R250

Setting = 1, I-bit Input signal is a descending (10) trigger signal


Setting = 2, I-bit Input signal is a Normal Open (0) signal
Setting = 3, I-bit Input signal is a Normal Close (1) signal
3 - 3

HUST H9C Connecting Manual

Axial Control,pin assignment and wiring

Connect servo driver to axial-control connector as shown in Fig.5-23 (pin


assignment identical for all axes).
Servo connections dependent on
different maker

AXIS

CPU
Main
Board

CW+
CWCCW+
CCWVCC-CN
GRD-(Z-)
TOG
VCOM
SVO+
SVOAA+
B+
BGND-CN

1
2
3
4
5
6
7
8
9
10
11

Displacement command -10

+10V

Servo
signal

SERVO ON(internal control)

12
13
14
15

Cabin GND

Fig 3-2 Wiring for Axial Control

1. Isolated twist-pair cables shall be used.


2. Pay special attention to Pin15 of the wriing. Be sure to connect.
3. Pay special attention to Pins 11-14 of the axial connection. In case the
motor runs scattering, alter the terminal A with the terminal A- at the
driver end.
4. HUST miller controller, when voltage-command type servo motor is
used, you need to set the Follow Error checking function. (Not
applicable to pulse commands.)
(a) Parameter 533 = 4096 check the value of Follow Error.
(b) Parameter 543 =511 check Follow Error of the axis
X/Y/Z/A/B/C/U/V/W simultaneously (set by BIT: Bit0=1 for Xaxis, Bit1=1 for Y-axis).
(c) When the ERROR COUNT of the actual feedback of X-axis
motor >4096, the system will issue an error message.

3 - 4

3 Connection Diagrams

SERVO ON wiring - 1

In this connection,servo on control directly by R249.


R249 Bit0
1
1
2
0
4
0
8
0
16
0
32
0
64
0
128
0
256
0
511
1

Bit1
0
1
0
0
0
0
0
0
0
1

Bit2
0
0
1
0
0
0
0
0
0
1

Bit3
0
0
0
1
0
0
0
0
0
1

Bit4
0
0
0
0
1
0
0
0
0
1

Bit5
0
0
0
0
0
1
0
0
0
1

Bit6
0
0
0
0
0
0
1
0
0
1

Bit7
0
0
0
0
0
0
0
1
0
1

Bit8 Axis
0
X
0
Y
0
Z
0
A
0
B
0
C
0
U
0
V
1
W
1
ALL

R249=511 by setting BIT0123456789 On


XYZABCUVW-Axis will SERVO ON
SERVO ON connection
PC board endured maximum 60V and 4mA
VCC

SVO+

SVOX

SVO-X

Fig.3-3 SERVO ON connection


AXIS
port

SVO+

SVO-

10

SON
ServoServo-On
driver
Singnal
SG
Servo on command
(Control by inside)
X

Fig.3-4

3 - 5

AXIS

HUST H9C Connecting Manual

SERVO ON wiring - 2

Servo connections dependent on different maker. In this connection,


24V output control through output board.
When SERVO ON need to provide 24V power.Refer to Fig.3-5.

GND
24V

SIO module board

I24/O16 connect board

Servo driver
Servo-On
/SON
Singnal
+24V
X

Axis

Fig 3-5

3 - 6

3 Connection Diagrams

MPG Hand-wheel Connecting Diagram

1. HUST H9C Series can be provided with 2 manual pulse generators.


2. If the direction of tool travel is not the same as indicated by the MPG,
use Parameter 518, handwheel direction, to correct it
3. Use 2nd hand wheel according to actual demand
(a) If C237=1 in the PLC, MPG2 terminals can be used.
(b) When MPG2 is used, adjust the multiplier using R245.
MPG2

CPU Main Board

A
B
+5V
A

MPG1
+5V 0V A B

2
3
4
6

0V
0V

7
8P7

Fig 3-6

3 - 7

MPG2
+5V 0V A B

HUST H9C Connecting Manual

Wiring of spindle control

There are 2 types of Spindle Control:


(a) Voltage Command type
(b) Pulse Command type
*

Voltage Command type

Spindle
VCOM
GND-CN
5V
AA+
B+
BZ-

8
15
5
11
12
13
14

Servo
Driver

Case GND

Fig 3-7 Spindle voltage command control-closed circuit wiring (servo)

Spindle
VCOM
GND-CN
5V
AA+
B+
BZ-

8
15

Inverter

5
11
12
13
14

Encoder
Extemal
Encoder

Case GND

Fig 3-8 Spindle Voltage Command Control- Open circuit wiring (Inverter)

3 - 8

3 Connection Diagrams

Pulse Command Type


Spindle

CW+
CWCCW+
CCWAA+
B+
BZGND-CN

1
2
3
4

Servo
driver

11
12
13
14
6
15

Case GND

Fig 3-9 Spindle pulse command control- closed circuit wiring (servo)

Spindle

CW+
CWCCW+
CCWAA+
B+
BZ5V
GND-CN

1
2
Inverter

3
4

Encoder

11
12
13

Extemal
Encoder

14
6
5
15

Case GND

Fig 3-10 Spindle pulse command control- closed circuit wiring (Inverter)

3 - 9

HUST H9C Connection Manual

AC Power System Connection

In order to avoid controller anomalies caused by voltage fluctuations,


it is recommended to provide sequential differences for the ON/OFF of
the CNC power and Servo power.
1. SERVO ON signal shall be activated in a slight delay after the
activation of system power supply, when the latter is stabilized.
2. Before switching off the system power supply, provide a delay for
switching off the SERVO ON signal first.

CNC Power/ SERVO Power ON-OFF sequence diagram


CNC Power-on

Power off delay


Time

Servo Power-on

Time
servo on delay
To CPU Power supply R
AC220V R
AC220V S

To CPU Power supply T

AC220V T
Ti

D l

C
Servo
Driver

power-off power-on
Power-On Relay
Power-On Timer Relay

Can be omitted inside dashed line

Fan
AC 220V R T0 Servo AMP Power TB P
AC 220V S T0 Servo AMP Power TB N

Fig 3-11 Wiring of System AC Power Supply

3 - 10

3 Connection Diagrams

Emergency-Stop wiring diagram-1

Recommended wiring diagram. In this connection, the software control


and hardware control are connected in a series; when the E-stop button is
pressed, the hardware will switch off Servo-On even if the software fails.
24V GND (0V)
E-Stop

Limit Switch

Servo Release

X-axis Origin Limit

Z-axis Origin Limit


24V GND (0V)
SIO Moudle Board

I24/O16 Board
Servo Driver
Servo-On
Singnal
X Axis
8 OUT RELAYBoard

Servo Start Command


24V

Servo Driver
Servo-On
Singnal
Z Axis

External SERVO ON RELAY

Fig 3-12

3 - 11

HUST H9C Connection Manual

Emergency-Stop wiring diagram-2

Simplified wiring diagram


24V GND (0V)
E-Stop

Limit Switch

Servo Release

X-axis Origin Limit

Z-axis Origin Limit


24V GND (0V)

SIO Moudle Board

I24/O16 Board

Servo Driver
X-AXIS

SVO+
SVO-

9
10

Z-AXIS

SVO+
SVO-

9
10

Servo-On
Singnal
X Axis

Servo Driver
Servo-On
Singnal
Z Axis

HUST H9C CNC


Fig 3-13

3 - 12

3 Connection Diagrams

RS232 Connector Pin Assignment and Connection Diagram


Fig 3-14 shows the connection between the HUST H9C controller and the PC. Please
observe the following guidelines:
1. Do not exceed 15 meters for the cable connecting RS232 port and the PC.
2. The interface voltage on the PC side should be in the range 10 ~ 15V.
3. Try NOT to work in an environment where electrical noises are common, such as
EDM machine and electric welder. Do not use the same power source as EDM
machine or electric welder. Twist RS232 cables if possible.

DCE

DCE

HUST Controller end

DB9LM
CONNECTO

PC COM

TXD 2

3 RXD

RXD 3

2 TXD

SG 5

7 SG

CTS 7

4 RTS

RTS 8

5 CTS

HUST Controller end

DB9LM
CONNECTO

DB25LF
CONNECTO

PC COM

TXD 2

2 RXD

RXD 3

3 TXD

SG 5

5 SG

CTS 7

7 RTS

RTS 8

8 CTS

DB9LF
CONNECTO

Fig 3-14 RS232C Connector Pin Assignment

3 - 13

HUST H9C Connection Manual

3 - 14

4 I/O Interface Connection

I/O (Input/Output) Interface Connection

The +24V power supply for the I/O interface operation has to come separately
from the external source.
4.1

I/O Interface Connection

Input signal is a signal that is received by the CNC controller and it is generated from an
external devices, such as keyboard button, sensor, limit switch, proximity switch, etc.
Output signal is a signal that is being sent from the CNC controller to the external
devices. that can be used to drive a relay or LED, etc.
H9C controller accessories
Total of seven standard accessories
Table 4-1 H9C standard accessories
H9C standard accessories
NO.

Project

Input

Output

Note(Material NO.)

SIO module board

48

32

H6C\SIO\I48O32\V2_4

I/O connect board

24

16

H6C\SIO\CONNECT\V1_1

NPN output relay board

H6C\SIO\RLY8\V0

AC power output module


board

H6C\SIO\SSR8\V0

DC power module board

H6C\SIO\DC8\V0

Axes control module board

Step motor or servo motor

Auxiliary panel

H6CH9C series can be used

I/O Interface Connection:


Controller must through the SIO Module Board and Connect I/O Board then can control
the I/O motion. The explanation is below

4-1

HUST H9C Connection Manual

SIO MODULE BOARD H6C\SIO\I48O32\V2_4

Fig 4-1
1. 48 IN/32 OUT control.
(a) Maximum in series6 modules.maximum control 256 IN/256 OUT.
(b) Auxiliary panel can be in series (2nd panel)
2. Each SIO MODULE BOARD can connect with
(a) I/O connect board (24 Input/16 Output)
(b) NPN Relay Board8 out
(c) DC power module board8 out
(d) AC power output module board8 out
(e) Axes control module boardcontrol other step motor or servo motor.
3. When use axes control module board, last 64 I/O address Occupancy.
th

4. When use universal auxiliary panel, 4 I/O address Occupancy.


5. SIO module board start address by switch control.
6. Controller MAX control 256in and 176 out

4-2

4 I/O Interface Connection

Explanation of SIO MODULE BOARD


LED-lamp (Input)n
LED-lamp (Output)o
JUMP (NPN or PNP)p
SWITCHq

2nd connect I/O port

LED

LED

LED

LED

FROM-CNC

TO-NEXT
24V GND

1
3

1st connect I/O port

DC24V INPUT
Fig 4-2

1. LED-LAMP
INPUT - LED (Green) nEach Left and Right have 3 groups, every group have 8
signal. The total signal is 48.
OUTPUT - LEDRedoEach Left and Right have 2 groups, every group have
8 signal. The total signal is 32.
2. JUMP (NPN OR PNP)p
Each Left and Right have 1 groups.
Leftcontrol 1th CONNECT I/O BOARD.
Rightcontrol 2th CONNECT I/O BOARD.
The explanation is below

4-3

HUST H9C Connection Manual

Fig5-2-Lp

Fig5-2-Rp

Short

Fig5-2-Lp

Short

Fig5-2-Lp

Short

Short

Fig5-2-Rp

Short

Short

Fig5-2-Rp

Fig5-2-Lp

Fig5-2-Rp

Short

Short

Explanation1
All input are NPN type of CONNECT I/O BOARD

Explanation2
CONNECT I/O BOARD signal
(1) I00~I23 NPN type.
(2) I24~I39 NPN type, I40~I47 PNP type.

Explanation3
CONNECT I/O BOARD signal
(1) I00~I15 NPN type, I16~I23 PNP type.
(2) I24~I47 NPN type.

Explanation4
CONNECT I/O BOARD signal
(1) I00~I15NPN type, I16~I23 PNP type.
(2) I24~I39NPN type, I40~I47 PNP type.

3. SWITCH qI/O position define.

DIP

ON

SW

Each SIO MODULE BOARD can control 48in/32out and string of 6 pieces.
Table 4-2 Switch table explanation
MODULE Switch 1 Switch 2 Switch 3 Switch 4
IN range
st
0
0
0
0
I000
I047
1
nd
1
1
0
0
I048
I095
2
rd
0
1
1
0
I096
I143
3
th
1
0
0
1
I144
I191
4
th
I192
I239
5
0
0
1
1
th
I240
I255
6
1
1
1
1
The 6th SIO MODULE BOARD can control 16in/16out only.

4-4

OUT range
O000
O031
O048
O079
O096
O127
O144
O175
O192
O223
O240
O255

4 I/O Interface Connection

When use Axes control module board and Auxiliary panelIO range

Board
1st
2nd
3rd
4th
5th
6th

Table 4-3 H9C controller IO range


IO range
Switch 1 Switch 2 Switch 3 Switch 4
Input range
0
0
0
0
I000 ~ I047
1
1
0
0
I048 ~ I095
0
1
1
0
I096 ~ I143
Universal auxiliary panel
I144 ~ I191
The 1st axis control board
I192 ~ I223
The 2nd axis control board
I224 ~ I255
th

When use universal auxiliary panel, 4 I/O address Occupancy.

When use axes control module board, last 64 I/O address Occupancy.

4-5

Output Range
O000 ~ O031
O048 ~ O079
O096 ~ O127
O144 ~ O175
O192 ~ O223
O224 ~ O255

HUST H9C Connection Manual

I/O connect Board (PC Board No.H6C\SIO\CONNECT\V1_1)


1.
2.
3.
4.
5.
6.
7.

I/O connect board controls 24 input terminals and 16 output terminals.


Output control is by 0V output.
An INPUT can be of NPN type or PNP type.
When the SIO setting of the module is PNP, the 8 input terminals after the INPUT
signal are of PNP type; the rest are of NPN type.
Input voltage at I: 0V
Output current at I: 6mA
Output current at O: 100mA

Fig 4-3
* NPN output relay Board (PC Board No.H6C\SIO\RLY8\V0)
1.
2.
3.
4.

Max. current for each output of the PCB is 1A


The 8 Output terminals can sustain a max. current of 8A, all together.
For a max. current > 1A, use other relays.
Contacts on the RELAY adaptor board are dry contacts.
AB585
H9C\SIO\RLY
8\V0:

Fig 4-4

4-6

4 I/O Interface Connection

AC power output module board (PC Board No.H6C\SIO\SSR8\V0)


1.
2.
3.
4.

5.

AC Power supply adaptor board controls 8 AC110 outputs.


Max. current for each output of the PCB is 1A .
The 8 Output terminals can sustain a max. current of 8A, all together.
Two power supply ports are provided on the AC Power supply adaptor board:
1. AC 110V ~220V;
2. DC 24V (can be connected independently from the external)
Rating of the factory supplied fuse is 5A.

Fig 4-5
DC power module board (PC Board No.H6C\SIO\DC8\V0)
1.
2.
3.
4.

DC power output board controls 8 sets of DC 24V output.


Max. current for each output of the PCB is 1A .
The 8 Output terminals can sustain a max. current of 8A, all together.
Rating of the factory supplied fuse is 5A.

Fig 4-6

4-7

HUST H9C Connection Manual

Axes control module board (AE674)

Fig 4-7
1.
2.
3.
4.
5.
6.
7.

Can external control 8 axes.


Step motor and servo motor control.
Only one kind of motor can be control at the same time
The 8 Output terminals can sustain a max.
Max. current for each output of the PCB is 2A .
The 8 Output terminals can sustain a max. current of 10 A, all together.
Max fast : 255 kpps

* Designation and pin assignment


Table 4-4
Connector type
Step Motor
HUST Pin
1
2
3
4

Servo Motor
HUST Pin
Servo Pin
1
/B
2
B
3
A
4
/A
5
G
Servo Motor connection (5PIN)

Step Pin
A
/A
B
/B

Step Motor connection (4PIN)


1 2 3 4

1 2 3 4 5

A /A B /B

/B B A /A G

4 - 8

4 Input/Output Interface Connection

4.2

SIO MODULE BOARD connection

Explanation of SIO MODULE BOARD


Structure of wiring (1)
All of the SIO board must used the sameDC24V power supplyexcept to the AC
output board.
DC24V POWER SUPPLY

DC24V POWER SUPPLY

40pin Row cable, 1st Connect I/O board


I0~I23(24in)O0~O15(16out)

FROM-CNC

40pin Row cable, 2nd Connect I/O board


I24~I47 (24in)O16~O31 (16out)

TO-NEXT

DC24V POWER SUPPLY

HUST H9C CONTROLLER

TO-NEXT

15 pin Female to Male cable

SIO module boardI48/032

Auxiliary panel

Fig 4-8
4 - 9

HUST H9C Connection Manual

Structure of wiring (2)


All of the SIO board must used the sameDC24V power supplyexcept to the AC
output board.
DC24V POWER SUPPLY

DC24V POWER SUPPLY

40pin Row cable, 2nd Connect I/O board


I24~I47 (24in)O16~O31 (16out)

40pin Row cable, 1st Connect I/O board


I0~I23(24in)O0~O15(16out)

LED

LED

24V

GND

1. Use in combination as required


2. 10 pin white connecto
3. Can be connected to 3 optional boards
4. Can be connect 4 modules maximum .
5. NPN RELAY BOARD provide 8 dry contacts. Max. current for each output
of he PCB is 1A .
6. AC power output module boardprovide 8 AC110V outputs. M ax. current for
each output of the PCB is 1A.
7. DC power module boardprovide 8 DC24V outputs. Max. current for each
output of the PCB is 1A .
Accessories

Relay board

AC power supply

Fig 4-9

4 - 10

DC power supply

4 Input/Output Interface Connection

ConnectionModel 1

24V

40pin Row cable, 1st Connect I/O board


I0~I23 (24in)O0~O15 (16out)

External Relay 2

External Relay 1

Spark Killer

Spark Killer

24V

O00
Output 0V

24V

Fig 4-10

4 - 11

24V

O15
Output
0V

HUST H9C Connection Manual

ConnectionModel 2Relay type control

40pin Row cable, 1st Connect I/O board


I0~I23 (24in)O0~O15 (16out)

DC 24V Power Supply

DC 24V Power Supply

AC 220V
Transformer

When O00 signal is activated,


relay on the RELAY PCB will be
excited, energizing the AC220
power supply
AC 220V Output
Fig 4-11

COM
00
COM
01
COM
02
COM
03
COM
04
COM
05
COM
06
COM
07

H9C\SIO\RLY8\
V0:AB585

Each COM point not conduction.


Used the Relay board only or with external Relay.
When O00 = 1, the COM and 01 will be conduction and send out 0V.

4 - 12

4 Input/Output Interface Connection

ConnectionModel 3AC OUTPUT


Single output controlPCB-board limit is 1A
8 output control at one timePCB-board limit is 8A

JP6
10 PIN Row cable
DC24V
Input

AC110 220V
Input

When O016 = 1, AC 110V will


send out.
DC24V input can used same with
the common point of I/O Module
(H6C\SIO\I48O32) or used another
power supply alone.
Fuse default:5A
AC110V
Output
Fig 4-12

4 - 13

HUST H9C Connection Manual

ConnectionModel 4DC Power Suply


Single output controlPCB-board limit is 1A
8 output control at one timePCB-board limit is 8A

JP6
10 PIN Row cable

When O016 = 1, DC 24V will


send out.
Fuse default:5A

DC24V
Output

Fig 4-13

4 - 14

4 Input/Output Interface Connection

ConnectionModel 5NPN 3-wire SENSOR


DC24V POWER SUPPLY

I00 0V
Input
SENSOR

Fig 4-14
ConnectionModel 6PNP 3-wire SENSOR
DC24V POWER SUPPLY

I00 24V
Input
SENSOR

Fig 4-15

4 - 15

HUST H9C Connection Manual

4.3

Emergency-Stop Circuit

The electronic circuit in the controller requires about 100 milli-seconds to reach stable
state when power is turned on. During this unstable period, the servo motor should not
be turned on. To accomplish this purpose, HUST internal PLC has a "Servo-on Timer"
with 1.5 seconds. When the timer is up, the controller sends an O-bit high (1) to turn on
the servo driver.
Fig 4-16 is an emergency stop circuit. When the hardware OT limit switch is touched or
the E-stop button pushed, the controller will be in a state of emergency stop and the
servo-on switch on the servo motor will trip off. For safety reason, the E-stop button, the
hardware OT limit switch, and the E-stop relay should be connected in-series and the
servo-release button in-parallel with the hardware OT limit switch. Please note that the
E-stop button and the hardware OT limit switch are of normal-closed type.
During normal operating condition, the servo-release button is at OFF position. After
emergency stop has occurred and all power to servo motor has been cut off, servorelease button can be pushed in to supply power to servo motor to bring the machine
tool to normal operating range.
+24V GND
Limit Switch

(E-Stop)
INPUT

Servo Release
Servo Driver
Spark Killer
Servo-On
Signal

PLC Output
24V
External Relay A

Spark Killer

Spark Killer
PLC Output

24V
SERVO ON Relay C

24V
External Relay B

Fig 4-16 Emergency Stop Circuit

4 - 16

4 Input/Output Interface Connection

Notes:
1. Relays A and B are protection circuit during power-on. The purpose is to prevent the
tool from being damaged in case of power-on failure that results in a total output.
2. Relay C is a servo-on relay.
3. Relay A and B are outputs in PLC.
4. Generally, Relay C has multiple connecting points for multiple servo. Each servo
motor requires independent connecting point. Do NOT connect servo motors in
parallel because some servo motors cannot be connected in parallel. See Fig 4-17.
5. The arrangement of servo-on in PLC. See Fig 4-17.
Incorrect Connection
Servo Driver
Servo-On
Singnal
PLC
Output

Servo Driver

24V

RELAY C
Correct Connection

Servo Driver
Servo-On
Singnal
PLC Output
24V

Servo Driver
Servo-On
Singnal

RELAY C
Fig 4-17 Incorrect / Correct Connection

4 - 17

HUST H9C Connection Manual

Emergency-Stop Line-1
It is recommended to connect as Fig. 4-18. In doing so, the software and
hardware is controlled in series and the user can press the emergency button to
turn off the servo even if an abnormality is found in the software.
24V GND (0V)

E-Stop

Limit Switch

Reset Button (Forced)

X-axis Origin LIMIT


Z-axis Origin LIMIT
24V GND (0V)
SIO Module Board

I24/O16 Board
Server Driver

ServoOn
Singnal
X Axis
NPN RELAY Board

Servo Start Command


24V

Server Driver

Servo-On
Singnal
Z Axis
External SERVO ON RELAY

Fig 4-18

4 - 18

4 Input/Output Interface Connection

Emergency-Stop Line-2
Fig.4-19 is a simplified connection diagram.
24V GND (0V)

E-Stop

Limit Switch

Reset Button (Forced)

X-axis Origin LIMIT


Z-axis Origin LIMIT
24V GND (0V)

SIO Module Board

I24/O16 Board

Server Driver

Servo-On
Singnal
X Axis
Server Driver

Servo-On
Singnal

NPN RELAY Board

Z Axis

Fig 4-19

4 - 19

HUST H9C Connection Manual

4 - 20

5 Interface Between CNC & PLC

INTERFACE BETWEEN CNC CONTROLLER AND PLC

PLC bits used in HUST H9C controller with PLC (Programmable Logic Controller) are
described below. Their meanings and applications will be discussed in this chapter. This
chapter is intended for those who are familiar with HUST PLC program editing.
S-bit :
C-bit :
I-bit :
O-bit :
A-bit :

Status signal from CNC controller to PLC unit.


Command signal from PLC unit to CNC controller.
Input signal from external I/O unit to PLC unit.
Output signal from PLC unit to I/O unit for driving external device.
Auxiliary bit for PLC unit.

Register:
1. R000~R099 are for users application in the PLC program.
2. R100~R255 are reserved for HUST H9C system data, NOT for customers use.
The data in R000~R099 can be saved with power off if MCM #521=256, and the
data will NOT be saved if MCM #521=0.

HUST
CONTROL
UNIT

5.1

C-BITS

S-BITS

REGISTE
R

HUST
PLC
A-BITS
TIMER
COUNTE
R

I-BITS

O-BITS

EXTERNAL
I/O
DEVICES
OR
MACHINE
TOOLS

HUST H9C Series Status Signal S-Bits

S-bit is the internal status signal from HUST CNC system unit to PLC unit for
sequential control of the machine tool. The meaning of each S-bit signal is shown in
Table 6-1. Note that S000~S031 are one-shot bits and are effective for one cycle only.
For example, when RESET key is pressed, S001=1 for one cycle.

5-1

HUST H9C Connecting Manual

Table 5-1 HUST H9C Series Status Signal (S-Bits)


S-Bit
Number
S000
S001
S002
S003
S004 ~ S007
S008
S009
S010
S011
S012 ~ S015
S016
S017
S018
S019
S020 ~ S021
S022 ~ S023
S024
S025
S026
S027
S028 ~ S029
S030
S031 ~ S063
S064
S065
S066
S067
S068
S069
S070
S071
S072
S073 ~ S079
S080
S081
S082
S083 ~ S084
S085
S086 ~ S087
S088
S089 ~ S103
S104 ~ S111

Status Signal S-Bit Description


Send out square wave signal with 0.75 sec ON, 0.25 sec OFF
Reset key
Cycle start key
None pre-program and ending-program
Reserved
Send out square wave signal with wave period = 0.10 sec.
Send out square wave signal with wave period = 0.25 sec.
Send out square wave signal with wave period = 0.50 sec.
Send out square wave signal with wave period = 1.00 sec.
Reserved
Error code strobe
Key strobe
Key strobe for key being pressed twice in 0.5 sec
Function key signal
Cursor up key, Cursor down key
Page up key, Page down key
M-code strobe
T-code strobe
S-code strobe for spindle speed
Man / Machine ENTER signal
Reserved
Signal when spindle servo motor being in-position or when Gridpoint found. (S030 = 1, Flag for spindle HOME position. )
Reserved
X-axis motor running
Y-axis motor running
Z-axis motor running
A-axis motor running
B- axis motor running
C- axis motor running
U-axis motor running
V- axis motor running
W- axis motor running
Reserved
Program execution in process
Spindle speed lower than 60 RPM
Spindle rpm reach
Reserved
Stop signal of spindle
Reserved
X/Y/Z/A/B/CU/V/W-axis Servo motor in motion
Reserved
Status signals from PC or Man / Machine interface (Easyview)
5 - 2

5 Interface Between CNC & PLC

S-Bit
Number
S112 ~ S119
S120
S121 ~ S122
S123
S124
S125
S126
S127
S128 ~ S159
S160
S161
S162
S163
S164
S165
S166
S167
S168
S169 ~ S207
S208
S209
S210
S211
S212
S213
S214
S215
S216

Status Signal S-Bit Description


Reserved
Battery doun signal
Reserved
Signal for linking to PC
Reserved
Hardware interrupt signal
Key strobe for key being pressed down continuously
Signal for ladder simulation
Reserved
Home signal for X-axes respectively (Machine coordinate = 0)
Home signal for Y-axes respectively (Machine coordinate = 0)
Home signal for Z-axes respectively (Machine coordinate = 0)
Home signal for A-axes respectively (Machine coordinate = 0)
Home signal for B-axes respectively (Machine coordinate = 0)
Home signal for C-axes respectively (Machine coordinate = 0)
Home signal for U-axes respectively (Machine coordinate = 0)
Home signal for V-axes respectively (Machine coordinate = 0)
Home signal for W-axes respectively (Machine coordinate = 0)
Reserved
X-axis traverse execution signal, when C208 01, S208 = 1
Y-axis traverse execution signal, when C209 01, S209 = 1
Z-axis traverse execution signal, when C208 01, S210 = 1
A-axis traverse execution signal, when C209 01, S211 = 1
B-axis traverse execution signal, when C208 01, S212 = 1
C-axis traverse execution signal, when C209 01, S213 = 1
U-axis traverse execution signal, when C209 01, S211 = 1
V-axis traverse execution signal, when C208 01, S212 = 1
W-axis traverse execution signal, when C209 01, S213 = 1

5-3

HUST H9C Connecting Manual

5.1.1

S-bit Signal and PLC Cycle Time Chart

Fig 5-1 shows the time chart between the HUST H9C controller and the PLC unit. Note
Bit S017 synchronizes with Bits S000~S023. S000~S031 are all single-pulse signals.
One Shot S-Bit
S000 S031
1

PLC Cycle
Continuous
S032~S096
Key Strobe S017

Fig 5-1 Time Chart Between HUST CNC and PLC


5.1.2

Square Wave Signal with 0.75 sec ON, 0.25 sec OFF (S000)

0.75 sec

Descriptions of S-bits

0.25 sec

Reset Key Strobe (S001)


The controller sends S001 one-pulse high (1) strobe to PLC unit when RESET key is
pressed.

Cycle Start Key Strobe (S002)


The controller sends S002 one-pulse high (1) strobe to PLC unit when CYCST key on
the keyboard is pressed.
To burn program into memory chip through RS232 link, it is to use S002 =1 signal to
trigger C004 (= 1) to complete the burning action. Therefore, care should be taken not to
block S002 signal from triggering C004 when editing PLC under MDI mode.

None pre-program and ending-program(S003)


When R107 (pre-program NO.)R108 (ending-program NO.) =0,system send S003=1
(high)

5 - 4

5 Interface Between CNC & PLC

Square Wave Signal with Wave Period (S008~S011)

ON-TIME

OFF-TIME

Table 5-2 ON/OFF Time for Square Wave Signal


Square Wave Signal
ON TIME (sec)
OFF TIME (sec)
S008
0.10
0.10
S009
0.25
0.25
S010
0.50
0.50
S011
1.00
1.00

CNC Control Unit Alarm Signal (S016)


The controller sends Bit S016 one-pulse high (1) strobe to inform PLC unit when any
alarm occurs.

Key Strobe (S017)


The controller sets Bit S017 one-pulse high (1) strobe to inform PLC unit when any key
on HUST keyboard is pressed.

Key Strobe for Key Being Pressed Twice in 0.5 sec (S018)
When a key on the keyboard is being pressed twice within 0.5 seconds, the controller
send S018 = 1 one-pulse to PLC.

Cursor Up Key Strobe (S020),

Cursor Down Key Strobe (S021)

The controller sets Bit S020 one-pulse high (1) strobe to inform PLC unit when
CURSOR Up key is pressed. Bit S021 will be one-pulse high (1) when CURSOR Down
key is pressed.

Page Up Key Strobe (S022),

Page Down Key Strobe (S023)

The controller sets Bit S022 one-pulse high (1) strobe to inform PLC unit when PAGE Up
key is pressed. Bit S023 will be one-pulse high (1) when PAGE Down key is pressed.

M-, T- and S-Code Strobe (S024~S026)


When an M-code is being executed in a part program, the controller will send S024 = 1
signal to PLC.
When a T-code is being executed in a part program, the controller will send S025 = 1
signal to PLC.
5-5

HUST H9C Connecting Manual

When a S-code is being executed in a part program, the controller will send S026 = 1
signal to PLC.
Note that the CNC system defined M-codes, such as M00, M01, M02, M30, M98 and
M99 will NOT send S024 = 1 to PLC.

Signal for Spindle Motor In-position or When Grid-point Found (S030)


When C117=1, the spindle motor is being controlled in a closed loop and tollowing two
conditions exist for S030 signal.
1. If C116=1, the spindle motor will start searching for the GRID point on the encoder.
The direction and the speed of motor rotation will base on the setting of C118 (0/1 =
Normal/ Reverse) and R133. When the GRID point is found, the CNC controller
will send S030 =1 signal to PLC to trun off C116, i.e. C116=0.
2. If C119=1, the spindle motor will rotate a fixed angle to be In-position.The direction
of motor rotation will base on the setting of C118 (0/1 = Normal/ Reverse) When the
motor is In-position, the CNC controller will send S030 =1 signal to PLC to trun off
C119, i.e. C119=0

Signals for X/Y/Z/A/B/CU/V/W axis Servo Motor Running Status (S064-S072)


When X-axis motor running, S064=1 to PLC.
When Y-axis motor running, S065=1 to PLC.
When Z-axis motor running, S066=1 to PLC.
When A-axis motor running, S067=1 to PLC.
When B-axis motor running, S068=1 to PLC.
When C-axis motor running, S069=1 to PLC.
When U-axis motor running, S070=1 to PLC.
When V-axis motor running, S071=1 to PLC.
When W-axis motor running, S072=1 to PLC.

In Process Status Bit (S080)


Whenever HUST control unit is executing a part program including option stop, signal
S080 = 1 will be sent out to PLC.

Spindle Motor Speed Less Than 60 RPM (S081)


S0811 signal will be sent to PLC when spindle motor speed is less than 60 RPM.

Rotating Signal for Spindle Motor (S085)


S085=1 signal will be sent to PLC when spindle motor is rotating (in motiom).

Signals for Servo Motor Running Status (S088)


When one or more of the four axis motors (X/Y/Z/A/B/C-axis) are moving (in motion),
the CNC will send the signal S088=1 to PLC.

5 - 6

5 Interface Between CNC & PLC

Key Signals from PC or Easyview (S0104~S111)


When the special key that was designed on PC or Easyview is pressed, a signal is sent
through RS232 to the controller which will send the status bits S104~S111 (=1) to PLC.

Battery Down Signal(S120)


If the battery BT1 is down, the controller displays ERROR 30 BATT. Low and sends
S120=1 signal tp PLC

RS232 Linkage Signal (S123)


When CNC controller established linkage with PC through RS232, the CNC will send
S123=1 signal to PLC.

Hardware Interrupt Signal(S125)

When C110=1 PLC interrupt function is enabledS125=1 (high)

Key Strobe for Key Being Pressed Down and Hold Down (S126)
When a key is pressed down and hold down, the controller will send S126 = 1 to PLC.
When key is released, S126 = 0.

Ladder Simulation Mode (S127)


S127 =1 will be sent to PLC when a ladder program edited in PC is being simulated
from the CNC controller.

X/Y/Z/A/B/CU/V/W - axes Home Signal at Machine Coordinate = 0 (S160~S168)


When the tool is at X-axis home location (machine coordinate X=0), S160 = 1.
When the tool is at Y-axis home location (machine coordinate Y=0), S161 = 1.
When the tool is at Z-axis home location (machine coordinate Z=0), S162 = 1.
When the tool is at A-axis home location (machine coordinate A=0), S163 = 1.
When the tool is at B-axis home location (machine coordinate B=0), S164 = 1.
When the tool is at C-axis home location (machine coordinate C=0), S165 = 1.
When the tool is at U-axis home location (machine coordinate A=0), S166 = 1.
When the tool is at V-axis home location (machine coordinate B=0), S167 = 1.
When the tool is at W-axis home location (machine coordinate C=0), S168 = 1.

Positioning Execution in PLC (S208-S216)


When execute the X-axis move by PLC, S208=1.
S208=0 when motion completed.
Please consult the illustration of C208
When execute the Y-axis move by PLC, S209=1.
5-7

HUST H9C Connecting Manual

S209=0 when motion completed.


Please consult the illustration of C209
When execute the Z-axis move by PLC, S210=1.
S210=0 when motion completed.
Please consult the illustration of C210
When execute the A-axis move by PLC, S211=1.
S211=0 when motion completed.
Please consult the illustration of C211
When execute the B-axis move by PLC, S212=1.
S212=0 when motion completed.
Please consult the illustration of C212
When execute the C-axis move by PLC, S213=1.
S213=0 when motion completed.
Please consult the illustration of C213
When execute the U-axis move by PLC, S214=1.
S214=0 when motion completed.
Please consult the illustration of C214
When execute the V-axis move by PLC, S215=1.
S215=0 when motion completed.
Please consult the illustration of C215
When execute the W-axis move by PLC, S216=1.
S216=0 when motion completed.
Please consult the illustration of C216
PS 1. R180R188R160R168 setting range:+32767-32767.
2. When C223=0,
the value is the position of absolute coordinate in R180R188.
Default #11800=10
#11800 setting range1~1000.
3. When C223=1,
the value is the position of incremental coordinate in R180R188.
Default #11800=1
#11800 setting range1.

5 - 8

5 Interface Between CNC & PLC

5.2

PLC Command Signal, C-Bits

A C-bit is a command signal from the PLC to the HUST controller for CNC functional
control. The C-bits for HUST H9C ontroller are shown in Table 5-3 and their meanings
and applications are discussed in the following sections.
Table 5-3 HUST H9C Series Command C-Bits
C-Bit
Number
C000
C001
C002
C003
C004
C005
C006
C007
C008
C009
C010
C011
C012~C013
C014
C015
C016
C017
C018~C019
C020~C021
C022~C023
C024
C025
C026
C027
C028
C029
C030
C031
C032
C033
C034
C035
C036
C037

C-Bit Description
Machine Lock/Feed Hold
Reset
Emergency Stop
Reserved
Cycle Start
Program No. Selection by INPUT key
Single Block
NC Alarm & Stop NC Command
Background edit
Program NO. Selection by external I/O
Testing the second software limit
Program Restart 1
Program restart 2. After jumping to other program, restart from where
the program execution was interrupted
Program block restart command 3
Program Dry Run
Reserved
When the program restarts, it directly executes the contents below the
single block of restart.
Reserved
Cursor up / Cursor down command
Page up / Page down command
Bit search function in Edit mode (the first bit in the single block only)
The program reading function is established with use of V10932 and
V13449.
Option stop
Option skip
Speed deceleration selection for G31 Skip function
G31 velocity changes from MFO
Counter status (On/Off) command
Ladder simulation
M-code finish signal from PLC to CNC
T-code finish signal from PLC to CNC
S-code finish signal from PLC to CNC
Reserved
Round corner non-stop operation
LCD delayed display in accordance with the value in R128
5-9

HUST H9C Connecting Manual

C-Bit
Number
C038~C039
C040
C041
C042~C048

C-Bit Description

Reserved
The Auto Teach mode is established
The dynamic software limit function is established
Reserved
When the fill grid excutes a restart in Auto mode, the program will hold
C049
the display.
When the fill grid is in Auto mode, the cursor will indicate the current
C050
program line number being executed.
C051
Reserved
C052
Simulating the input signal of the spindle ENCODER (for testing)
C053~C055 Reserved
C056
MPG hand-wheel test mode
C057
Return to the last program block where execution was interrupted
C058
Program EDIT mode disabled
C059
MCM EDIT mode disabled
C060
Setting a relative coordinate
Copy function
C061
C062
Reserved
C063
Machine Origin (HOME) execution command
C064
X-axis HOME limit switch signal
C065
Y-axis HOME limit switch signal
C066
Z-axis HOME limit switch signal
C067
A-axis HOME limit switch signal
C068
B-axis HOME limit switch signal
C069
C-axis HOME limit switch signal
C070
U-axis HOME limit switch signal
C071
V-axis HOME limit switch signal
C0723
W-axis HOME limit switch signal
C070~C078 Reserved
C079
Making copy of a program file
C080
Set the current program position as work coordinate ORIGIN for X-axis
C081
Set the current program position as work coordinate ORIGIN for Y-axis
C082
Set the current program position as work coordinate ORIGIN for Z-axis
C083
Set the current program position as work coordinate ORIGIN for A-axis
C084
Set the current program position as work coordinate ORIGIN for B-axis
C085
Set the current program position as work coordinate ORIGIN for C-axis
C086
Set the current program position as work coordinate ORIGIN for U-axis
C087
Set the current program position as work coordinate ORIGIN for V-axis
C088
Set the current program position as work coordinate ORIGIN for W-axis
C089~C095 Reserved
C096
Clear current program&machine coordinate on X-axis to zero (0)
C097
Clear current program&machine coordinate on Y-axis to zero (0)
C098
Clear current program&machine coordinate on Z-axis to zero (0)
C099
Clear current program&machine coordinate on A-axis to zero (0)
C100
Clear current program&machine coordinate on B-axis to zero (0)
5 - 10

5 Interface Between CNC & PLC

C-Bit
Number
C101
C102
C103
C104
C105~C110
C111

C-Bit Description

Clear current program&machine coordinate on C-axis to zero (0)


Clear current program&machine coordinate on U-axis to zero (0)
Clear current program&machine coordinate on V-axis to zero (0)
Clear current program&machine coordinate on W-axis to zero (0)
Reserved
Spindle following error and position zeroing
The function of displaying the servo spindle number is established (the
C112
following error is compensated to the spindle position)
C113~114 Reserved
C115
Program simulation mode, no V-Command output & no encoder feedback
C116
Spindle motor looking for GRID point (Closed-loop control)
C117
Spindle motor under closed-loop control
C118
Spindle motor rotational direction control (Closed-loop control)
C119
Set a specific angular position for spindle (Closed-loop control)
C120
Select program number from External I/O device
C121
Set spindle speed in percent from external I/O device
C122
Reserved
C123
Set work coordinate system (G54~G59)
C124
When display the I/O page, the value of key board not display.
C125
M, T, and S-code to be executed in synchronization
C126
Reserved
Executive after the Calculated with R125
C127
C128
To enable X-axis data input when in TEACH mode
C129
To enable Y-axis data input when in TEACH mode
C130
To enable Z-axis data input when in TEACH mode
C131
To enable A-axis data input when in TEACH mode
C132
To enable B-axis data input when in TEACH mode
C133
To enable C-axis data input when in TEACH mode
C134
To enable U-axis data input when in TEACH mode
C135
To enable V-axis data input when in TEACH mode
C136
To enable W-axis data input when in TEACH mode
C137~C142 Reserved
When TEACH mode is enabled, Relative coordinates generated
C143
C144
To enable digital readout mode for X-axis
C145
To enable digital readout mode for Y-axis
C146
To enable digital readout mode for Z-axis
C147
To enable digital readout mode for A-axis
C148
To enable digital readout mode for B-axis
C149
To enable digital readout mode for C-axis
C150
To enable digital readout mode for U-axis
C151
To enable digital readout mode for V-axis
C152
To enable digital readout mode for W-axis
C153~C159 Reserved
C160
Hardware limit signal for X+ axis
C161
Hardware limit signal for X- axis
5 - 11

HUST H9C Connecting Manual

C-Bit
Number
C162
C163
C164
C165
C166
C167
C168
C169
C170
C171
C172
C173
C174
C175
C176
C177
C178~C191
C192
C193
C194
C195
C196
C197
C198
C199
C200
C201~C207
C208
C209
C210
C211
C212
C213
C214
C215
C216
C217~C219
C220
C221

C-Bit Description

Hardware limit signal for Y+ axis


Hardware limit signal for Y- axis
Hardware limit signal for Z+ axis
Hardware limit signal for Z- axis
Hardware limit signal for A+ axis
Hardware limit signal for A- axis
Hardware limit signal for B+ axis
Hardware limit signal for B- axis
Hardware limit signal for C+ axis
Hardware limit signal for C- axis
Hardware limit signal for U+ axis
Hardware limit signal for U- axis
Hardware limit signal for V+ axis
Hardware limit signal for V- axis
Hardware limit signal for W+ axis
Hardware limit signal for W- axis
Reserved
Clear following count to 0 for X axis
Clear following count to 0 for Y axis
Clear following count to 0 for Z axis
Clear following count to 0 for A axis
Clear following count to 0 for B axis
Clear following count to 0 for C axis
Clear following count to 0 for U axis
Clear following count to 0 for V axis
Clear following count to 0 for W axis
Reserved
X-axis. Rapid Positioning signal
Y-axis. Rapid Positioning signal
Z-axis. Rapid Positioning signal
A-axis. Rapid Positioning signal
B-axis. Rapid Positioning signal
C-axis. Rapid Positioning signal
U-axis. Rapid Positioning signal
V-axis. Rapid Positioning signal
W-axis. Rapid Positioning signal
Reserved
In Edit or Teach mode, Insert and Input functions are not used Completely
In Edit or Teach mode, the Insert function is not used
Input method of the milling machine tool compensation data incremental
C222
/ absolute
C223
Rapid Positioning (increasing value) signal
C224~C225 G28, G29, G30 mode
C226
To revise MCM parameter value in PLC (One Pulse )
C227
When C227=1, the value of variables input / output blocked (locked)
5 - 12

5 Interface Between CNC & PLC

C-Bit
Number
C228
C229
C230

C-Bit Description

JOG mode enable command


G01 feed speed adjustment by MPG handwheel, max 300%
Enable the function of G01 feed speed adjustment by MPG handwheel
When C231=10, Load the program that was stored in the
C231
EPROM/FLASH-ROM
C232
Reserved
C233
When C233=10, Clear G54 work coordinates (MCM #1~#4=0)
C234
Reserved
(MPG TEST MODE) Program simulation using MPG handwheel.
C235
Simulate handwheel input the pulse signal.
C236
User defined keyboard keys.(Type 1)
C237
Use the second set of pins of handwheel
C238~C239 Reserved
C240
When the program restarts, M.T.S and G04 commands are skipped.
To set the rotational axis, each rotational coordinate is not cleared to
C241
zero.
C242
MPG hand-wheel feed interrupt mode
C243
Easyview or LCD screen in sleep mode
C244
Suppressing alarm ERROR-2 when following count > 4096
C245
User defined keyboard keys. (Type 2)
C246
Reserved
C247
LCD display disabled
C248~C249 Reserved
When the fill grid displays, the cursor will jump out of the fill grid.
C250
When functions of G40/G41/G42 are established, the tool compensation
C251
will be corrected linearly at the tangent pin.
C252
Enable milling machine function
C253
Reserved
C254
Enable lathe machine function
C255
User defined keyboard function output

5 - 13

HUST H9C Connecting Manual

5.2.1

C-Bit explanation

Machine Lock/FEED-HOLD (C000)


C000 = 1 (high),
C000 = 0 (low),

All machine tool operation stops.


Machine tool operation in process.

If bit C000 is set high (1), control unit will stop all CNC operations. It will remain
stopped until C000 becomes low again. The relationship between C000 and the machine
motion is shown as below.
C000 = 1
C000 = 0
Machine on

Machine Lock On

Motion Stopped

C000 = 0

Motion Resumed

Fig 6-2 Relationship between C000 Signal and Machine

Effect of FEED-HOLD on output control command G11


The Command Format: G11 Pxxx Lyyy
1. If yyy= 0 or void, this command is to turn ON the output specified by xxx which
can be turned OFF either by RESET or by G11 P-xxx. FEED-HOLD will not change
the status of output xxx
2. If yyy= any number, this is to turn ON output xxx which can be turned OFF by
Feed-Hold. It will remain OFF as long as Feed-Hold is on. When Feed-Hold is
released, output xxx will be back ON. Use RESET or G11 P-xxx to turn output
xxx OFF.
Please refer to HUST H6C Operation Manual for more information on G11.

5 - 14

5 Interface Between CNC & PLC

G11 Pxxx Lyyy with yyy=0 or void


RESETor
Use G11 P-xxx
Output
FEED-HOLD

C000=1

G11 Pxxx Lyyy with yyy=any value


RESETor
Use G11 P-xxx

C000=1
Output OFF

Output

FEED-HOLD

C000=0
Output On

C000=1
C000=0

RESET (C001)
C001 = 1 (high),
C001 = 0 (low),

Fig 6-3

RESET the whole system to initial status.


RESET function is cleared.

Emergency Stop (C002)


C002 = 1 (high),
C002 = 0 (low),

Controller reset and machine stops immediately.


No action.

Bit C002 informs the control unit to execute emergency stop. When bit C002 is set high
(1), the control unit is reset and emergency stop is applied to the machine. Emergency
stop signal turns off the servo ready signal. Refer to Section 5.4 for suggested circuit
connection. When the problem that activated an emergency stop has been resolved,
please reset the control unit and execute HOME process before normal operation.

Cycle Start (C004)


C004 = 1 (high),
C004 = 0 (low),

Start program execution. (one pulse)


No response.

Bit C004 informs the control unit to start program execution. However, Cycle-Start
signal (C004) is ignored when:
1.
2.
3.
4.

The control unit is already in "IN PROCESS" mode.


The control unit is not at AUTO, SINGLE, MDI, or TAPE mode.
Emergency stop signal (C002) is at high (1)
The control unit is in alarm state. (C007=1)

Program No. Selection by INPUT key (C005)


Place controller under PRNO Mode:
5 - 15

HUST H9C Connecting Manual

1. R100=0; system mode = 0


2. R202=4; display program listing
3. Move cursor to the desired program number, press ENTER to complete the selection.
Note: A. Cursor Right / Left key for program number to increase / decrease by 100.
B. When program listing is being displayed, program footnote can be entered.

Single Block (C006)


C006 = 1 (high),
C006 = 0 (low),

SINGLE block execution mode selected.


Function OFF.

When C006 = 1, the current execution is in SINGLE block mode. Press CYCST key to
execute. If AUTO and SINGLE modes are selected at the same time, the SINGLE mode
has higher priority than the AUTO mode. Operation can be changed to MDI or JOG by
the mode selection signal under single block state. Fig 6-4 is a time chart for SINGLE
block execution.
on
Auto Mode off
on

Single Mode
C006

C006 off
on

Cycle
Start

off

on
off

BLK1
BLK2
Single Mode

off

Continue
Auto Mode

Fig 6-4 Time Chart for Single Block Execution

NC Alarm & Stop NC Command (C007)


C007 = 1 (high),
C007 = 0 (low),

NC alarm is ON.
NC alarm is OFF.

Bit C007=1 to inform the CNC unit a machine problem has been detected. When the
external device encounters any trouble, such as spindle servo alarm, these alarm signals
can be used, through input points, to inform the control unit to stop execution by setting
C007 high (1). LCD screen displays ERROR 37 NC ALARM. When the problem is
resolved, RESET the machine before restart the program.

Background Edit (C008)

Program NO. Selection by external I/O (C009)

Testing the second software limit (C010)

5 - 16

5 Interface Between CNC & PLC

When C010 = 1, the testing of the second software limit function is established.
When the first sets of X/Y/Z/A/B/C/U/V/W softwares are positive limits,
parameters are Item Nos 581~589.
When the first sets of X/Y/Z/A/B/C/U/V/W softwares are negative limits,
parameters are Item Nos 601~609.
When the second sets of X/Y/Z/A/B/C/U/V/W softwares are positive limits,
parameters are Item Nos 621~629.
When the second sets of X/Y/Z/A/B/C/U/V/W softwares are negative limits,
parameters are Item Nos 641~649.

machine
machine
machine
machine

Table 5-3 Software limit positions corresponding parameters


First software limit
Second sofeware limit
Axial
Positive
Negative
Axial
Positive
Negative
direction
limit
limit
direction
limit
limit
X
#14581
#14601
X
#14621
#14641
Y
#14582
#14602
Y
#14622
#14642
Z
#14583
#14603
Z
#14623
#14643
A
#14584
#14604
A
#14624
#14644
B
#14585
#14605
B
#14625
#14645
C
#14586
#14606
C
#14626
#14646
U
#14587
#14607
U
#14627
#14647
V
#14588
#14608
V
#14628
#14648
W
#14589
#14609
W
#14629
#14649

Program Restart-1 (C011)


C011 = 1 (high), Program Restart mode ON.
If the program execution is interrupted for any reasons, the Restart function (C011=1 )
allows you to resume the execution from the program block where the program was
interrupted. HUST H6C does not provide this function key on the keyboard and it must
be processed through PLC.
Follow the steps below to restart the interrupted program:
1.
2.

Press RESET. Use MPG to move tool away. If the interruption was caused by Emstop or servo alarm (Error 2), execute HOME, then RESET.
Press user installed [Restart] key to set C011 = 1 in PLC as follow.
(
I023

3.

C011

In AUTO mode, press CYCST key to restart. At the end of M02 or M30, the restart
function will be automatically cleared.

5 - 17

HUST H9C Connecting Manual

Note that the M, T, S-code in the previously executed program blocks prior to program
interruption will be re-executed during restart operation.
Example:
(See Fig 6-5)
Assuming that the program was interrupted at block N40. When restart function is
activated, the controller will calculate the coordinate change from N10 to N30, then
move the tool to the end of N30 and continue the program execution from there.
N10 S200
N20 G0 X50. Y100.
N30 G1 V-20. F200.
N40 X60. V-20.
N50 V-20.000
N60 X80. V-20.
N70 G0 X250. Y150.
N80 M2
Y

.....Program interrupted here and restart from here

Restart
Interrupted

N30
N40
N50

N60

X
Fig 5-5 Program restart
When RE-START key is pressed (See Fig 6-5}, then [AUTO] and [CYCST], the CNC
controller will calculate the executed distance from N10 to N30 and the cutting tool will
then move to that point, from where the program execution will be continued.

Program Restart 2 (C012~C013)


The command Bits C012~C013 are also used to restart the program from where the
execution was interrupted. They are applied to the case when you interrupt the execution
of the 1st program and jump to the 2nd program. Once you finish the 2nd program, you
can use C012~C013 to go back to the 1st program and restart from where it was left. The
procedures are as follows:
1. When program #1 is interrupted, activate C012=1 to store the interrupted block
number.
2. Jump to the 2nd program or do some other task such as JOG function.
3. Once finished the 2nd program, use PRNO Or PLC to return to program #1.
4. Set C013=1 to read the stored block number in step 1.
5. Set C011=1 (Restart-1).
6. Press CYCST.

Program Restart 3 (C014)


5 - 18

5 Interface Between CNC & PLC

1. In EDIT mode, move cursor to the desired restart block. Use PLC to activate
C014=1.
2. Return to [AUTO] mode, program restart signal ON, C011=1.
3. Press CYCST.

Dry-run (C015)
C015 = 1 (high),

Dry-run mode selected.

When C015=1, the control unit will execute dry run function. The dry run mode can be
set at any time during program execution. When dry run is set, the feed-rate will change
to fast speed at the beginning of next block. When dry run mode is turned OFF
(C015=0), the feed-rate will return to normal cutting speed at the beginning of next
block. Fig 5-6 shows the relationship between dry run mode and normal execution mode.

Auto Mode

Off
Off

Dry run C015


Cycle

On

Off

Off

On
Off

On

Feed Rate
Cutting
Block Execution

Dryrun speed
3

Cutting
6

Fig 5-6 Time-relationship between dry run and normal execution mode

When the program restarts, it will directly execute the contents below the restart
single block, C017
When C0171 (high) and the program restarts, it will not execute the single blocks
before the restart sigle block and the function of direct execution of the contents below
the restart single block is established.
If the program is interrupted in execution due to whatever reasons, and when C017 = 1,
the program will restart (with process of Co11 Bit) and execute from the place where it
is interrupted.
Program example:
N10 S200
N20 G0 X50. Y100.
5 - 19

HUST H9C Connecting Manual

N30 G1 V-20. F200.


N40 X60. V-20.
N50 V-20.000
N60 X80. V-20.
N70 G0 X250. Y150.
N80 M2

The program is interrupted here, it will not


execute the single block before N30 when
it restarts and will directly restart from the
place where it is interrupted.

.....

Interupts here and restarts


from here

N30
N40
N50

N60

X
Fig5-7 Program restart
As shown in the above figure, start the RE-START function, and then execute
AUTO, CYCST, the program will proceed from the original single block
position.

Cursor Up And Cursor Down (C020~C021)


C020 = 0 ~ 1 (Rising edge), the cursor moves up one line.
C021 = 0 ~ 1 (Rising edge), the cursor moves down one line.
Bit C020 informs the control unit to move the cursor one line up. It is effective only at
the moment when the signal (C020) rises from low (0) to high (1). This function can be
controlled by external input to remotely move the cursor. Bit C021 is for Cursor Down
function.

Page Up And Page Down Key (C022~C023)


C022 = 0 ~ 1 (Rising edge), move cursor one page up
C023 = 0 ~ 1 (Rising edge), move cursor one page down
When bit C022 is rising from low (0) to high (1), move cursor one page up. This
function can be controlled from external input. Bit C023 is for Page-down function.

Bit searching function in Edit mode (First bit only) (C024)


C024=1 (1 PULSE)
In Edit mode and C24=1, it will search the first bit single block that was input in the
input area.
5 - 20

5 Interface Between CNC & PLC

EX
O000
G1 X50.
X50.Y50.
N1 X70.Y60.
Y100.
M30
When you key in X in the input area and C024=1, the cursor will point to the second
block X50.Y50.
When you key in M in the input area and C024=1, the cursor will jump and point to the
fifth single block M30.

The program reading function is established with use of V10932 and V13449 (C025)
V13449: Designates the program number for this function.
V10932: Designates the program single block number for this function (the minimum
single block number is 1).
Before C025 is triggered ON with PLC, the values of V13449 and V10932 shall first be
designated. When the function C025 is successfully executed, the relevant program
contents that are read will be stored in the following variables:
#13400

#13401#13426
#13448

----The system sends the message whether the letters A~Z in the
single block are used.
BIT1 A 0= not use 1= use
BIT26 Z
----The system sends the contents of the letters A~Z.
----The system sends the message whether the letters A~Z in the
single block use #.
BIT1 A 0= not use 1= use
BIT26 Z

Example: G01 A100 B#100 C#-100


Then,
13400=0x0000 000E (1110B)
13401=100
13402=100
13403=-100
13448=0x0000 000C (1100B)
Note:
R126 BIT27=0 When the function C025 is in execution, it reports Error when the
designated single block number is incorrect. (ERROR18.M).
BIT27=1 When the function C025 is in execution, it does not report Error when the
designated single block number is incorrect.

Option Stop (C026)


C026 = 1 (high),

Option Stop is enabled.


5 - 21

HUST H9C Connecting Manual

C026 = 0 (low),

Option Stop is disabled.

If C026 is set low (0), M01 block will be ignored during program execution. If C026 is
set high (1), M01 block will stop program execution until CYCST is pressed again.

Option Skip (C027)


C027 = 1 (high),
C027 = 0 (low),

Option Skip function is ON.


Option Skip function is OFF.

If C027 is set to 1, the block labeled with "/1" will be skipped during program execution.
If C027 = 0, the block labeled with "/1" will be executed.

Speed Deceleration Selection for G31 Skip Function (C028)


Bit C028 informs the control unit how to decelerate the servo motor when G31 skip
function is encountered in the program. C028 is used in conjunction with the value in
R190. Please refer to Operation Manual section 3.13 for G31 function
C028 = 0 (low),
C028 = 1 (high)
C028 = 1 (high)
C0280
R190 Ignored

servo motor ignores the value in R190 and decelerates linearly to zero.
& R190 = 0, servo motor speed jumps to zero.
& R190 0, servo motor will stop in a distance = value in R190.
Feed-rate

G31 ON, Normal deceleration

T
C0281
R1900

Feed-rate
Motor starts

G31 ON, Motor speed jumps to 0.

C0281
R1900

Motor starts
Feed-rate

G31 ON, motor stops in a


distance = R190
Area R190, must > Distance in
normal deceleration.
T

Motor starts

Fig 6-8 Motor Deceleration with C028 and R190

G31 velocity changes from MFO (C029)

Counter Status (C030)


C030 = 1 (high),
C030 = 0 (low),

System counter ON.


System counter OFF.

5 - 22

5 Interface Between CNC & PLC

PLC Ladder Simulation (C031)


C031 = 1 (high),
C031 = 0 (low),

CNC is ready to accept ladder simulation procedures.


ladder simulation stops.

When C031 = 1, a RAM memory in HUST H6C controller will become available for
user to test his ladder program that was edited in the personal computer. Note that the
user's ladder program should have a line of C031=1 for the simulation to be effective.
Please refer to Chapter 9 of HUST H6C Operation Manual for ladder simulation
procedures.

M-, T-, S-code Command Finish Signal (C032~C034)


C032 = 1 (high),
C033 = 1 (high),
C034 = 1 (high),

M-code command is finished.


T-code command is finished.
S-code command is finished.

When you use an M-code to do work on an external device, it normally takes some
times for the external device to finish the work. When the work is finished, let C032=1
in your PLC. The H6C controller must receive this finish code for it to continue
executing the next block. T-code and S-code work the same way. The M-code finish
signals are effective for the range of M003~M499.

Round Corner Non-stop Operation (C036)


C036 = 1 (high),

Round Corner Non-stop Operation Between Blocks ON.

When the tool motion changes from one direction (block) to another, it will produce a
sharp corner and the motors will decelerate and accelerate at the intersection. This
condition will produce an undesirable effect for some industrial machinery such as glue
machine, flame or laser cutting machine. To overcome this problem, set C036=1 to
produce a round corner and the motors will also run continuously when cornering with a
cutting speed specified by the programmed federate (F).
Note: C036 in NOT fot G00.

LCD Delayed Display (C037)


Works in conjunction with the value in R128
(Initial value=0, internal default = 16 blocks)
If there is an obvious interruption during program executionm with C037 = 1, the LCD
display will be turned off if the CNC internally pre-fetched program block number is
smaller than the value in R128. The LCD display will be turned back on when the CNC
internally pre-fetched program block number becomes greater than the value in R128.

The Auto-Teach mode is established (C040)


When C040=1 (high signal), the Teach mode is established.
5 - 23

HUST H9C Connecting Manual

When the slope of angle between the current teach route and the old route is greater than
the setting of Parameter Item No. 535, the system will automatically store and increase
the single block at the current coordiate point.

The function of dynamic software limit is established (C041)


#11812 setting base axis (reference axis)
=1 X-axis, =2 Y-axis, =3 Z-axis, =4 A-axis, =5 B-axis, =6 C-axis, =7 U-axis, =8 V-axis,
=9 W-axis
#11813 setting limit axis
=1 X-axis, =2 Y-axis, =3 Z-axis, =4 A-axis, =5 B-axis, =6 C-axis, =7 U-axis, =8 V-axis,
=9 W-axis
#11814 setting limit axis direction
=0 the coordinate must be smaller than the software limit
=1 the coordinate must be greater than the software limit
#11815 setting the tool diameter
#11816 the point numbers on the software limit bit curve

When the fill grid restarts the program in AUTO mode, it will hold the display of
the program (C049)
When C049=1 and executing restart in AUTO mode, the fill grid will hold the display of
the program.

When the fill grid is in the automatic state, the cursor will indicate the program
number being execute (C050)
When C050=1 and in auto execution, when the fill grid displays the program, the cursor
will automatically move to the single block number being executed.

Simulating the input signal of the spindle Encoder (C052)


This C-Bit is used for testing. When the machine uses the feed per rotation, C052 must
not be ON.

MPG Hand-wheel Test Mode (C056)


C056 = 1 (high),
C056 = 0 (low),

MPG Hand-wheel Test Mode ON.


MPG Hand-wheel Test Mode OFF.

The advantage of MPG test is that the user can test the program by doing actual cutting
using a MPG hand-wheel speed. Any errors in the program can be detected and the
product inspected before making mass production.

5 - 24

5 Interface Between CNC & PLC

When MPG Hand-wheel Test Mode is on, the feed-rate is controlled by the speed of
hand-wheel and the MFO% knob setting. As such, the potential machine collision under
normal cutting speed can be avoided. Refer to Sec. 8.9 of Operation Manual for MPG
hand-wheel test.
Note: If the handwheel operates in the reversed direction, the program execution will
NOT follow in a reversed order.

Return to The Last Program Block Where Execution Was Interrupted (C057)
C057 = 1 (high),
C057 = 0 (low),

Return to the last program block function ON.


Return to the last program block function OFF.

When this function is turned on in EDIT mode, the cutting tool will return to the last
program block where the program was interrupted. This function is also effective in
TEACH mode.

Program EDIT and MCM EDIT Function Disabled (C058~C059)


C058 = 1 (high),
C059 = 1 (high),

Program EDIT mode is disabled.


MCM parameter EDIT mode is disabled.

Setting a relative coordinate, C060


When in JOG & Home modes, R157 will be use for setting the axial direction.
When C06001 (positive-edge status) and R1571, select the X-axis.
When C06001 (positive-edge status) and R1572, select the Y-axis.
When C06001 (positive-edge status) and R1574, select the Z-axis.
When C06001 (positive-edge status) and R1578, select the A-axis.
When C06001 (positive-edge status) and R15716, select the B-axis.
When C06001 (positive-edge status) and R15732, select the C-axis.
When C06001 (positive-edge status) and R15764, select the U-axis.
When C06001 (positive-edge status) and R157128, select the V-axis.
When C06001 (positive-edge status) and R157256, select the W-axis.
Set the relative coordinate of each axis with R157 and use of #9780 ~ #9788.
Setting value range: +32767 to -32767
Example: C06001 (positive-edge status)
R157=1, #9780=10000 the decimal point format of the controller is 4/3 format.
X-axis relative coordinate (#12101)10.000

Copy Function (C061)

HOME Execution Command (C063)


HOME Limit Switch Signals for X/Y/Z/A/B/C-axis (C064~C072)
5 - 25

HUST H9C Connecting Manual

C063 = 1 (high),
C064 = 1 (high),
C065 = 1 (high),
C066 = 1 (high),
C067 = 1 (high),
C068 = 1 (high),
C069 = 1 (high),
C070 = 1 (high),
C071 = 1 (high),
C072 = 1 (high),

execute HOME cycle.


when X-axis limit switch is touched.
when Y-axis limit switch is touched.
when Z-axis limit switch is touched.
when A-axis limit switch is touched.
when B-axis limit switch is touched.
when C-axis limit switch is touched.
when U-axis limit switch is touched.
when V-axis limit switch is touched.
when W-axis limit switch is touched.

If C063 is set high (1), the CNC controller will execute HOME cycle according to the
axis selected by R232 and the direction by MCM #281~289. Then, the controller will
move the tool to find the HOME position according to the following steps -- Use X-axis
(R232-1) for explanation. Also refer to H6C Operation Manual Chap 7.
Step 1- The tool will go toward HOME position until the limit switch is touched
(C064 = 1), the machine then stops. During this process the feed-rate is
controlled by MCM #301 and the direction by MCM #281.
Step 2- The tool will go backward at a feed-rate equal to 1/4 of the speed in Step 1
until C064 = 0 (low). The servo motor will decelerate to a stop.
Step 3- The tool will continue going backward at the HOME GRID speed as set by
MCM #321 to look for the encoder index. Once the encoder index is detected,
the motor stops and the HOME cycle is completed.
To find HOME position for Y/Z/A-axis, the same procedures described above apply.
Fig 5-9 is a typical HOME execution cycle.
Tool
Speed

Touching Home Limit Switch


Step 1

Step3

Step2

Found Encoder Index

Tool

Leaving Home Limit Switch

Fig 5-9 Typical HOME Execution Cycle

Making Copy of A Program File (C079)


R102: The desired program number to be copied.
R103: The desired program number to copy into.
C072= 1 (one shot) to activate copying process.
5 - 26

5 Interface Between CNC & PLC

Example: R102=2, R103=4.


When C072=1 (one shot), Program #2 content will be copied into Program #4.

Use the Current Program Position as Working Coordinate (C080~C088)


C123 = 1~0 (falling edge), use the data in MCM parameters as the current
coordinate.
C080 = 1~0 (falling edge), use the current program position for X-axis as the
coordinate origin.
C081 = 1~0 (falling edge), use the current program position for Y-axis as the
coordinate origin.
C082 = 1~0 (falling edge), use the current program position for Z-axis as the
coordinate origin.
C083 = 1~0 (falling edge), use the current program position for A-axis as the
coordinate origin.
C084 = 1~0 (falling edge), use the current program position for B-axis as the
coordinate origin.
C085 = 1~0 (falling edge), use the current program position for C-axis as the
coordinate origin.
C086 = 1~0 (falling edge), use the current program position for U-axis as the
coordinate origin.
C087 = 1~0 (falling edge), use the current program position for V-axis as the
coordinate origin.
C088 = 1~0 (falling edge), use the current program position for W-axis as the
coordinate origin.
C1231 0

C080 C0831 0

Coord. Group # by R228

Clear X/Y/Z/A-axis to 0

Use MCM# 1~36

Use the Current Coordinate (G54~G59)

Desired work coord. Selected

Stored in MCM# 1~36

work
work
work
work
work
work
work
work
work
work

When C123 = 1~0 (falling edge) in PLC, it triggers the controller to use the coordinate
group number as stored in R228 with the corresponding data in MCM #1~#36 for work
coordinate system. As shown in Table 5-4, HUST H9C series has 6 work coordinate
systems and the cooresponding work origins are stored in the respective MCM
parameters 1 ~ 109.

5 - 27

HUST H9C Connecting Manual

Table 5-4 H6C Series Work Coordinate


Work Coord. MCM No. Group No. by R228
G54
0
19
G55
1
2129
G56
2
4149
G57
3
6169
G58
4
8189
G59
5
101109
Example: Use G55 as work coordinate
Step 1- Let R228 = 1. (Table 5-4)
Step 2- Set C123 = 10 (falling edge) in PLC. This triggers controller to use G55 as
work coordinate and the data in MCM #21~#29 as G55 coordinate origin.
Bits C080~C088 are also commands to set work coordinate. But they differ from C123
in that they set the current program position as the new coordinated origin and its
machine position will be stored in the appropriate MCM parameters.

Fig 5-10
Example: Use the current position on X-axis X=10.000 as origin, assuming the currnet
work coordinate is G57 and the MCM #61 = 20.000.
Step 1- Let C080 = 1 0 (falling edge).
Step 2- The controller will use the current program position for X-axis as origin, ie X
= 0.000 and the MCM #61 = 10.000.

Clear the Current program and Machine Coordinate to Zero (C096~C104)


C096 = 1, Clear the current program and machine coordinate at current tool position on
X-axis to zero.
C097 = 1, Clear the current program and machine coordinate at current tool position on
Y-axis to zero.
C098 = 1, Clear the current program and machine coordinate at current tool position on
Z-axis to zero.
C099 = 1, Clear the current program and machine coordinate at current tool position
on A-axis to zero.
C100 = 1, Clear the current program and machine coordinate at current tool position on
B-axis to zero.
C101 = 1, Clear the current program and machine coordinate at current tool position
on C-axis to zero.
C102 = 1, Clear the current program and machine coordinate at current tool position
on U-axis to zero.
C103 = 1, Clear the current program and machine coordinate at current tool position on
V-axis to zero.

5 - 28

5 Interface Between CNC & PLC

C104 = 1,

Clear the current program and machine coordinate at current tool position
on W-axis to zero.

C096~C104 are used to clear both program and machine coordinates when the program
is NOT in execution mode. They are not effective when program execution is in process.

Spindle following error and position zeroing, C111


When C111=1, the system will execute the spindle following error and the position
zeroing.

The spindle number indicating function is established, C112


When C112=1, the closed-loop spindle number indicating function is established.

Program simulation mode, no V-Command output & no encoder feedback (C115)


C115=1,
feedback

Program simulation mode with no V-Command output nor encoder

Spindle Motor Control (C116 ~ C119 , C121)


Spindle motor searching for GRID point (C116)
Spindle motor under closed-loop control (C117)
Spindle motor rotational direction control (C118}
Angular set position for spindle motor (C119)
The spindle motor can be controlled in 2 ways:
1. Closed-loop (C117=1) has encoder feedback that is capable to control the motor
position, rotation speed and the direction.
2. Open-loop (C117=0) has NO encoder feedback that is capable to control motor
rotation speed and the direction only.
Relevant MCM parameter settings:
MCM#507 Spindle motor acceleration / Deceleration time (msec)
MCM#509 Number of pulse for spindle motor encoder feedback
MCM#510 Spindle motor RPM at 10-Volt
#10892 spindle turning one circle values (Default value=360.000)
Axial setting for spindle use register R238
R238 = 1, X-axis as spindle.
R238 = 2, Y-axis as spindle.
R238 = 3, Z-axis as spindle.
R238 = 4, A-axis as spindle.
R238 = 5, B-axis as spindle.
R238 = 6, C-axis as spindle.
R238 = 7, U-axis as spindle.
R238 = 8, V-axis as spindle.
R238 = 9, W-axis as spindle.
5 - 29

HUST H9C Connecting Manual

Note: Use of 2 axes as spindle at the same time is NOT allowed.


Closed-loop Mode, C117=1
1. Looking for GRID Point To Mark It As HOME Position
Setp 1 - Set R238 for desired axis for spindle and C117=1.
Step 2 - Set spindle rotation direction C118=0/1 (normal/reverse) and R133 (spindle
rpm while looking for GRID signal)
Step 3 - Set C116 = 1 (ON). Spindle starts looking for GRID
Step 4 - GRID signal received (S030 = 01), C116=0. Spindle motor stops. The
Looking for GRID point to mark it as HOME process is completed.
The Grid signal comes
in, (S030=0->1), the
motor stops, C116 is
OFF, returning to
HOME is completed.

R238=2, the Y-axis is the


spindle, C116=1, the spindle
starts to rotate.

Fig 5-11
2. To Rotate Spindle Motor Continuously Under Manual Mode
Setp 1 - Set R238 for desired axis for spindle and C117=1.
Step 2 - Set spindle rotation direction C118=0/1 (normal/reverse) and R132 for
spindle speed under manual mode
Step 3 - Set C121 = 0 (OFF). Use R224 to adjust spindle speed in %.
Set C121 = 1 (ON). Use R225 to adjust spindle speed in %.
(When C121 = 1, fill R224 with 100 or the spindle speed may be affected.)

R238=2, -axis as spindle


C121=1, R225=80,
R132=3000rpm
Spindle starts to rotate
Speed= 300080%= 2400 rpm

R225=0
Spindle stops

Fig 5-12
3. Spindle Control Under AUTO Mode and SINGLE Mode
Note: C119 = 1, Angular HOME position function ON
C119 = 0, Control spindle rotation only
5 - 30

5 Interface Between CNC & PLC

Spindle Speed Control 1:


a) Set C117 = 1, Spindle begins to rotate and S085 = 1.
b) Execute a command: Sxxxxx, and C121 = 0.
c) Spindle speed = xxxxx % in R224 (rpm)
If [xxxxx % in R224] > the setting in MCM#510, spindle speed = MCM#510.
Spindle Speed Control 2:
a) Set C117 = 1, Spindle begins to rotate and S085 = 1.
b) Set a value for R132, and C121 = 1.
c) Spindle speed = R132 value % in R225 (rpm)
Set a Specific Angular Position for Spindle Method 1:
Execute a command: G15 Rxxxxx (C119 = 1)
After completing a HOMEing process, the CNC controller will record that HOME
position as 0 position. When the spindle starts to rotate, S085 =1. Execute a
command of G15 . will cause spindle to rotate to a specific angular position.
Example: Program Command
N10 S3000
N20 G15 R175.000
Case 1:
Case 2:
Case 3:

Case 4:

C117=1, C118=0, C119=0


Spindle closed-loop controlled, normal direction, continuous rotation at
3000 rpm.
C117=1, C118=1, C119=0
Spindle closed-loop controlled, reversed direction, continuous rotation at
3000 rpm.
C117=1, C118=0, C119=1
Spindle closed-loop controlled, normal direction, 3000 rpm. Rotate
spindle to a position of 175o from HOME position. When the process is
completed, a signal S030=01 will be sent from CNC to PLC.
C117=1, C118=1, C119=1
Spindle closed-loop controlled, reversed direction, 3000 rpm. Rotate
spindle to a position of 175o from HOME position. When the process is
completed, a signal S030=01 will be sent from CNC to PLC.

Set a Specific Angular Position for Spindle Method 2:


Execute a command: R134, ie set a specific angular position (C119 = 1)
After completing a HOMEing process, the CNC controllerwill record that HOME
position as 0 position. When the spindle starts to rotate, S085 =1. The spindle will
rotate to a specific angle as set by R134. The direction of rotation is determined by
the setting of C118.
Notice that the format for R134 (same as R229) is 7 digits with 3 decimal digits (or
4/3 format).

5 - 31

HUST H9C Connecting Manual

Example: R238 = 2, C117 = 1, C118 = 1, R134 = 180.000.


After Homing process.
This is the Origin.
Execute S1000 and Yaxis begins normal
rotation

Spindle stops
at 180.000 deg
angle

Fig 6-13
Notes: In PLC, the number that can be input into register is in the range of
+32767~-32767. If the number is outside this range, multiple input commahs
must be used in order to avoid overflow.
Example: Input 180000 into R134. First write 180 into R134, then multiply by 1000.

Program Selection from External I/O Device (C120)

C120 = 1,
Program selection from external I/O device function ON
C120 = 0,
Program selection from external I/O device function OFF
R226 is the register to store the program number from external device while R255 stores
the current program number. When C120 = 1, the number in R255 will be replaced by
the number in R226.

Spindle Speed Control (in %) from External I/O Device (C121)

C121 = 1,
C121 = 0,

Spindle speed percentage = The value in R224 * R225.


Spindle speed percentage = value in R224.

Ex 1: C121 = 1, use X-axis as spindle by setting R238 = 1.


In PLC, set R224= 100, R225 = 60, and C121= 1.
Spindle RPM at 10V, R130= 3000.
Manual spindle speed setting in R132= 3000 rpm
(When power-on, the value in MCM#510 will be transferred to R130 & R132.)
Spindle speed = R132 R224% R225%
= 3000 100% 60% = 1800 rpm
Spindle Voltage = 10V 1800 / R130 (3000 rpm at 10V)
= 10V 1800 / 3000 = 6V
Ex 2:

C121 = 0, use Y-axis as spindle by setting R238 = 2.


R130 = 2000 rpm (spindle speed at 10V)
In the program, set S = 1000 rpm, R224 = 50.
Spindle RPM = S value R224% = 1000 50% = 500
Spindle Voltage-Command = 10 500 / R130 = 10 500/2000 = 2.5V

Set Work Coordinate (C123)

When C123 = 10 (Falling edge) and R228 = 0, select G54 as work coordinate.
When C123 = 10 (Falling edge) and R228 = 1, select G55 as work coordinate.
When C123 = 10 (Falling edge) and R228 = 2, select G56 as work coordinate.
5 - 32

5 Interface Between CNC & PLC

When C123 = 10 (Falling edge) and R228 = 3, select G57 as work coordinate.
When C123 = 10 (Falling edge) and R228 = 4, select G58 as work coordinate.
When C123 = 10 (Falling edge) and R228 = 5, select G59 as work coordinate.

Checking that the IO does not show the KEY CODE (C124)

When C124=1 and in I/O mode, it does not show the key value.

Simultaneous Execution for M-code, S-code, T-code (C125)

When C125 =1, all M-code, S-code and T-code will be executed simultaneously.
For example: G01 X100. S2000 M18
When C125 =0, the controller will execute S2000 and M18 first prior to motor rotation.
When C125 =1, the execution of S2000, M18 and motor rotation will all begin at the
same time. (in synchronization)

Axial Data Input Disabled in TEACH Mode (C128~C136)

C128 = 1 (High), X-axis data input disabled when in TEACH mode.


C129 = 1 (High), Y-axis data input disabled when in TEACH mode.
C130 = 1 (High), Z-axis data input disabled when in TEACH mode.
C131 = 1 (High), A-axis data input disabled when in TEACH mode.
C132 = 1 (High), B-axis data input disabled when in TEACH mode.
C133 = 1 (High), C-axis data input disabled when in TEACH mode.
C134 = 1 (High), U-axis data input disabled when in TEACH mode.
C135 = 1 (High), V-axis data input disabled when in TEACH mode.
C136 = 1 (High), W-axis data input disabled when in TEACH mode.

DRO Mode Enabled (C144~C152)

C144 = 1 (High), Digital readout mode on X-axis enabled.


C145 = 1 (High), Digital readout mode on Y-axis enabled.
C146 = 1 (High), Digital readout mode on Z-axis enabled.
C147 = 1 (High), Digital readout mode on A-axis enabled.
C148 = 1 (High), Digital readout mode on B-axis enabled.
C149 = 1 (High), Digital readout mode on C-axis enabled.
C150 = 1 (High), Digital readout mode on U-axis enabled.
C151 = 1 (High), Digital readout mode on V-axis enabled.
C152 = 1 (High), Digital readout mode on W-axis enabled.

Signal for Over-travel (OT) Limit Switch (C160~C177)

C160 = 1 (High), OT limit switch in the X+ side is touched.


C161 = 1 (High), OT limit switch in the X- side is touched.
C162 = 1 (High), OT limit switch in the Y+ side is touched.
C163 = 1 (High), OT limit switch in the Y- side is touched.
C164 = 1 (High), OT limit switch in the Z+ side is touched.
C165 = 1 (High), OT limit switch in the Z- side is touched.
C166 = 1 (High), OT limit switch in the A+ side is touched.
5 - 33

HUST H9C Connecting Manual

C167 = 1 (High), OT limit switch in the A- side is touched.


C168 = 1 (High), OT limit switch in the B+ side is touched.
C169 = 1 (High), OT limit switch in the B- side is touched.
C170 = 1 (High), OT limit switch in the C+ side is touched.
C171 = 1 (High), OT limit switch in the C- side is touched.
C172 = 1 (High), OT limit switch in the U+ side is touched.
C173 = 1 (High), OT limit switch in the U- side is touched.
C174 = 1 (High), OT limit switch in the V+ side is touched.
C175 = 1 (High), OT limit switch in the V- side is touched.
C176 = 1 (High), OT limit switch in the W+ side is touched.
C177 = 1 (High), OT limit switch in the W- side is touched.
When the machine tool or the work table touches one of the hardware OT limit switch,
the corresponding C-bit sends a high (1) signal to CNC which produce a CNC error
signal as Error 14. When this happens, you have to manually move (MDI mode) the tool
away from the limit switch then press RESET key.

Clear Error-count (Following-Count) to Zero (C192~C200)

C1921
C1931
C1941
C1951
C1961
C1971
C1981
C1991
C2001

(
(
(
(
(
(
(
(
(

one shot pulse),


one shot pulse),
one shot pulse),
one shot pulse),
one shot pulse),
one shot pulse),
one shot pulse),
one shot pulse),
one shot pulse),

Clear following error-count in X-axis


Clear following error-count in Y-axis
Clear following error-count in Z-axis
Clear following error-count in A-axis
Clear following error-count in B-axis
Clear following error-count in C-axis
Clear following error-count in U-axis
Clear following error-count in V-axis
Clear following error-count in W-axis

X/Y/Z/A/B/C/U/V/W-axis Rapid Positioning Signal (C208~C216 )

C208 = 0 1 (one shot pulse),


Tool on X-axis moves to the position specified in R18010#11800with a speed
indicated by R160. The S-bit S208=1 during command execution and S208=0 when
execution finished. This is done in PLC program.
C209 = 0 1 (one shot pulse),
Tool on Y-axis moves to the position specified in R18110#11800with a speed
indicated by R161. The S-bit S209=1 during command execution and S209=0 when
execution finished. This is done in PLC program.
C210 = 0 1 (one shot pulse),
Tool on Z-axis moves to the position specified in R18210#11800with a speed
indicated by R162. The S-bit S210=1 during command execution and S210=0 when
execution finished. This is done in PLC program.
C211 = 0 1 (one shot pulse),
5 - 34

5 Interface Between CNC & PLC

Tool on A-axis moves to the position specified in R18310#11800with a speed


indicated by R163. The S-bit S211=1 during command execution and S211=0 when
execution finished. This is done in PLC program.
C212 = 0 1 (one shot pulse),
Tool on Z-axis moves to the position specified in R18210#11800with a speed
indicated by R162. The S-bit S212=1 during command execution and S212=0 when
execution finished. This is done in PLC program.
C213 = 0 1 (one shot pulse),
Tool on A-axis moves to the position specified in R18310#11800with a speed
indicated by R163. The S-bit S213=1 during command execution and S213=0 when
execution finished. This is done in PLC program.
PS 1. R180R183R160R165 setting range+3276732767.
2. When C223=0,
the value is the position of absolute coordinate in R180R185.
Default# 11800=10
# 11800 setting range1~1000.
3. When C223=1,
the value is the position of incremental coordinate in R180R183.
Default # 11800=1
# 11800 setting range1.
Note: WhenC208 / C209 / C210 / C211 / C212 / C213 / C214 / C215 / C216 are active,
C223 = 0, the axial movement is based on absolute coordinate
C223 = 1, the axial movement is based on incremental coordinate.
Example:
MOV
I010

#3000
R180

MOV

#1000
R160

I010

(
)
C223

I010

(
)
C208
(

)
C223

X-axis position 15.000


When I010 is ON, the tool on X-axis will move to 18.000 [15.0003.000]
Note: The register values in PLC should be in the range of +32767~-32767.

5 - 35

Fig 5-14

HUST H9C Connecting Manual

In Edit or Teach mode, Insert and Input functions are not used Completely
(C220)

In Edit or Teach mode, the Insert function is not used (C221)

Input method of the milling machine tool compensation data incremental /


absolute (C222)

Rapid Positioning (increasing value) signal (C223)

Special C-bit for G28, G29 and G30 (C224~C225)

In addition to the normal application in the part program, G28, G29 and G30 functions
can also be executed through C224~C225 (1 pulse signal) in PLC as follows:

G28
G29
G30

C225
0
1
1

C224
1
0
1

When executing C224 & C225 through PLC, the desired axis must be specified.by R232.
Example: R232 = 7 (Bit-0~2 ON), C224 is on (1 pulse signal), X, Y, Z-axis will all
execute G28. (or return to the first reference point)

Adjustment for MCM Parameters through PLC Ladder, (C226)

1. Move the value to #11***.


2. C226 = 0 1 (Rising-edge Signal)
Fig 5-15 is an example illustrating a method using PLC ladder program to set the
distance of G54 work coordinate origin on X-axis being +15.000 mm from the machine
origin. I05 is the triggering signal.
(
)
A001

I005
MOV
#-V

A001

#15000
V11001
(
)
C226

A001

Fig 5-15

When using PLC to make MCM parameter adjustment, a rising-edge signal for C226
will be produced in the same sweeping cycle if the PLC programming is done correctly.
5 - 36

5 Interface Between CNC & PLC

Otherwise, an ERROR 01 message will be produced from the controller. In this case,
please check the PLC program. If the ERROR 01 persists, please try to make adjustment
for any MCM parameter, then press RESET key.

Variable Value Input / Output Blocked (C227)

C227=1, variable value cannot be entered nor output. (Input /Output blocked)

JOG Mode Enable Command (C228)

When C228 =1 and R2330 (or R2340) in JOG mode, the designated axis will move
immediately.
When C228=1 and R233=1, tool on X-axis will move in the positive direction.
When C228=1 and R233=2, tool on Y-axis will move in the positive direction.
When C228=1 and R233=4, tool on Z-axis will move in the positive direction.
When C228=1 and R233=8, tool on A-axis will move in the positive direction.
When C228=1 and R233=16, tool on B-axis will move in the positive direction.
When C228=1 and R233=32, tool on C-axis will move in the positive direction.
When C228=1 and R233=64, tool on U-axis will move in the positive direction.
When C228=1 and R233=128, tool on V-axis will move in the positive direction.
When C228=1 and R233=256, tool on W-axis will move in the positive direction.
When C228=1 and R233=511, tool on X/Y/Z/A/B/CU/V/W-axis will the move in
positive direction.
When C228=1 and R234=1, tool on X-axis will move in the negative direction.
When C228=1 and R234=2, tool on Y-axis will move in the negative direction.
When C228=1 and R234=4, tool on Z-axis will move in the negative direction.
When C228=1 and R234=8, tool on A-axis will move in the negative direction.
When C228=1 and R234=16, tool on B-axis will move in the negative direction.
When C228=1 and R234=32, tool on C-axis will move in the negative direction.
When C228=1 and R234=64, tool on U-axis will move in the negative direction.
When C228=1 and R234=128, tool on V-axis will move in the negative direction.
When C228=1 and R234=259, tool on W-axis will move in the negative direction.
When C228=1 and R234=511, tool on X/Y/Z/A/B/CU/V/W-axis will the move in
negative direction.

233 Bit-0
Axis

Bit-1

Bit-2
Z

Bit-3
A

Bit-4
B

Bit-5
C

Bit-6
U

Bit-7
V

Bit-8
W

234 Bit-0
Axis

Bit-1

Bit-2
Z

Bit-3
A

Bit-4
B

Bit-5
C

Bit-6
U

Bit-7
V

Bit-8
W

G01 Feed-rate Adjustment by MPG Hand-wheel (C229, C230)

C229 = 1, G01 MFO feed-rate adjustment enabled, max 300%.


C230 = 1, G01 MFO maintains the feed-rate after adjustment.
C230 = 0, G01 MFO returns to the feed-rate before adjustment.
5 - 37

HUST H9C Connecting Manual

Load File from EPROM/FLASH-Rom (C231)

C231 = 1~0 (falling edge),

Load program file from EPROM or FLASH/Rom.

Clear G54 Work Coordinates (C233)

C233 = 1 0 (falling edge), clear G54 work coordinates that are stored in MCM #1~#6
(X, Y, Z, A, B, C-axis G54 coordinate) to zero (0). This can be done by using an
external input as follow. Note that C233 is an one-shot signal
.
( )
C233
I010
Fig 5-16

Program Simulation Using MPG Handwhell (C235)

C235 = 1, program simulation using MPG handwheel mode is ON. There will be no
voltage command and encoder feedback during simulation
1. Allow PLC in MPG TEST mode by setting C056 = 1.
2. Using keyboard or an input point to set C235 = 1 as shown in the example below.

| |
I000

C0235

Fig 5-17

User Defined Keyboard Keys (C236)

There are 2 types of self-editing keys:


Type 1. To set only once after power-on:
This type of the setting is defined by C236. There are letter keys, number keys
and cursor keys you can design in the setting.
C236 on (C236 stays on)
a.
b.

One pulse is set to V#9901 ~ V#9980 when power is on.


C236 & C245 stay on.

Type 2. The setting will be redefined by C245 after power-on:


C245 is the PLC program that defines the settings.
C255 on (there is a pulse signal on each key)
Consult the illustration of C245.
Note:
Filled the relevant numbers inV#9901~V#9980 with power-on.
Users can press any keys under the mode C236. The system will automatically cancel
the original setting from R241 to read the one from V#9901~V#9980 instead.

5 - 38

5 Interface Between CNC & PLC

RESET

AUTO
MDI

HOME
JOG

EDIT
TEAC

TAPE
PRNO

PMI
MCM

CYCST

#9936

#9937

#9938

#9913

#9907

#9908

#9909

#9933

#9934

#9935

#9919

#9904

#9905

#9906

#9921

#9922

#9923

#9918

#9901

#9902

#9903

#9930

#9931

#9932

#9925

#9912

#9910

#9911

#9947

#9926

#9944

#9945

CURSOR

#9952 #9953 #9954 #9955 #9956

#9946

#9949

#9948

#9950

#9942

EX.: V #9941 = 41, The key of the function is Input


Fig 5-18

5 - 39

#9943

PAGE

#9941

#9941

HUST H9C Connecting Manual

Table 5-5
Key
Board
1
2
3
4
5
6
7
8
9
0
.

1
2
3
4
5
6
7
8
9
0
10
11
12

defined
Position
#9901
#9902
#9903
#9904
#9905
#9906
#9907
#9908
#9909
#9910
#9911
#9912
#9913

13

#9914

C
D
E
F
G
H
I
J
K
L
M
N
O
P

14
15
16
17
18
19
20
21
22
23
24
25
26
27

#9915
#9916
#9917
#9918
#9919
#9920
#9921
#9922
#9923
#9924
#9925
#9926
#9927
#9928

Value

Key
Board
Q
R
S
T
U
V
W
X
Y
Z
/
#
Input
New
Line
Clear
Del.
PAGE
PAGE
CURSOR
CURSOR
CURSOR
CURSOR
Function-Key1
Function-Key2
Function-Key3
Function-Key4
Function-Key5

EX.:
1. #9928 = 27
2. Press this key.
3. The letter of Pwill be displayed.

5 - 40

28
29
30
31
32
33
34
35
36
37
38
39
64

defined
Position
#9929
#9930
#9931
#9932
#9933
#9934
#9935
#9936
#9937
#9938
#9939
#9940
#9941

65

#9942

72
68
73
74
75
76
79
80

#9943
#9944
#9945
#9946
#9947
#9948
#9949
#9950
#9951
#9952
#9953
#9954
#9955
#9956

Value

52
53
54
55
56

5 Interface Between CNC & PLC

Using the second set of handwheel (C237)

R243 axial direction selection


R245 the second handwheel rate

When the program restarts, M, T, S and G04 commands are skipped (C240)

When C240=1, the program that restarts will not excute M, T, S and G04.

To set the rotational axis, each rotational axis is not cleared to zero (C241)

When C241=1, each rotational axis is not cleared to zero.

MPG Hand-wheel Feed Interrupt Mode (C242)

1.
2.
3.
4.

This function is effective in AUTO mode only.


When C242 =1, the Feed Interrupt mode is ON.
When C242 =1, recommend to turn ON the function of Feed Hold (C000=1).
When in Feed Interrupt mode, the cutting tool position can be moved using MPG
handwheel. When resuming the program, the tool will continue to move from the
new location. As such, the final tool position may travel beyond the hardware limit
to cause tool collision and machine damage. Be careful when using this function.

Easyview or LCD Screen In Sleep Mode (C243)

C243 = 0, Sleep mode for Easyview and LCD screen OFF.


C243 = 1, Sleep mode for Easyview and LCD screen ON.

Suppressing Alarm ERROR-2 When Following Count > 4096 (C244)

C244 = 0, controller will send out ERROR 02 when the following-count > 4096.
C244 = 1, controller will NOT send out ERROR 02 when the following-count > 4096.
C244 function is to be used for testing condition. Do not use this function in real case.

User Defined Keyboard Keys (C245)

C245 = 0, Self-defined keyboard function OFF.


C245 = 1, Self-defined keyboard function ON. All keys on keyboard have to be
redefined.
There are two ways to re-define the keyboard keys of H6C system as follows:
Methos 1:
Type 1 The definition of keys must be judged first and then reset them when
restart the controller.( Consult the illustration of C236)
C245 ON & C236 ON (C236 stay on)

5 - 41

HUST H9C Connecting Manual

Type 2 The definition of keys must judged by conditions repeatly after restarting
the controller
C245 ON & C255 ON (C255 there is a pulse signal on each key)
User can redefine the keys on HUST H9C keyboard by following the steps below. This
is done through PLC process. Please see R241 and R242 in next section for more
information.

Key code

Function ON
C245=1

S017 = 0 1
(Rising edge signal)

R241

Check Key code signal

Redefined
key code
C255=0 1

Redefined key

R242

Fig 5-19

Let C245 = 1 to enable redefining function and disable all the key functions (key codes
still retained). If only redefining keys 52~56 (soft-key) , its NOT necessary to set C245
=1.
AttentionIt must be noticed that all keys have to be defined or they will lose their
function.
EX.
The default number of keys is 47. Once user has defined 20 keys. It means that 27 keys
will lose their function.
1.
2.
3.
4.
5.
6.

S017 = 01 indicates a key has been pressed.


Controller places the key code (see Fig 6-19) in step 2 in R241.
Based on the S017 signal and R241, store the desired output key number in
R242.(Table 5-13)
Let C255 = 01 to output the new defined key in R242.
Following is a PLC example where key 44 is to be defined as letter N, key 45 as
M, and key 46 as single block execution function. Press key 46 once, function
ON and press one more time, function OFF.
AttentionPLC scan time.

5 - 42

5 Interface Between CNC & PLC

PLC edit(step 5)
|

A0127
|

A0201

A0202
|

C0001

A0202

C0006

C0006
| |

CMP

46

S0017

R241

CMP

44

MOV

25

R241

R242

CMP

45

MOV

24

R241

R242

S0017

A0201


C0255

LCD Display Function Disabled (C247)

C247 = 0,
C247 = 1,

C0006
A0201

C0245

LCD display disable function OFF


LCD display disable function ON

When the fill grid displays, the cursor jumps out of the fill grid (C250)

When the current screen displays the fill grid and the editable variables exist at the same
time, C250=01 (positive-edge status), the cursor can be switched to the fill grid and
the variable positions.

5 - 43

HUST H9C Connecting Manual

Program number

Editing area
of fill grids

Editing area
of variables

Program notes

01
02

14.000
75.250

35.120
10.000

30000
12500

C 568.000

D 645.321

E 55.145

J 786.212

K 568.398

L 758.362

0.000

0.000

0.000
Edit-Stop

Fig 5-20

When functions of G40/G41/G42 are established, the tool compensation is


corrected linearly at the tangent. The round arc correction is cancelled (C251)

When cutting the shape with a ladder contour and C251=1 (high), the tool
compensation is corrected linearly with explanation below:
When C251= 1, the tool compensation
route is a line.

Fig 5-21
When C251= 0, the tool compensation
route is a round arc.

Fig 5-22

Milling Function Enabled (C252)

C252 = 1,

Milling function enabled

Lathe Function Enabled (C254)

C254 = 1,

Lathe Function Enabled

5 - 44

5 Interface Between CNC & PLC

User Defined Keyboard Function Output (C255)

C255 =0,
User defined keyboard output function OFF
C255 =01 (Risng edge), User defined keyboard output function ON (See C245)

5 - 45

HUST H9C Connecting Manual

5.3

Description of PLC Register


Table 5-6 PLC Command Signals, Register

Register
R100
R101
R102
R103
R104
R105

Variable No.
10100
10101
10102
10103
10104
10105

R106

10106

R107
R108

10107
10108

R109

10109

R110

10110

* R111

10111

R112

10112

R113

10113

R114
R115

10114
10115

R118

10118

R119
R121

10119
10121

R122

10222

R123
R124

10123
10124

R125

10125

R126

10126

R127

10127

R128

10128

R129
R130
R131

10129
10130
10131

Application / Definition
Execution mode selection
Displaying codes
Store the desired program numbers to be copied from
Store the desired program numbers to be copied into
Display the letter of input position. (X-Coordinate)
Display the letter of input position. (Y-Coordinate)
Show the current single block of the program being
executed. (Y)
Storing a pre-program number.
Storing an ending-program number
showing the column number of the cursor location.
(Function Table)
showing the row number of the cursor location.
(Function Table)
Program Number the Cursor Aiming At (Prog Number
Selection Mode)
The single block line number currently being edited by
the system
Selection of the program number. Setting the maximum
program number displayed by the program
Storing the max program number
Adjusting the LCD display width
#101180, Display of self-defined MACRO program
when in execution mode. (conjunction with R154)
Displaying the R232 execution mode
Axial ON/OFF
Reading the status signal sent by the PC or the Manmachine interface
S104~S111
Setting the F speed format
Displaying axial operation
After the program starts, the system does not excute the
program until it pre-catches a few single blocks. (Only
once)
Composite functions
Number Of Program Blocks Pre-Fetched To The
System When Starting Program Execution.
No LCD Display When Number of Program Blocks
pre-fetch Smaller Than R128 Setting Value.
(conjunction with C037)
Set the LCD reflash rate
Spidle Moror Speed at 10V
Home Shift Value (number of pulses) of Spindle Motor
5 - 46

5 Interface Between CNC & PLC

Register
R132
R133
R134
R135
R138
R139
R140
R142
R143
R144~R145
R146
R147
R148~R149
R150

Variable No.
10132
10133
10134
10135
10138
10139
10140
10142
10143
10144~10145
10146
10147
10148~10149
10150

R151

10151

R152~R153
R154
R155
R156
R157
R158~R159
R160~R168
R180~R188
R190~R198
R200
R201
R202
R203

10152~10153
10154
10155
10156
10157
10158~10159
10160~10168
10180~10188
10190~10198
10200
10201
10202
10203

R204

10204

R205

10205

R206
R207~R210
R211
R220
R221
R222
R223

10206
10207~10210
10211
10220
10221
10222
10223

R224

10224

R225

10225

R226

10226

* R227

10227

R228

10228

Application / Definition
Spindle RPM in Manual Mode
Spidle RPM When Searching for GRID
Angular Set Position For Spindle Motor
Number of Rotation for Spindle
Spindle home shift
Spindle type
Spindle control mode
AD1
AD2
Reserved
DA1
DA2
Reserved
Setting of G31 inspection failure
Setting of the number of G31 inspection failure,
exceeding the alarm number.
Reserved
User-defined Command Code
Reserved
The offset distance after the G31 inspection fails.
Setting selection of an axial relative coordinate
Reserved V
Feed-rate setting for X, Y, Z, A, B, C, U, V, W
Absolute Coordinate setting for X, Y, Z, A, B, C, U, V, W
Motor deceleration selection for G31 skip function
Page number for Liquid LCD Screen display
Reserved
Special Display mode
Page number for TableFunction Table
X-coordinate for the Top-left Corner of the Table
Screen. Function Table
Y-coordinate for the Top-left Corner of the Table
Screen. Function Table
Read the cell value in the Table. Function Table
Reserved
Setting USB/SDC operation
Feed-rate percentage (%) for G00 (G00 MFO %)
Feed-rate percentage (%) for G01, G02, G03
Multiplication factor for MPG pulse (MPG MFO %)
Spindle Gear ratio
When C121=0, spindle speed percentage (%) = value in
R224
When C121=1, spindle speed percentage (%) = value in
R225
Selecting program number from external I/O device
The selected variable number when editing the variable
data
Selecting work coordinate system
5 - 47

HUST H9C Connecting Manual

Register
R229
R230
R231
R232

Variable No.
10229
10230
10231
10232

R233

10233

R234

10234

* R235

10235

* R236

10236

* R237

10237

R238
R239
* R240
* R241
R242
R243
R244
R245
R246

10238
10239
10240
10241
10242
10243
10244
10245
10246

* R247

10247

* R248
R249
R250
* R251
* R252
* R253
* R254
* R255

10248
10249
10250
10251
10252
10253
10254
10255

Application / Definition
Setting the number of decimals for display after power on
Page number for Easyview display
Setting tool compensation groups
For selecting the axis in JOG and HOME mode
For selecting the axis in JOG and MPG mode, (+)
direction
For selecting the axis in JOG and MPG mode, (-)
direction
For displaying the axis that is drivable (enabled)
For displaying the axis that is on HOME location
(machine zero)
For displaying the axis of which the HOME operation
has been executed
For selecting the axis to be the spindle axis
# 10239 = 6 is DNC Mode
Display the keyboard value of FUNCTION KEY.
Storing the keyboard key code as read by the controller
Storing the desired output key code
Axial selection of the second handwheel
Reserved
The second handwheel rate
Reserved
Display the value (bit) of ERR 1420 (+) direction
and ERR 02
Display the value (bit) of ERR 1420 (-) direction
Setting the axial SERVO to ON
Input signal type for G31
For storing the ERROR code
For storing current M-code
For storing current T-code
For storing current S-code
For storing the current program number

*Data in these registers are READ only

5 - 48

5 Interface Between CNC & PLC

5.3.1

Register singal descriptions

1. R000~R099 - the user can freely plan definitions in the ladder diagram.
2. R100R255, system data
Among R000~R099, their signal data can be stored when the power is turned off.
When the machine parameter MCM Item No 5210, it will not be stored when the
power is turned off.
When the machine parameter MCM Item No 521256, it will be stored when the
power is turned off.

Execution mode selection (R100)

Execution mode selection according to table below

R100 Value
0
1
2
3
4
5
6
7

Displaying codes (R101)


R101
1
2
3
4
5
6
7
8

Table 5-7
Execution
NONE
AUTO
HOME
EDIT
JOG
TAPE
TEACH
MDI

Table 5-8
Displaying
I/O status
NONE
Machine coordinate position
Program coordinate position
Edit mode
NONE
Program number
Machine parameter

R101
9
10
11
12
13
14
15
16

Displaying
RS232 mode
Program execution mode
NONE
NONE
NONE
NONE
Initialization mode
Variable mode

Program numbers to be copied from & into, (R102 & R103)

R102: Storing the desired program numbers to be copied from.


R103: Storing the desired program numbers to be copied into.
C072: Execution copying
Example: R102 = 2, R103 = 4.
When C072 = 1 (one shot), it will copy the content of program #2 into program #4.
5 - 49

HUST H9C Connecting Manual

X-axis & Y-axis Coordinate (R104 & R105)

R104: Storing the coordinate for X-axis


R105: Storing the coordinate for Y-axis

Keybaord input Character display

R104 = 8
R105 = 205

Fig 5-23

Current single block display during program execution. (Y), (R106)

Show the current Y-axis coordinate of the program being


executed. R106=128

5 - 50

Fig 5-24

5 Interface Between CNC & PLC

Pre-Set Program and End program (Range: 001 ~ 998) (R107 & R108)

R107: Storing a pre-program number.


R108: Storing an ending-program number.
Note: The numbers should be between 990 and 999 for R107 & R108
When start executing this program, it will execute the programs specified in R107, if
R107 0, prior to executing the main program. It will not execute the programs
specified in R107 again whether the main program is ended with M99 or not.
The pre-program can be used to execute some very fundanmental yet important actions
prior to main program execution, such as tool homing, counter reset, etc. Note that the
endings of the pre-program should be set as M30 or M02.
If there is no end-code (M02, M30, M99) in the main program and R1080, the system
will automatically execute the ending-program specified in R108, where the end-code
(M02, M30) will determine how the system to end or continue to run if ended with M99.
If the end-code of the main program is M02, M30, or M99, it will not execute the
ending-program in R108.
Example:
R107 992, R108995
0992
G01 X0. Y0. F5000
M30
0995
G00 X0. Y0.
M01
M99
0000
G01 X100. Y50
G04 X1.2
G01 X150
G01 Y10.

When the program runs continuously,


the execution sequence is shown below:
G01 X0. Y0. F5000 (pre-program)
One Execution Only
G01 X100. Y50.
G01 X20. Y10.
G04 X1.2
G01 X150.
Return
G01 Y10.
G00 X0. Y0.
M01
M99

Showing cursor location in column/row of a function table (R109 & R110)

When in edit mode with a function table,


R109 = showing the column number of the cursor location
R110 = showing the row number of the cursor location

5 - 51

HUST H9C Connecting Manual

Cursor Position
R109=3
R110=2

Fig 5-25

Program Number the Cursor Aiming At (Prog Number Selection Mode), (R111)

R111 is for read only, not writable.

The single block line number being edited by the system, (R112)

It displays (R202=3) only when program is edited.

Setting the maximum program number displayed in the machining program,


(R113)

If it is not set in the PLC, the initial value at booting =1000 meaning that the master
table in the machining program displays O000~O999.
If the setting value=500, meaning that the master table in the machining program only
displays O000~O499.

Storing the max program number, (R114)

If it does not specify in PLC, the initial value when power-on = 1000 meaning that
there are O000~O999 programs. If the setting value = 500 meaning there are
O000~O499 programs.

Setting the LCD display width, (R115)

Setting the LCD display program, parameter, single block width and unit: Primitive
Example: The system displays the contents of the program when it is set up at 800.
If the single block is too long, it will take up the whole screen. If it is changed to 400,
this single block will only display half of the program contents.

5 - 52

5 Interface Between CNC & PLC

Displaying self-defined MACRO program when in execution mode (R118)

If R118 is not equal to zero, the program contents displayed during the program
execution will jump to the self-defined MACRO program with use of R154.

Displaying RS232 execution mode (R119)

R119
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Table 5-9
Execution mode
NONE
PC CNC ONE PROG
CNC PC ONE PROG
PC CNC MCM
CNC PC MCM
PC CNC PLC
DNC
PC CNC VAR
CNC PC VAR
CNC PC ALL PROG
CNC PC SYS
CNC PC CRT
RESERVE
CNC PC KEY
CNC PC PTN

Axial ON/OFF (R121)

In AUTO and MDI modes, cancellation of axial function will be set by R121.
Set the selection of a corresponding axis with Bit.
When R1211, cancel the X-axis.
When R1212, cancel the Y-axis.
When R1214, cancel the Z-axis.
When R1218, cancel the A-axis.
When R12116, cancel the B-axis.
When R12132, cancel the C-axis.
When R12164, cancel the U-axis.
When R121128, cancel the V-axis.
When R121256, cancel the W-axis.
When R121511, i.e. Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7, Bit81, cancel the
X/Y/Z/A/B/C/U/V/W-axes at the same time.

Reading the status signal sent from the PC or the man-machine interface,
S104~S111 (R122)

The control signals planned by the personal computer (PC) or the man-machine
5 - 53

HUST H9C Connecting Manual

interface will be sent to the controller through RS232C. The controller will send
S104~S111 high signals to the PLC and display them at R122 by means of Bit.
When R1221, meaning that S104 is ON.
When R1222, meaning that S105 is ON.
When R1224, meaning that S106 is ON.
When R1228, meaning that S107 is ON.
When R12216, meaning that S108 is ON.
When R12232, meaning that S109 is ON.
When R12264, meaning that S110 is ON.
When R122128, meaning that S111 is ON.

Setting the F speed format (R123)

Set the digit after the decimal point of the F value.


When R123 = 0, it is the standard format.
When R123 = 1, meaning that one digit after the decimal point.
When R123 = 2, meaning that two digits after the decimal point.
When R123 = 3, meaning that three digits after the decimal point.

Displaying axial operational direction (R124)

In AUTO and MDI modes, the axial operational direction will be display by R124.
Display the direction of a corresponding axiswith Bit.
When R124 =0, it rotates forward.
When R1241, the X-axis rotates reversely.
When R1242, the Y-axis rotates reversely.
When R1244, the Z-axis rotates reversely.
When R1248, the A-axis rotates reversely.
When R12416, the B-axis rotates reversely.
When R12432, the C-axis rotates reversely.
When R12464, the U-axis rotates reversely.
When R124128, the V-axis rotates reversely.
When R124256, the W-axis rotates reversely.

When the program initiates the signal, the system will pre-catch the designated
single block number (R125)

When C127=1, it sends the program start-up signal, the system will first pre-catch the
single block number set by R125 and then start execution of the program. In the process
of program execution, it is not required to pre-catch the single block number designated
by R125, which is defferent from R127.

5 - 54

5 Interface Between CNC & PLC

Composite functions (R126)

Set by means of Bit:


Bit
02
03
04
06

Table 5-10
Function
Bit
S-code is not equal to C34
14
Special restart mode
15
Displaying the program contents in
16
Auto mode.
GOO moves simulatenously but
17
does not reach at the same time.

07
R242=61 is valid
10
11
12
13

27

Similar G65 L06 activity in the PLC


28
(Note 1)
Spindle C H command Y-axis
29
Spindle C H command B-axis

31

Function
Spindle C H command A-axis
RESET and clear #10940
Start the second limit XZ (Note 2)
Start the second limit XA (Note 3)
When C025=1, and when the
designated single block number is
wrong, the wrong message will not
appear.
When G83 is a single block, tool
return will stop.
The Y-axis is the diameter value.
When G00 is in the master-slave
mode, it will not stop.

The program restarts and does not


come in the M98 sub-routine.

R126 remarks
Note1

Bit10

Note2
Note3

Bit16
Bit17

#9881 initial position #9882 initial value #9883 incremental value


#9884 continuous quantity
#9566 X+ #9567 Z+ #9568 X- #9569 Z#9570 X+ #9571 A+ #9572 X- #9573 A-

Number Of Program Blocks Pre-Fetched To The System When Starting


Program Execution (R127)

1. When starting a program, there is a moment of tool stoppage (hesitation). The larger
the setting value for R127, the longer the stoppage (hesitation).
2. The purpose of program pre-fetch is to provide smooth & continuous operation
when the tool movement between program blocks involves all small distances.
3. At high moving aped, this function may not be effective.

No LCD Display When Number of Program Blocks pre-fetch Smaller Than


R128 Setting Value (R128)

1. To be used with C037=1.


2. R128 initial value = 0, internal default = 16 blocks.
3. When number of program blocks pre-fetch is smaller than R128 setting value and
there is a distinct stoppage during program execution, the LCD display will be
turned off. When the number of program blocks pre-fetch is greater than R128
setting value, thw LCD display will come back on.
5 - 55

HUST H9C Connecting Manual

LCD display of refresh frequency (R129)

R129: Setting the refresh frequency displayed by LCD.


The number set by the main process scanning R129, while the screen is refreshed
once.
For example: R129=3, meaning that the main process is scanned 3 times, while the
screen is refreshed once.

Spidle Moror Speed at 10V (R130)

The spindle motor speed (rpm) at 10V will be transferred from MCM #225 and stored in
R130. In PLC, the value in R130 can be adjusted to modify the spindle speed. The Scode command in the program will be compared to the value in R130 so that a correct
output voltage can be determined.

Home Shift Value (number of pulses) of Spindle Motor (R131)

1. When perform homing process with 117 = 1 and C119 = 1, the shifting value
(number of pulses) from home position is determined by the setting in R131.
2. The setting value is by number of pulses, either positive or negative.

Spindle RPM in Manual Mode (R132)

1. When power-on, the system will transfer the MCM#510 value into R132.
2. The S-code in PLC will also be transfere to R132 as a last command for spindle
RPM under manual mode.

Spidle RPM When Searching for GRID (R133)

1. C117=1, Spindle in closed-loop contril. When C116=1, Spindle starts searching for
GRID on motor.
2. C118 for spindle motor rotational direction control.
3. R133, spidle RPM when searching for GRID.

Angular Set Position For Spindle Motor (R134)

Use G-command to position spindle to 130 degrees angle as follows.


G15 R130
Position spindle to 130 deg.
R134 = 130000
Follow the decimal point in R229

Number of Rotation for Spindle (R135)

Storing the number of rotation for spindle.

Spindle home shiftR138

AD1 (R142)
AD2 (R143)

5 - 56

5 Interface Between CNC & PLC

A/D signal control


Table 5-11
AD/DA: Setting of relative registers
Function
Register
Description
R146
Pin 1 (DAC-0) and Pin 15 (GND) are for #1 output signal
DAC
R147
Pin 2 (DAC-1) and Pin 15 (GND) are for #2 output signal
Usage
1. PLC directly sets R146=5000
2. Actual output voltage=5V
R142
Indicates value of #1 analog voltage input
ADC
R143
Indicates value of #2 analog voltage input
Wiring Method
Note:
VR
Value read from #1 ADC IN will be shown
in R142

Pin 13 +12V
Pin 06 ADC IN
Pin 15 GND

User-defined Command Code (R154)

In current H6C connecting manual, there is a special addition mode beside G Standard
and M CODE. The introduction is as follows:
1. When there is a bit on from R154, it will be switched to this special addition mode.
It will follow the Table 6-8 to run the sub-program. (If there is no commands for
running the program, it will be automatically switched to the standard one)
2. If there is more than one R154 bit on simultaneously, each row can only execute
once at a time. The lower bit will be chosen to execute the program first.
Example 1 : Program G01X100. Y100.Z100.F1000
R154=0:
The axes normally move to X100. Y100. Z100.
(It is the same either R154 bit1 or Bit2 as there is no further commands)
R154 bit 0 is on:
When the system runs at this row, it will execute the sub-program 901. Those programs
of code GXY and Z will be indicated in fig 6-10, the axes will not move to the
position of X100. Y100. Z100.
R154 bit 23 is on:
When the system runs at this row, it will execute the sub-program 791. Those programs
of code GXY and Z will be indicated in Table 6-9, the axes will not move to the
position of X100. Y100. Z100.
5 - 57

HUST H9C Connecting Manual

R154 bit 24 is on:


When the system runs at this row, it will execute the sub-program 792. Those programs
of code GXY and Z will be indicated in Table 6-9, the axes will not move to the
position of X100. Y100. Z100.
R154 bit 25 is on:
When the system runs at this row, it will execute the sub-program 793. Those programs
of code GXY and Z will be indicated in Table 6-9, the axes will not move to the
position of X100. Y100. Z100.
While R154 bit 0 23 24 25 are on at the same time, the system will execute the
sub-program 901. The lower bit will be chosen to execute the program first and each
row only once at a time.
Example 2: R154 bit15 is on when N code is used for execution.
The content of the program 0:
N10X100D1T1
N20X200D2T2
N30X300D3T3
X400D4T4
M02
The content of the program 783: (#13114 is used for N code but it is optional)
G01X#13124F1000 (#13114 is the variable for the code X)
G11P#13120 (#13120 is the variable for the code T)
G04X#13104 (#13104 is the variable for the code D)
G01X0
M99
Following the setting above, the execution is as follows:
1. Program 783 will be executed when the command N10X100D1T1 is given:
The execution is demonstrated as
G01X100F1000 G11P1 G04X1 G01X0 M99 (back to the beginning)
2. Program 783 will be executed when the command N20X200D2T2 is given:
The execution is demonstrated as
G01X200F1000 G11P2 G04X2 G01X0 M99 (back to the beginning)
3. Program 783 will be executed when the command N30X300D3T3 is given:
The execution is demonstrated as
G01X300F1000 G11P3 G04X3 G01X0 M99 (back to the beginning)

5 - 58

5 Interface Between CNC & PLC

4. Program 783 will NOT be executed when the command X400D4T4 is given.
Because of the absent of the N code, the execution goes back to the position
X400.
5. M02

R154
Bit-0
Bit-1
Bit-2
Bit-3
Bit-4
Bit-5
Bit-6
Bit-7
Bit-8
Bit-9
Bit-10
Bit-11
Bit-12
Bit-13

CODE
G
M
T
S
A
B
C
D
E
F
H
I
J
K

Table 5-12
Program
R154
O900~O999 Bit-14
O800~O899 Bit-15
O770
Bit-16
O771
Bit-17
O772
Bit-18
O773
Bit-19
O774
Bit-20
O775
Bit-21
O776
Bit-22
O777
Bit-23
O778
Bit-24
O779
Bit-25
O780
O781

CODE
L
N

Program
O782
O783

P
Q
R
U
V
W
X
Y
Z

O785
O786
O787
O788
O789
O790
O791
O792
O793

Table 5-13
CODE
A
B
C
D
E
F
G
H
I
J
K
L
M
N

Variable
No.
#13101
#13102
#13103
#13104
#13105
#13106
#13107
#13108
#13109
#13110
#13111
#13112
#13113
#13114

#13100

CODE

BIT01
BIT02
BIT03
BIT04
BIT05
BIT06
BIT07
BIT08
BIT09
BIT10
BIT11
BIT12
BIT13
BIT14

O
P
Q
R
S
T
U
V
W
X
Y
Z

Variable
No.

#13100

#13116
#13117
#13118
#13119
#13120
#13121
#13122
#13123
#13124
#13125
#13126

BIT16
BIT17
BIT18
BIT19
BIT20
BIT21
BIT22
BIT23
BIT24
BIT25
BIT26

PSDont used the letter of O!!! (O-CODE)


5 - 59

HUST H9C Connecting Manual

Setting the selection of an axial relative coordinate (R157)

In JOG and Home modes, the selection of axis is set by R157.


Set the selection of a corresponding axis with Bit.
When R1571, select the X-axis.
When R1572, select the Y-axis.
When R1574, select the Z-axis.
When R1578, select the A-axis.
When R15716, select the B-axis.
When R15732, select the C-axis.
When R15764, select the U-axis.
When R157128, select the V-axis.
When R157256, select the W-axis.
When R15763, i.e.Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7, Bit8 1, select
X/Y/Z/A/B/C/U/V/W-axes at the same time.
With C060, use #9780~#9788 to set the displacement of each axis.
Range of a setting value: +32767 to -32767
Example: R157=1, #9780=10000 controller decimal point format is 4/3 format.
Meaning C06001 (positive-edge status)
The X-axis is moved to the coordinate at 10.000 positionR1801010000
(4/3 format)
Feed-rate settings for X/Y/Z/A/B/C/U/V/W-axis (R160~R168)
Absolute coordinate setting X/Y/Z/A/B/C/U/V/W -axis (R180~R188)
Use 160~R168 and R180~R188 to store all coordinates for all axes.
R180~R183 setting values: +32767 ~ -32767.
C223 = 0 Absolute coordinate; C223 = 1 Incremental coordinate.
#11800 Absolute coordinate R180 ~ R188, setting value multiplied by 10 when
power-on. Range: 1 ~ 1000.
When C208 = 01, X-axis moves to the position of R180 x10 with a speed of R160.
(Use PLC to control axial movement on X-axis)
When C209 = 01, Y-axis moves to the position of R181 x10 with a speed of R161.
(Use PLC to control axial movement on Y-axis)
When C210 = 01, Z-axis moves to the position of R182 x10 with a speed of R162.
(Use PLC to control axial movement on Z-axis)
When C211= 01, A-axis moves to the position of R183 x10 with a speed of R163.
(Use PLC to control axial movement on A-axis)
When C212 = 01, B-axis moves to the position of R184 x10 with a speed of R164.
(Use PLC to control axial movement on B-axis)

5 - 60

5 Interface Between CNC & PLC

When C213= 01, C-axis moves to the position of R185 x10 with a speed of R165.
(Use PLC to control axial movement on C-axis)
When C214= 01, U-axis moves to the position of R186 x10 with a speed of R166.
(Use PLC to control axial movement on A-axis)
When C215 = 01, V-axis moves to the position of R187 x10 with a speed of R167.
(Use PLC to control axial movement on B-axis)
When C216= 01, W-axis moves to the position of R188 x10 with a speed of R168.
(Use PLC to control axial movement on C-axis)
Note: When C223 = 0 position of absolute coordinateC223 =1 position of Incremental
coordinate.
Ex:

R180 = 1000, R160 = 2500, and the decimal format is 4/3.


When C223 = 0 and C208 = 0 1 (Rising edge), X-axis moves to the location of
10.000 (R18010=10000) with a speed of 2500 mm/min.
Motor Deceleration Selection For G31 Skip Function (R190~R198)

Type of motor deceleration for G31 skip function is determined by the C028 signal and
the value in R190. (Refer to Sec 3.15 in Operation Manual)
C028 = 0 (low), servomotor ignores the value in R190 and decelerates linearly to zero.
C028 = 1 (high), & R190 = 0, servo motor speed jumps to zero.
C028 = 1 (high), & R190 0, servomotor will stop in a distance = value in R190

Page Number For Liquid LCD Screen Display (R200)

Page number for liquid LCD screen display


R200 = 0,
Standard H6C system display
R200 = 1~127, Page number for user designed LCD screen display

Special Display Mode (R202)

R202 = 1,
= 2,
= 3,
= 4,
= 5,
= 7,
= 9,
= 12,
= 13,

Displays a single block execution.


Displays parameters
Displays program content
Displays the entire program list
Displays program in table form
Displays I/O (PMI mode)
Displays program path
Displays servo response
Displays user defined var data

(The use of R202 should goes with #10782 and #10783)


Example: Display program path with parameters
5 - 61

HUST H9C Connecting Manual

R202 = 9
#16161 =

0, X/Y plane
1, Y/Z plane
2, Z/X plane
3, X/Y/Z plane

#16162 =

256.000, Horizontal axis ratio

#16163 =

51,

Coordinate origin position. (Horizontal axis) (1*8)

#16164 =

32,

Coordinate origin position (Vertical axis) (22*8)

#16165 =

90,

Position display (Horizontal axis) (0*8)

#16166=

45,

Position display (Vertical axis) (2*8)

#16167 =

4,

Origin moving range

#16168 =

796,

#16169 =

48,

#16170 =

472
(#16167, #16169)

(#16168, #16170)

Fig 5-26

Method of Application:
1. R202 = 9
2. Choose the plane of path (#16161)
3. Arrange LCD Screen
4. Set values for #16162#16170
5. Do the following steps
Press key [Graph/ I/O] to get into the grapg screen as below:

Fig 5-27
5 - 62

5 Interface Between CNC & PLC

1. in the screen represents the origin of the coordinate. Use cursor to drag to new
location if desired.
1 The number 256 on the top-left corner is the current ploting ratio for the
horizontal axis. Use Page Up/Down key to change the ratio.

Page number for Table (R203)

R203 is used for page number for the Table Screen.


R203 = 0, Page Table one
= 1, Page Table two
= 2, Page Table three
= 3, Page Table four

X- & Y-coordinate for the Top-left Corner of the Table Screen (R204 & R205)

R204 : X-coordinate on the top-left corner of the table screen


R205 : Y-coordinate on the top-left corner of the table screen

R204 = 4
R205 = 20

Fig 5-28

Read the cell value in the Function Table (R206)

R206 = The ASCII-CODE of homologous colume to be read


Set a value in the fill-out and put it in the variables. ASCII code will be put in R206 and
the value of M code will be placed in the variable zone between #11980~#11999 for
the purpose of dynamic graph display.
EX.

5 - 63

HUST H9C Connecting Manual

R206 = 78
#11980
#11981
#11982
#11983
#11984
#11985
#11986

N
1
2
3
4
5
6
7

Table 5-14
R206 = 88 X
#11980
15.000
#11981
75.250
#11982
100.000
#11983
125.250
#11984
150.000
#11985
175.000
#11986
200.000

R206 = 90
#11980
#11981
#11982
#11983
#11984
#11985
#11986

Y
13.120
10.000

Consoult Fig 5-25

Setting USB/SDC operation (R211)

With R211 value, you can plan the USB/SDC function by yourself (see Table 5-10).

R211
50
51
52
53
54
55
56
80
81
82
83
84

Definition
PAGE DOWN
PAGE UP
MOVE DOWN
MOVE UP
Start the folder
Return to the last
directory
Refresh the directory
Delete a document
Rename
Create a foler
Reproduce
Copy

Table 5-15
R211
101
102
103
104
105
106
131
132
133
134
135
136
137
138
139
140
141
142

Definition
CNC USB/SDC CNC
CNC USB/SDC ALL CNC
CNC USB/SDC MCM
CNC USB/SDC VAR
CNC USB/SDC CYF
CNC USB/SDC 999
USB/SDC CNC CNC
USB/SDC CNC MCM
USB/SDC CNC PLC
USB/SDC CNC CRT
USB/SDC CNC SYS
USB/SDC CNC KEY
USB/SDC CNC MOT
USB/SDC CNC PTN
USB/SDC CNC VAR
USB/SDC CNC CYF
USB/SDC CNC 999
USB/SDC CNC DNC

Setting G00 feed-rate percents (R220)

Set the G00 feed-rate percent (G00 MFO %).


Initial value100
Setting range: 0~100
Example: Set G00 feed-rate 3000, R22080,
Output G00 feed-rate 2400. mm/min300080 %2400

5 - 64

5 Interface Between CNC & PLC

Setting G0x feed-rate percents (R221)

Set the G0x feed-rate percent (G0x MFO %). G0x includes G01, G02 and G03.
Initial value100
Setting range: 0~150
Example: Set G01 feed-rate 2000, R221120
Output G01 feed-rate 2400. mm/min2000120 %2400

Setting the Multiplier for MPG handwheel pulse (R222)

Setting the Multiplier for MPG handwheel pulse (MPG MFO)


Default = 100, range 1 ~ 100.
For example: R222 = 10 the MPG pulse output = MPG pulse spec * 10

Setting Spindle Gear Ratio (R223)

Default = 100, range 1 ~ 10000.

When C121 = 0, Spindle Speed Percentage = R224 value (R224)

Spindle speed percentage (%)


When C121=0, spindle speed percentage (%) = value in R224
Default = 100 (%), range 1 ~ 150.
For example, select Y-axis as spindle by setting R238=2.
In the program, S = 1000, C121 =0 and R224 = 50.
If MCM #127 = 2000 rpm, the V-command = 10V * (1000/2000) * 50% = 2.5V

When C121 = 1, Spindle Speed Percentage = R225 value (R225)

Setting spindle speed percentage (%) from external I/O device


When C121=1, spindle speed percentage (%) = value in R225
Default = 100 (%), range 1 ~ 100.
(When power-on, the system will transfer the MCM#510 value into R132 & R130.)
For example, select X-axis as spindle by setting R238=1, C121 =1 and R225 = 60,
R132 = 3000 & R130 = 3000.
V-command to spindle = 10V * R132/R130 * R225 = 10 * 1 * 60% = 6V

Selecting Program Number from External I/O Device (R226)

Selecting program number from external I/O device


When C120 = 1, the program number in R226 will be placed in R255 where the current
program number is stored.
5 - 65

HUST H9C Connecting Manual

Setting the Selected Variable Number When Editing the Variable Data (R227)

Setting the selected variable number when editing the variable data
When in variable data editing mode, the number in R227 is equal to the variable number.
You cannot edit variable data in the following modes
1. R202 0
2. Program-edit, and
3. Teach mode

Selecting Work Coordinate System (R228)

When C12310 (Falling Edge) & R2280, Select G54 as work coordinate system.
When C12310 (Falling Edge) & R2281, Select G55 as work coordinate system.
When C12310 (Falling Edge) & R2282, Select G56 as work coordinate system.
When C12310 (Falling Edge) & R2283, Select G57 as work coordinate system.
When C12310 (Falling Edge) & R2284, Select G58 as work coordinate system.
When C12310 (Falling Edge) & R2285, Select G59 as work coordinate system.

R228
0
1
2
3
4
5

Table 5-16
Work Coordinate System
G54
G55
G56
G57
G58
G59

Setting The Number Of Decimals For Display After Power On (R229)

Setting the number of decimals for display after power on


Default = 3, range = 01 ~ 04.

R229
01
02
03
04

Table 5-17
Format
Number of Decimals
61
1
52
2
43
3
34
4

5 - 66

5 Interface Between CNC & PLC

Example: Table 5-18

INPUT

3/4 Format

4/3 Format

5/2 Format

6/1 Format

X2
Y250
Z2500
U2500
V25.
W25.
F300

X0.0002 mm
Y0.0250 mm
Z0.2500 mm
U0.2500 mm
V25.0000 mm
W25.0000 mm
F300 mm/min

X0.002 mm
Y0.250 mm
Z2.500 mm
U2.500 mm
V25.000 mm
W25.000 mm
F300 mm/min

X0.02 mm
Y2.50 mm
Z25.00 mm
U25.00 mm
V25.00 mm
W25.00 mm
F300 mm/min

X0.2 mm
Y25.0 mm
Z250.0 mm
U250.0 mm
V25.0 mm
W25.0 mm
F300 mm/min

Setting Page Number for Easyview Display (R230)

Setting page number for Easyview display.


Default = 01, range = 1 ~ 255.

Setting tool compensation groups (R231)

Tool compensation group range 1~40, =0 meaning no tool compensation is selected.


For the address range of each axial tool compensation, see Chapter 7 Machine
Parameters in the operation manual.

Axial selection in JOG & HOME modes (R232)

In JOG & HOME modes, set the axial selection with R232.
Set the selection of a corresponding axis with Bit.
When R2321, i.e. BIT01, set the X-axis to be drivable.
When R2322, i.e. BIT11, set the Y-axis to be drivable.
When R2324, i.e. BIT21, set the Z-axis to be drivable.
When R2328, i.e. BIT31, set the A-axis to be drivable.
When R23216, i.e. BIT41, set the B-axis to be drivable.
When R23232, i.e. BIT51, set the C-axis to be drivable.
When R23264, i.e. BIT61, set the U-axis to be drivable.
When R232128, i.e. BIT71, set the V-axis to be drivable.
When R232256, i.e. BIT81, set the W-axis to be drivable.
When R232 63, i.e. Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7, Bit8 1, set
X/Y/Z/A/B/C/U/V/W- axes to be drivable.
In HOME mode, set the drivable axial direction (X/Y/Z/A- axes)
Example: In Home mode,
R23215
(Bit0, BIT1, BIT2, BIT3 On)
Set X/Y/Z/A-axes to be drivable.
5 - 67

HUST H9C Connecting Manual

Run the Home command (C063 On)


Set X/Y/Z/A-axes to return to Home at the same time.
In JOG mode, after setting the axial direction with R232, move the axial position with
the handwheel, which can move six axes at the same time.
Example: In JOG mode,
R23215
(Bit0, BIT1, BIT2, BIT3 On)
Set X/Y/Z/A-axes to be drivable.
Turn the handwheel four axes are moved at the same time

Setting X/Y/Z/A/B/C/U/V/W to feed in positive (+) direction by inching (R233)

Set X/Y/Z/A/B/C/U/V/W-axes by inching (machine parameters Item No 201~209); Set


axial directions of X/Y/Z/A/B/C/U/V/W-axes with Bit0, Bit1, Bit2, Bit3, Bit4, Bit5,
Bit6, Bit7, Bit8. In JOG mode, and C2281, as long as R2330, the machine tool will
immediately feed in positive (+) direction by inching (machine parameter Item No 201 ~
209). The setting value of R233 may affect the feed direction of handwheel. Reset R233 to
zero when the movement is completed.
When C2281 and R2331, the X-axis feeds in positive (+) direction by inching.
When C2281 and R2332, the Y-axis feeds in positive (+) direction by inching.
When C2281 and R2334, the Z-axis feeds in positive (+) direction by inching.
When C2281 and R2338, the A-axis feeds in positive (+) direction by inching.
When C2281 and R23316, the B-axis feeds in positive (+) direction by inching.
When C2281 and R23332, the C-axis feeds in positive (+) direction by inching.
When C2281 and R23364, the U-axis feeds in positive (+) direction by inching.
When C2281 and R233128, the V-axis feeds in positive (+) direction by inching.
When C2281 and R233256, the W-axis feeds in positive (+) direction by inching.
When C2281 and R23363, X/Y/Z/A/B/C-axes feed in positive (+) direction by
inching.
Example: In JOG mode,
R23315 (Bit0, BIT1, BIT2, BIT3 On)
X/Y/Z/A axes are drivable
C2281 X/Y/Z/A axes feed in positive (+) direction by inching at the
same time.

Setting X/Y/Z/A/B/C/U/V/W - axes feed in negative (-) direction by inching


(R234)

Set X/Y/Z/A/B/C/U/V/W - axes feed in negative (-) direction by inching (machine


parameters Item No 201 ~ 209). Set axial directions of X/Y/Z/A-axes with Bit0, Bit1,
Bit2, Bit3. In JOG mode and C2281, as long as R234 0, the machine tool will
immediately feed in negative (-) direction by inching (machine parameters Item No 201 ~
209). The setting value of R234 may affect the feed direction of handwheel. Reset R234
5 - 68

5 Interface Between CNC & PLC

to zero after the movement is completed.


When C2281 and R2341, the X-axis feeds in negative (-) direction by inching.
When C2281 and R2342, the Y-axis feeds in negative (-) direction by inchng.
When C2281 and R2344, the Z-axis feeds in negative (-) direction by inching.
When C2281 and R2348, the A-axis feeds in negative (-) direction by inching.
When C2281 and R23416, the B-axis feeds in negative (-) direction by inching.
When C2281 and R23432, the C-axis feeds in negative (-) direction by inching.
When C2281 and R23464, the U-axis feeds in negative (-) direction by inching.
When C2281 and R234128, the V-axis feeds in negative (-) direction by inching.
When C2281 and R234256, the W-axis feeds in negative (-) direction by inching.
When C2281 and R23463, X/Y/Z/A/B/C-axes feed in negative (-) direction by
inching.
Example: In JOG mode,
R2347 (2021227)(Bit0, BIT1 and BIT2 On)
X/Y/Z-axes are drivable.
C2281 X/Y/Z-axes feed in negative (-) direction by inching at the same
time.

Displaying drivable axial direction (R235)

(The R235 value is forRead, not writable)


Display the drivable axial direction.
Display the X&Y axial directions to be drivable with Bit0 Bit1.
When R2351, i.e. BIT01, meaning that the X-axis can be used.
When R2352, i.e. BIT11, meaning that the Y-axis can be used.
When R2354, i.e. BIT21, meaning that the Z-axis can be used.
When R2358, i.e. BIT31, meaning that the A-axis can be used.
When R23516, i.e. BIT41, meaning that the B-axis can be used.
When R23532, i.e. BIT51, meaning that the C-axis can be used.
When R23564, i.e. BIT61, meaning that the U-axis can be used.
When R235128, i.e. BIT71, meaning that the V-axis can be used.
When R235256, i.e. BIT81, meaning that the W-axis can be used.
When R235511, i.e. BIT0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7, Bit81, meaning
that all axes can be used.
Example: R2357 (Bit0, BIT1, BIT2 On)
Indicating X/Y/Z-axes are all drivable.
Displaying axial direction at HOME (R236)
(The R236 value is for Read only, not writable)
5 - 69

HUST H9C Connecting Manual

Display the axial direction at HOME.


Display the axial directions of X/Y/Z/A/B/C/U/V/W-axes with Bit0 to Bit8.
Example: R236511 (Bit0, BIT1, BIT2, BIT3, BIT4, BIT5, Bit6, Bit7, Bit8 On)
Displaying X/Y/Z/A/B/C-axes are at HOME.
Displaying the axial direction after returning to HOME (R237)
(The R237 value is for Read, not writable)
Display the axial direction after returning to HOME.
When R2371, i.e. BIT01, meaning that the X-axis has returned to HOME.
When R2372, i.e. BIT11, meaning that the Y-axis has returned to HOME.
When R2374, i.e. BIT21, meaning that the Z-axis has returned to HOME.
When R2378, i.e. BIT31, meaning that the A-axis has returned to HOME.
When R23716, i.e. BIT41, meaning that the B-axis has returned to HOME.
When R23732, i.e. BIT51, meaning that the C-axis has returned to HOME.
When R23764, i.e. BIT61, meaning that the U-axis has returned to HOME.
When R237128, i.e. BIT71, meaning that the V-axis has returned to HOME.
When R237256, i.e. BIT81, meaning that the W-axis has returned to HOME.
When R237511, i.e. BIT0, Bit1, Bit2, Bit3, Bit4, BIT5, Bit6, Bit7, Bit81, meaning
that X/Y/Z/A/B/CU/V/W-axes all have returned to HOME.
The setting value is zero at booting.
When Error 01, Error 02 or Error 22 occurs, the setting value will be cleared to zero.
Now, all axes have to return to HOME again.
Example: R23763 (BIT0, Bit1, Bit2, Bit3, Bit4 and Bit51 On)
X/Y/Z/A/B/C-axes all have returned to HOME.

Spindle Axis Selection (R238)

For selecting the axis to be the spindle axis


R238 = 1,
X-axis as spindle.
R238 = 2,
Y-axis as spindle.
R238 = 3,
Z-axis as spindle.
R238 = 4,
A-axis as spindle.
R238 = 5,
B-axis as spindle.
R238 = 6,
C-axis as spindle.
R238 = 7,
U-axis as spindle.
R238 = 8,
V-axis as spindle.
R238 = 9,
W-axis as spindle.
The initial value is zero (The spindle has not been chosen.)
NoteH6CH9C controller D/A port none spindle setting.

5 - 70

5 Interface Between CNC & PLC

Spindle setting MCM 509 spindle commondpulse/rev


#11512 spindleencodepulse/rev
#10892 coordinates per revolution

Displaying the FUNCTION KEY value (R240)

Displaying the Keyboard Key Code As Read by the Controller (R241)


The R241 data is for read only, NOT writtable.
The standard HUST H6C keyboard has a designated code for each key and these codes
are shown in Fig 6-30 below. When any keyboard key is pressed (S017 = 01), the
corresponding code will be stored in R241. Refer to C245 for more information.

5 - 71

HUST H9C Connecting Manual

Self-Defining Key Function (R242)

User can define key function using R242 as shown in Table 6-13 below. If user wish to
redefine HUST H6C keyboard keys, he must let C245 = 1. When C255 = 01 (rising
edge), the self-defined key function will be output from R242.
Table5-19 R242 Codes with Corresponding Functions
R242 Output
R242 Output
R242
Output
0
0
30
S
60
1
1
31
T
61
2
2
32
U
62
3
3
33
V
63
4
4
34
W
64 Enter
5
5
35
X
65 Insert
6
6
36
Y
66 Auto Sequence Realignment
Find last N (program block before
7
7
37
Z
67
interrupt)
8
8
38

68 Delete
9
9
39
#
69 Delete the current program
10

40
70 Delete all programs (5)
Download MCM parameters from
11

41
71
Flashrom (6)
12
A
42
72 Clear the input value from Register
13
B
43
73 PAGE UP
14
C
44
74 PAGE DOWN
15
D
45
75 CURSOR UP
16
E
46
76 CURSOR DOWN
17
F
47
77 Clear Variables #1~#99990 (7)
Read the Variables #9000 ~ #9999 from
18
G
48
1
78
Flashrom (8)
19
H
49
2
79 CURSOR LEFT
20
I
50
3
80 CURSOR RIGHT
21
J
51
4
81 Upload program to Flashrom (9)
Upload MCM parameters to Flashrom
22
K
52
82
(10)
23
L
53
83 Upload LADDER to Flashrom (11)
24
M
54
84
25
N
55
85 Upload System data to Flashrom (12)
Upload variables #9000~#9999 to
26
O
56
86
Flashrom ( 13)
27
P
57
87
28
Q
58
88
29
R
59
89
Table 5-20
5 - 72

5 Interface Between CNC & PLC

R242 Notes ()
R24248
1
R24249
2
R24250
3
R24251
4
R24270
5
R24271
6
R24277
7
R24278
8
R24281
9
R24282
10
R24283
11
R24285
12
R24286
13

Send a signal to Easyview, move cursor up


Send a signal to Easyview, move cursor down
Send a signal to Easyview, move cursor left
Send a signal to Easyview, move cursor right
Same as executing G10 P2001 in MDI mode
Same as executing G10 P1000 in MDI mode
Same as executing G10 P2002 in MDI mode
Same as executing G10 P2200 in MDI mode
Same as executing G10 P600 L01 in MDI mode
Same as executing G10 P600 L02 in MDI mode
Same as executing G10 P600 L03 in MDI mode
Same as executing G10 P600 L05 in MDI mode
Same as executing G10 P600 L06 in MDI mode

Selecting the second handwheel axial direction (R243)

Definition is same as R232 (axial selection) description.

Setting the second handwheel pulse rate (R245)

Set the second handwheel pulse rate (MPG MFO %).


Initial value100.
Setting range: 1~100.

Displaying positive (+) direction of ERR14, 20 and axial direction of ERR02


(R247)
Displaying negative (-) direction of ERR14, 20 and axial direction of ERR02
(R248)

When R2471, ERR in the X-axis positive (+) direction.


When R2481, ERR in the X-axis negative (-) direction.
When R2472, ERR in the Y-axis positive (+) direction.
When R2482, ERR in the Y-axis negative (-) direction.
When R2474, ERR in the Z-axus positive (+) direction.
When R2484, ERR in the Z-axis negative (-) direction.
When R2478, ERR in the A-axis positive (+) direction.
When R2488, ERR in the A-axis negative (-) direction.
When R24716, ERR in the B-axis positive (+) direction.
When R24816, ERR in the B-axis negative (-) direction.
When R24732, ERR in the C-axis positive (+) direction.
When R24832, ERR in the C-axis negative (-) direction.

5 - 73

HUST H9C Connecting Manual

Setting axial SERVO ON (BIT=1 ON, BIT=0 OFF) (R249)

Set the axial SERVO ON by using the register.


When R2491, i.e. BIT01, meaning that the X-axis is SERVO ON.
When R2492, i.e. BIT11, meaning that the Y-axis is SERVO ON.
When R2494, i.e. BIT21, meaning that the Z-axis is SERVO ON.
When R2498, i.e. BIT31, meaning that the A-axis is SERVO ON.
When R24916, i.e. BIT41, meaning that the B-axis is SERVO ON.
When R24932, i.e. BIT51, meaning that the C-axis is SERVO ON.
When R24964, i.e. BIT71, meaning that the U-axis is SERVO ON.
When R249128, i.e. BIT81, meaning that the V-axis is SERVO ON.
When R249256, i.e. BIT91, meaning that the W-axis is SERVO ON.
When R24963, i.e. BIT0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7, Bit81, meaning
that X/Y/Z/A/B/C/U/V/W-axes all SERVO ON.
Caution: R249 can only be used with the axial displacement control wiring. For the pin
position diagram, see Chapter 4 in the wiring manual.

Input signal type for G31 (R250)

Input signal type for G31


Sensor signal ON

Sensor signal ON

rising edge

falling edge

Sensor signal OFF

Sensor signal OFF

The skip function of G31 (waiting input signal) will not be set up if the input signal dose
not enter the controller.
EXR250 = 3
Input signal type is normally closed (1)
Program Description
c Input 5 Start the controller to do the position control.
d Input 0 Photo Sensor
e Output 13 The tool executes the cutting or not.
f 1 Exceed the distance from lamp sensor to controllers starting point .
g 2 F value = Motor feed rate.
h 3 Feed Hold setting
i 4 Equal to the value of R190. The setting value muse exceeds the distance
of motor deceleration.

5 - 74

5 Interface Between CNC & PLC

G12 P5
G31 X1 F2 P00
G11 P13
G04 X3
G11 P-13
M99

Wait the Input 5 ON, then the program executes next


single block.
Servo motor executes to feed material till the photosensor(input 0) to sense the MARK.
Assign the Output 13 ON and the tool to cut.
In the holding time, the motor will stop feeding.
Assign the Output 13 OFF and the tool stop cutting.
End Program

The number of Err-Message (R251) (Read only)

For storing the ERROR code


In case of ERROR during program execution, the ERROR code will be displayed on the
HUST H9C LCD screen. The ERROR code is stored in R251 which is for read only.

The number of the Mxxx (R252) (Read only)

For storing current M-code


When executing a M-code in a program under AUTO or MDI mode, a one shot signal
S24 will be generated and this M-code will be placed in R252. The M-code range is
M000 ~ M999. When a M-code is finished, C032 becomes high (1). R252 is for read
only.
M000~M499
M500~M999

Waiting M-code. The controller will not execute the next program
block unless the M-code is finished (C032 = 1).
Non-waiting M-code. The controller will not wait for the M-code to
finish. It will execute the next block immediately.

The number of the Txxx (R253) (Read only)

For storing current T-code


When executing a T-code in a program under AUTO or MDI mode, a one shot signal
S25 will be generated and this T-code will be placed in R253. The T-code range is T000
~ T999. When a T-code is finished, C033 becomes high (1). When executing a T-code,
the controller will not execute the next program block unless the T-code is finished
(C033 = 1). R253 is for read only.

The number of the Sxxxxxx (R254) (Read only)

For storing current S-code


When executing a S-code in a program under AUTO or MDI mode, a one shot signal
S26 will be generated and this S-code will be placed in R254. The S-code range is
S000000 ~ S999999. When a S-code is finished, C034 becomes high (1). When
executing a S-code, the controller will not execute the next program block unless the S5 - 75

HUST H9C Connecting Manual

code is finished (C034 = 1). R254 is for read only.

For storing the current program number (R255) (Read only)

The current (being executed) main program number is stored in R255. R255 is for read
only.
When C120 = 1, the program number from the external I/O device will be placed in
R226. When you start execution, this number in R226 will be placed in R255.

5 - 76

5 Interface Between CNC & PLC

5.4

Special Variables
Set the cursor size, #10781

There are 3 different ones to set the cursor size:


#10781=1, is normal single baseline of cursor such as 12345
#10781=2, is double baseline of cursor such as 12345
#10781=-1 is an reversed block such as 12345

#10782 & #10783

Program editing, table of I-O file and MCM status are shown on the top left of display.

#10782=32
#10783=24

PSThe range of dotted line is program editing.

#10782=32
#10783=24

PSThe range of dotted line is program editing.

5 - 77

Fig 5-29

HUST H9C Connecting Manual

#10784 & #10785

Table file shows the message location (X, Y) of delete program.

#10784=80
#10785=160
DELETE O004 (y/n)?

Fig 5-30

#10786 & #10787

Location (X ,Y) of error display.

#10786=8
#10787=205

Fig 5-31

5 - 78

5 Interface Between CNC & PLC

#10788 & #10789

Location (X,Y) of program note display.


#10788=224
#10789=3

Fig 5-32

5 - 79

HUST H9C Connecting Manual

5.5

Variables (VM)

All data in HUST H6C system is stored in the variables. If you like to check a problem
during execution, you can check the variable.
Table 5-21

Variable Number

Definition

00001
10000
11001
12001

For users application


System variables including Register, Counter, Timer
System variables including MCM parameters
System variables including axial positions

...
...
...
...

09999
11000
12000
13500

Variables #10000 ~ #10899

Variable Number

Table 5-22
Variable Data

Data Range

10000 ~ 10255
10256 ~ 10511
10512 ~ 10767
10781
10800 ~ 10807
10808 ~ 10815
10816 ~ 10823
10824 ~ 10831
10832 ~ 10863

Register
Counter
Timer
cursor size
I Bit Data
O Bit Data
C Bit Data
S Bit Data
A Bit Data

R000 ~ R255
Cn000 ~ Cn255
Tm000 ~ Tm255
-1 ~ 2
I0000 ~ I0255
O0000 ~ O0255
C0000 ~ C0255
S0000 ~ S0255
A0000 ~ A1023

5 - 80

5 Interface Between CNC & PLC

Special Variables Table


Table 5-23

Variable
Number
10104
10105
10106
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
*10900
*10902
*10903
*10904
*10905
*10906
*10921
*10922
*10923
*10924
*10925
*10931
*10932
*10933
*10934
*10936
#10951

Variable Data

Appendix

DisplayLocation of input valueX-Coordinate start point


R104
R105
DisplayLocation of input valueY-Coordinate start point
Display Current single block display during program
R106
executionY-Coordinate start point
Set the cursor size, 112
DisplayPRO-SEL/EDIT/IO/MCMX-coordinate start point
DisplayPRO-SEL/EDIT/IO/MCMY-coordinate start point
Displaymessage of delete programX-coordinate start point
Displaymessage of delete programY-coordinate start point
DisplayError MessageX-coordinate start point
DisplayError MessageY-coordinate start point
Displayprogram noteX-coordinate start point
Displayprogram noteY-coordinate start point
DisplayMDI input the data of singal blockX-coordinate
start point
DisplayMDI input the data of singal blockY-coordinate
start point
When touch panel ENTER signal S027=1 is on,
#10900 will display the number of variable.
Time required for system to scan one cycle
1 msec
Time required to finish on cycle of program for M99, M02,
1 msec
M30
Time since power-on
1 sec
Cumulative time for power-on
1 sec
Time required to finish on cycle of program for M99, M02,
1 sec
M30
Counter limit for M99, M02, M30
Current counter for M99, M02, M30
Current counter for M99
Current program block number
Mode status: 0 NONE, 1 AUTO, 2 HOME
3 EDIT,
4 JOG,
5 TAPE
6 TEACH, 7 MDI
G54 .. G59 Work coordinate designation 0 .. 5
Current program number
Production speed 1 minute #10903
piecesec
Actual motor speed=MFO%F
Spindle Speed in display
rpm
Storing 10 sets of ERROR CODE information. Each set of
5 - 81

HUST H9C Connecting Manual

Variable
Number
~
#10970
*10995
*10996
*10997
*10998
11800

16161
16162
16163
16164
16165
16166
16169
16170
16167
16168

Variable Data

Appendix

information is stored by using two variables. After 10 sets of


information are all stored, start again from the first set to store.
When the same ERROR CODE is continuously reported,
register only the time of the latest one.
Date of the system in record (Year)
Date of the system in record (Date & Month)
Display the used of program memory part
Display the total program memory part
Set the times of value when used PLC to control the axis.
C208~C211
(absolute coordinate) (1~1000)
Graph Plane
0X / Y plane
1Y / Z plane
2Z / X plane
3X / Y / Z plane
Horizontal axis ratio
256.000
Coordinate origin position. (Horizontal axis) (1*8)
51
Coordinate origin position (Vertical axis) (22*8)
32
Position display (Horizontal axis) (0*8)
92
Position display (Vertical axis) (2*8)
45
Origin moving range
48
Please consult the page 6-68
472
Please consult the page 6-68
4
Please consult the page 6-68
796

* Read only

ErrorList description

The first variable storing error code and time information: ERCD, HHMH
ERCD=ERROR CODE NUM
HH = Hour ( by 24 hours)
MH = Minute
The second variable storing date information: YYYY, MMDD
Gr.
No.
1
2
3
4
5

Table 5-24
Error Code, Time Date
Gr.
Infomation
information
No.
#10951
#10952
6
#10953
#10954
7
#10955
#10959
8
#10957
#10958
9
#10959
#10960
10

5 - 82

Error Code, Time Date


information
information
#10961
#10962
#10963
#10964
#10965
#10966
#10967
#10968
#10969
#10970

5 Interface Between CNC & PLC

VariablesVM 12001 ... 13500


Table 5-25
Variable Number
12001 ~ 12006
12021 ~ 12026
12081 ~ 12086
12101 ~ 12106
12121 ~ 12124
12261 ~ 12226

Variable Data
RANGE
Machine Coordinate
X, Y, Z, A, B, C
Program Coordinate
X, Y, Z, A, B, C
Residual value of program single block X, Y, Z, A, B, C
Relative coordinate
X, Y, Z, A, B, C
Following Error
X, Y, Z, A, B, C
Return to HOME, locate the GRID point
X, Y, Z, A, B, C
distance

5 - 83

HUST H9C Connecting Manual

5 - 84

6 Ladder Diagram

LADDER DIAGRAM

This chapter briefly explains the PLC ladder programs that come as a standard
equipment. Users who desire to change the sequential control of the HUST standard
PLC Ladder must fully understand the specific meanings of all S-bits and C-bits that are
described in Chap 6 before attempting to make any change. Prior to making any change,
lay out and design all the I/O points that are required for the work purposes. Note that
the S-bits, C-bits, and some I-bits are already defined in HUST H6C controller. Their
applications should not be altered or redefined. Otherwise, significant error may occur.
6.1

Introduction to Ladder Diagram (PLC or Ladder Program)

A ladder diagram is a sequential control chart for the CNC controller, which in turn
issues a voltage command to do some mechanical actions. To edit or revise a PLC
program, an optional software called HUST PLC Editor can be used.
Before writing a PLC program, a chart depicting the mechanical actions should be laid
out with the inputs and the outputs. With the chart, you start writing your PLC program.
When the PLC program is completed, you can burn the program into a FLASHROM.
During the burning process the ladder program will be translated into 68000 machine
codes which are executable by the H6C PLC logic controller. The command signals will
then be issued to the H6C CNC controller to do the appropriate work. Following
sections are brief discussions of the ladder diagrams for HUST H6C standard PLC. For
PLC Editor, please refer to HUST PLC Operation Manual.
6.1.1

Interface Signal Definitions for PLC Ladder Diagram (see Chap 6)

S-bit
: CNC status signals to PLC for sequential control.
C-bit : Command signals from PLC to CNC for motion control.
I-bit
: Input signals to the PLC from external I/O devices.
O-bit : Output signals from PLC to external I/O devices.
A-bit : Internal signals used by PLC itself for auxiliary purpose.
R000~R099 data will be saved when it is power-off and MCM #215 is set to 0/1.
6.1.2

Maximum Input/Output Points for PLC and PLC Editor

I-bit

: PLC (24 bits), PLC Editor (256 bits)standard


PLC (32 bits), PLC Editor (256 bits)expanded
O-bit
: PLC (16 bits), PLC Editor (256 bits)
PLC (32 bits), PLC Editor (256 bits)expanded
C-bit
: 256 bits for HUST H6C PLC and PLC Editor.
S-bit
: 256 bits for HUST H6C PLC and PLC Editor.
A-bit
: 1024 bits for HUST H6C PLC and PLC Editor.
Timer : 256 timers available with time bases of 10 ms, 50 ms, 0.1 sec, 1 sec.
Counter : 256 counters available for count-up, count-down, set, ring-up, ring-down.
Register : 256 registers available.

6 - 1

HUST H9C Connecting Manual

6 - 2

You might also like