Series 8 PLC Programming
Series 8 PLC Programming
HNC‐8 Numerical Control System Software
Maual of PLC Programming
V1.24
2016‐02
Wuhan Huazhong Numerical Control Co., Ltd.
HNC-8-PLC Programming specification Catalog
Content
CONTENT ................................................................................................. 错误!未定义书签。
PREFACE ................................................................................................................................1
OVERVIEW .............................................................................................................................3
ADDRESS ............................................................................................................................... 14
LD ........................................................................................................................................ 19
LDI ....................................................................................................................................... 21
OUT ..................................................................................................................................... 23
OOUT ................................................................................................................................... 25
SET ...................................................................................................................................... 27
RST ...................................................................................................................................... 28
AND ..................................................................................................................................... 29
HNC-8-PLC Programming specification Catalog
ANI ....................................................................................................................................... 30
OR ........................................................................................................................................ 31
ORI ....................................................................................................................................... 32
LDP ...................................................................................................................................... 33
LDF ...................................................................................................................................... 35
ANDP ................................................................................................................................... 36
ANDF ................................................................................................................................... 37
ORP ..................................................................................................................................... 38
ORF ..................................................................................................................................... 39
ORB ..................................................................................................................................... 40
ANB ...................................................................................................................................... 42
MPS、MRD、MPP .............................................................................................................. 44
Addition ADD.................................................................................................................... 64
Division DIV...................................................................................................................... 70
COUNTER .............................................................................................................................. 80
TIMER .................................................................................................................................... 86
Home.............................................................................................................................. 167
SEARCH............................................................................................................................... 249
DISCARD.............................................................................................................................. 268
Preface
Reader
manual is for machine user, which covers PLC introductions on HNC-8
CNC and their use, programming methods, examples and the like.
The
Scope
The programming applies to HNC-8 numerical control system with V1.24.
Notes
of this manual is authorized, organized and implemented by Wuhan
change the manual content. HNC will not be responsible for any losses
caused by that.
The matters which are not especially described in this manual are
Control Co., Ltd (HNC). Any publishing and copy by other units or
upgrades
Technical
support
Marketing Department: 027-87180095,027-87180303
Fax:027-87180303
1
HNC-8-PLC Programming specification Preface
market@h
Address:HUST Park, Miaoshan Region, East-lake Development Zone,
uazhongcn
Wuhan, Hubei Province, China
c.com
2
HNC-8-PLC Programming specification 1. PLC Summary
Overview
This chapter includes:
1.6 Address
3
HNC-8-PLC Programming specification 1. PLC Summary
Specifications of PLC
Specificatio Different PLC types have different program capacities, function instruction
ns counts, and usage range of register.
Specification HNC8
Program capacity
Subprogram (S) ——
Label (L) ——
(Y) Y0~~Y512
4
HNC-8-PLC Programming specification 1. PLC Summary
Numerical control system firstly converts the program to a format, then CPU
decodes and operates it. CPU rapidly reads each instruction in the storage, and
operates program via arithmetic operation. Sequential program starts from the
ladder diagram and other standard PLC languages. The ladder diagram can be
understood as the execution order of CPU arithmetic operation.
5
HNC-8-PLC Programming specification 1. PLC Summary
Allocation Interface
Interface
PLC interacts with external devices by external I/O. After control object is
identified and relevant input/output signals are calculated, corresponding
interfaces can be allocated to devices.
Allocation
Panel points have been allocated in the standard PLC programs of Series 8
system, user doesn’t need to change their definitions. At programming time, user
uses other intermediate registers instead of input/output registers, to program.
Several system interfaces bas been described in Appendix 7, to make a better
understand of panel point distribution of series 8. Y487 and Y488 are output
addresses of digital tubes on panel, X480 and X491 are panel input signals, and
Y480 and Y486 are panel output signals.
6
HNC-8-PLC Programming specification 1. PLC Summary
Sequential Program
PLC sequential control is achieved by software, and the principle of it is
different from that of common relay circuit. Thus, the principle of sequential
control should be fully understood at the time of designing PLC sequential
program.。
Execution In general relay control circuit, each relay may operate at the same time. In the
of figure below, when relay A acts, relay D and E can act at the same time (in the
sequential event of contact B and C being closed). In PLC sequential control, relays act in
program sequence. When relay A operates, relay D operates first, and then relay E
operates (see figure 2.1(a)), that is, each relay operates in the order described in
the ladder diagram.
Figure A and B show the movement difference between relay circuit and PLC
program.
Figure2.1(b)
Relay The actions in figure 2.1b(A) and figure 2.1b(B) are the same. After A (button
circuit switch) is turned on, B and C are on, with current flowing through coil B and C.
B is cut off after C is switched on.
7
HNC-8-PLC Programming specification 1. PLC Summary
PLC Similar with relay circuit, in figure 2.1b(A), after A (button switch) is turned on,
program B and C are on, and B is switched off after a PLC program cycle. However, in
figure 2.1b(B), after A (button switch) is turned on, C is switched on, but B is not.
Loop Sequential program executes from the beginning of the ladder diagram until the
execution end, after that, it goes back to execute the begging of the ladder diagram again,
which is called loop execution.
That execution time from the begging to the end is called loop period. The loop
period of PLC2 depends on the controlled steps. The shorter the loop period, the
rapider the response of signal.
Prior execution
8
HNC-8-PLC Programming specification 1. PLC Summary
Sequential program consists of three parts: initialization program, the first level program, the
second level program.
If the first level is longer, the total execution time will be longer. Therefore, you should document
as short program of the first level as possible. The second level program can be automatically
seperated into n parts, and executes every n ms.
Segmentation of the second level program is to execute the first level program. When the number
of segmentations is n, the implementation process is as below diagram:
9
HNC-8-PLC Programming specification 1. PLC Summary
When the last part of the second level program has executed, the program starts from the
beginning again. In the event of n segmentations, the time for one loop execution is n ms (1ms X
n). The first level program executes every 1ms, and the second level program executes every n X
1ms. If the steps of the first level program increases, the steps of the second level program will
correspondingly decrease within 1ms, then more segmentations will be gotten, and program
processing time will be longer. For this reason, the first level program should be documented as
briefly as possible.
The first level program only handles short pulse signal, which includes emergency stop, axis
over-travel, and the like.
10
HNC-8-PLC Programming specification 1. PLC Summary
11
HNC-8-PLC Programming specification 1. PLC Summary
Subprogra
m
Conditiona
l branch
12
HNC-8-PLC Programming specification 1. PLC Summary
13
HNC-8-PLC Programming specification 1. PLC Summary
Address
Address Address is used to differentiate signals. Various of addresses correspond to input
Definition and output signals of machine and CNC, internal relay, counter and the like. The
address is composed of address No. and bit No.
A word must be specified to the left of address No., to express the signal types as
below table:
14
HNC-8-PLC Programming specification 2. Basic instruction
Basic Instruction
Sequential program is mainly composed of coil, contact, symbol and function
block. The segments, by which elements of ladder diagram are jointed, form the
logical relationship of sequential program. Sequential program can be described
by ladder diagram language, as well as statement list language which is written
by mnemonics (LD, AND, OR, etc.) and register address. Ladder diagram is
written by coil contact of relay and function block.
Type:
Basic instruction
Basic instruction is the most basic and most common part of sequential program,
with a total of 19. It executes one-bit manipulation.
Function instruction
Function instruction can perform the functions that is hard to be done by basic
elements, and it can simplify programming.
Stack register (to store the intermediate result calculated) Result being executed
15
HNC-8-PLC Programming specification 2. Basic instruction
logically calculate with result in ST0, which then is saved in ST0. Therefore,
when sequential program is documented with statement list instruction, ANB and
ORB must correspond to the input instructions after the first instruction, one to
one; otherwise, errors may occur.
The role of this storage is similar with that of logical outcome storage. It is to
save result of current node, and is usually used for multi-output instruction with
conditional judgements (see detailed command instruction for the usage of MPS,
MRD, MPP). What differs from storage of logical outcome is that, it permits
reading result of node without stack out of the result. Only when the embedded
use of multi-output function is needed is storage push performed. Similarly, MPS
and MPP instructions must be used correspondingly; otherwise, logical errors
may occur.
Pre indicates that other elements can be connected to the front of the element,
and post indicates that other elements can be connected to the back of the
element.
16
HNC-8-PLC Programming specification 2. Basic instruction
Graphics Meaning
√ Must be used
× Cannot be used
17
HNC-8-PLC Programming specification 2. Basic instruction
18
HNC-8-PLC Programming specification 2. Basic instruction
LD
Format
Parameter 1
Function Read out status signal (1 or 0) of specified address, and save that signal in ST0.
It is used for the situation in which programming starts from the normal‐open
node.
Parameter Register point parameter
Example
Ladder Diagram
ANI X2 . 0 B
2 A.B
ANI R1 . 0 C
3 A.B.C
OUT R10 . 0 Outp
4 A.B.C
ut
W1
19
HNC-8-PLC Programming specification 2. Basic instruction
LD X5 . 0 D D
5
Desc
riptio
n
20
HNC-8-PLC Programming specification 2. Basic instruction
LDI
Format
Function Read out status signal (1 or 0) of specified address, and save that inverted signal
in ST0. It is used for the situation in which programming starts from
normal-closed node.
Parameter Register point parameter
Example
Ladder Diagram
1 A
ANI R2 . 0 B
2 A.B
ANI R1 . 1 C
3 A.B.C
OUT R10 . 0 W1
4 A.B.C
21
HNC-8-PLC Programming specification 2. Basic instruction
LDI X5 . 0 D
5 D
ORI X5 . 1 E
6 D+E
OR X5 . 3 F
7 D+E+F
8
AND R5 . 4 G
(D + E + F ).G
9
OUT R10 . 1 W2
(D + E + F ).G
Desc
riptio
n
22
HNC-8-PLC Programming specification 2. Basic instruction
OUT
Format
Function Output result of logic operation (status of ST0) to the specified address. It is
used to output the result to one or more than one addresses.
Example
Ladder Diagram
ORI X5 . 0 C
2 A+C
3
ANI G1 . 1 B
(A + C ).B
OUT R10 . 0 W1
4
(A + C ).B
5 OUT R10 . 1 W2
(A + C ).B
23
HNC-8-PLC Programming specification 2. Basic instruction
24
HNC-8-PLC Programming specification 2. Basic instruction
OOUT
Format
Function Output result of inverted logic operation (status of ST0) to the specified
address.
Parameter Register point parameter
25
HNC-8-PLC Programming specification 2. Basic instruction
Example
Ladder Diagram
1 LD R1 . 0 A A
A+C
Operation Process
2 OR X5 . 0 C
3 AND G1 . 1 B
( A + C ).B
4 OUT R10 . 0 W1
( A + C ).B
5
OOU R10 . 1 W2
( A + C ).B
T
Descriptio
n
26
HNC-8-PLC Programming specification 2. Basic instruction
SET
Format
Function Logic OR the result of logic operation (ST0) to the specified address, which
then is output to the same address.
Parameter Register point parameter
Example
Ladder Diagram
1 LD R1 . 0 A A
2 OR X5 . 0 B A+ B
3 SET R10 . 0 C A+ B
Descriptio
27
HNC-8-PLC Programming specification 2. Basic instruction
RST
Format
Function Logic AND the inverted result of logic operation (ST0) to the specified
address, which then is output to the same address.
Parameter Register point parameter
Example
R1.0 R10.0
Ladder Diagram
0
A C
X5.0
n
1 LD R1 . 0 A A
2 OR X5 . 0 B A+ B
3 RST R10 . 0 C A+ B
Descriptio
n
28
HNC-8-PLC Programming specification 2. Basic instruction
AND
Format
Parameter Register point parameter
Example See the example for LD instruction
29
HNC-8-PLC Programming specification 2. Basic instruction
ANI
Format
Function Logic AND NOT
Parameter Register point parameter
Example See the example for LD instruction
30
HNC-8-PLC Programming specification 2. Basic instruction
OR
Format
Function Logic OR
Parameter Register point parameter
Example See the example for LDI instruction
31
HNC-8-PLC Programming specification 2. Basic instruction
ORI
Format
Parameter Register point parameter
Example See the example for LDI instruction
32
HNC-8-PLC Programming specification 2. Basic instruction
LDP
Format
Function Get rising edge of trigger element signal, and save the signal in ST0.
Set input signal to 1 in the next scanning period of the rising edge of input
signal.
Parameter Register point parameter
Control Input signal: Set output signal to 1 at the rising edge of signal(0‐>1).
condition
Output signal: During operation, input signal keeps 1 within one PLC scanning
period.
Operation
33
HNC-8-PLC Programming specification 2. Basic instruction
Example
Ladder Diagram
ion
1 LDP R1 . 0 Rising edge of A
34
HNC-8-PLC Programming specification 2. Basic instruction
LDF
Format
Function Get falling edge of trigger element signal, and save the signal in ST0.
Set input signal to 1 in the scanning period of the falling edge of input signal.
Parameter Register point parameter
Control Input signal: Set output signal to 1 at the falling edge of signal(1->0).
condition
Output signal: During operation, input signal keeps 1 within one PLC
scanning period.
Operation
Execution
period
Example See the example for LDP instruction
35
HNC-8-PLC Programming specification 2. Basic instruction
ANDP
Format
Function Logic AND rising edge
Parameter Register point parameter
36
HNC-8-PLC Programming specification 2. Basic instruction
ANDF
Format
Function Logic AND falling edge
Parameter Register point parameter
37
HNC-8-PLC Programming specification 2. Basic instruction
ORP
Format
Function Logic OR rising edge
Parameter Register point parameter
38
HNC-8-PLC Programming specification 2. Basic instruction
ORF
Format
Function Logic OR falling edge
Parameter Register point parameter
39
HNC-8-PLC Programming specification 2. Basic instruction
ORB
Format
ORB
Function
2) ORB is to connect two or more series circuits that contain more than one
series blocks or contain the series ANB blocks.
3)Start the programming with LD or LDI, and have all series block being in
parallel via ORB.
Parameter No parameter
Example
40
HNC-8-PLC Programming specification 2. Basic instruction
Ladder Diagram
41
HNC-8-PLC Programming specification 2. Basic instruction
ANB
Format
ANB
Function
2) ANB is to connect two or more parallel circuits that contain more than one
parallel-connected blocks or contain the parallel ORB blocks.
3)Starts programming with LD or LDI, and have all series block being in
parallel via ORB.
Parameter No parameter
Example
42
HNC-8-PLC Programming specification 2. Basic instruction
Ladder Diagram
2 OR X1 . 1 B A+ B
9 ANB
(A+B)(.C.D+E.F+G)
10 OR X2. 2 H
(A+B)(. C.D+E.F+G)
+H
11 OUT R10. 0 I
(A+B)(. C.D+E.F+G)
+H
Descriptio
43
HNC-8-PLC Programming specification 2. Basic instruction
MPS、MRD、MPP
Format
MPS
MRD
MPP
Function 1) MPS Stores signal states of this point, waiting to be used when other lines
are output.
2) MRD reads signal from last storage point, connects to the next node, of
which signal status is always the same.
3) MPP brings up signal status from this storage point, connects to the next
node, and removes the status of this node.
Parameter No parameter
44
HNC-8-PLC Programming specification 2. Basic instruction
Example
Ladder Diagram Statement List
LD X1.0 AND X1.6
MPS ORB
LD X1.1 ANB
OR X1.2 OUT Y0.2
ANB MPP
OUT Y1.0 AND X1.7
MRD OUT Y0.3
LD X1.3 LD X2.3
AND X1.4 OR X2.4
LD X1.5 ANB
(followe OUT Y0.4
d by the
right)
LD X1.0 OUT Y1.1
MPS MPP
AND X1.1 AND X1.4
MPS MPS
AND X1.2 AND X1.5
OUT Y1.0 OUT Y0.2
MPP MPP
AND X1.3 AND X1.6
(followe
OUT Y2.0
d by the
right)
LD X1.0 OUT Y1.0
MPS MPP
AND X1.1 OUT Y1.1
MPS MPP
AND X1.2 OUT Y0.2
MPS MPP
AND X1.3 OUT Y2.0
MPS MPP
AND X1.4
OUT Y2.1
(followe
d by the
right)
45
HNC-8-PLC Programming specification 3. Basic component
Basic Element
This chapter includes the sections as following:
46
HNC-8-PLC Programming specification 3. Basic component
Normal‐open Contact
Symbol
Function When the bit saved in the specified address is “1”, the normal‐open contact
is closed; If the contact is closed, the signal will flow through this contact.
Example
Ladder Diagram
Description
When signal of X0.1 or X0.4 is “1”, and X0.2 signal is “1”, the
current is conducted, with R10.1 being output.
47
HNC-8-PLC Programming specification 3. Basic component
Normal‐close Contact
Symbol
Function When the bit saved in the specified address is “0”, the normal-open contact is
open; If the contact is open, the signal will flow through this contact.
Example
Ladder Diagram
n
Descriptio
When signal of X0.1 or X0.4 is “0”, and X0.2 signal is “1”, the
current is conducted, with R10.1 being output.
48
HNC-8-PLC Programming specification 3. Basic component
True Contact
Symbol
Function When PLC is turned on, the signal on the left of an element can always reach
the right through it. This function is usually used as the switch setting of
function module input, and used for those which need constantly valid input.
Parameter No parameter.
Example
Ladder Diagram
Description
When the second input of counter uses true contact, the counting
starts with 1 after counter is reset; when the third input uses true
contact, the counter counts in continuous subtraction.
49
HNC-8-PLC Programming specification 3. Basic component
Function When signal is changed from “0” to “1”, this contact is conducted.
Example
Ladder Diagram
50
HNC-8-PLC Programming specification 3. Basic component
Function When signal is changed from “1” to “0”, this contact is conducted.
Example
Di
Ladder
51
HNC-8-PLC Programming specification 3. Basic component
Logic Output
Symbol
Example
Di
Ladder
52
HNC-8-PLC Programming specification 3. Basic component
Example
Di
Ladder
53
HNC-8-PLC Programming specification 3. Basic component
Setting Output
Symbol
Function When result of logical operation is “1”, set output coil to output status, until
this coil is reset by other functions.
Example
Di
Ladder
54
HNC-8-PLC Programming specification 3. Basic component
Reset Output
Symbol
Function When result of logical operation is “1”, reset output coil, until this coil is set by
other functions.
Example
Lad
55
HNC-8-PLCComponent specification 4. Basic function module
4.3 Counter
4.4 Timer
4.6 Comparison
56
HNC-8-PLCComponent specification 4. Basic function module
Control Instruction
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres
□□□□ INT Constant Channel No. Pre ○
s 1>
<Addres Post √
□□□□ INT Constant M code No.
s 2>
Function Through the channel selected by parameter 1, parameter 2 selects M code
number which needs to be determined. When this channel gets this M code,
the output is “1”; otherwise, the output is “0”.
Example
Ladder Diagram
Statement List
LD X2.0
MGET 0 3
WRT R4.0
cript
57
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres
□□□□ INT Constant Channel No.
s 1> Pre ○
<
Post ×
Address □□□□ INT Constant M code No.
2>
Function When M Code has been implemented in this channel, it is necessary to reply to
M code. After the reply, this M instruction can continue the next instructions.
Example
Ladder Diagram
List
Statement
LD X3.6
MACK 0 3
cript
58
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Explanat
Storage area Properties
er form type ion
<Addres Channel Pre ○
□□□□ INT Constant
s 1> No. Post √
<Addres INT Constant, Y, G, R, T code
□□□□
s 2> W, D, B No.
Function Through the channel selected by parameter 1, parameter 2 is where the gotten
T code is stored in. When this channel gets T code, the output is 1; otherwise,
the output is 0.
Ladder Diagram
Example
Statement List
LDT
TGET 0 R5
OUT R6.1
tion
Descrip
59
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Explanat
Storage area Properties
er form type ion
Pre ○
<Addres INT Constant Channel
□□□□ Post ×
s 1> No.
Function Through the channel selected by parameter 1, set to T code response in this
channel.
Example
Ladder Diagram
List
Statement
LD X3.4
TACK 0
cript
60
HNC-8-PLCComponent specification 4. Basic function module
Function Handwheel control (only for series 8)
Parameter Parameter 1: the register which the handwheel pulse increment inputs. (The
default register for handwheel of series 8 is X490)
Example
Ladder Diagram
List
Statement
LD X3.4
RTOMPG X40 0
tion
Descrip
61
HNC-8-PLCComponent specification 4. Basic function module
Parameter Data Storage Properti
Parameter Explanation
form type area es
<Address
□□□□ INT Constant
1>
< Address
□□□□. □ BOOL X Pre ○
2>
< Address Post ×
□□□□ INT Constant
3>
< Address
□□□□. □ BOOL P
4>
Function
Analog signal of temperature sensor is converted to digital signal by AD of IO module, and is
input to a positon (group number) of X register which is determined by device parameter of IO
module.
Parameter
Parameter 3: thermocouple grid type (its default value is 0. 1: the corresponding model is built to
calculate temperature, by the user parameter specified by “parameter 4” which includes the lowest
and highest (the temperature corresponding to the voltage of 6.7 V) temperatures; 2: temperature
62
HNC-8-PLCComponent specification 4. Basic function module
Note: The thermocouple grid type of 2 and 3 are standard configurations, where the corresponding
bus thermocouple grid can be connected, there are models of corresponding temperature in system,
and the value of P parameter doesn’t need to be set.
Parameter 4: set the range of acquisition temperature for temperature sensor by user parameter (P
parameter). As shown in the figure below, P30 specifies the acquisition for the lowest
temperatures, and P31 specifies the acquisition for the highest temperatures (the temperature
corresponding to the voltage of 6.7 V, unit: degree). If the thermocouple grid type is 2 or 3, set
value of P parameter will not be read.
Ladder Diagram
List
nt
eme
Stat
Example
63
HNC-8-PLCComponent specification 4. Basic function module
Mathematical Operation
Addition ADD
Format
Expl
Paramete Parameter Data Properti
Storage area ana
r form type es
tion
<Address INT Constant, X, Y, F, G,
□□□□
1> R, W, D, P, B
< INT Constant, X, Y, F, G,
Address □□□□ R, W, D, P, B Pre √
2> Post ○
<
Address □□□□ INT Y, G, R, W, D, B
3>
Function Perform addition operation.
Parameter Parameter 1: augend
Parameter 2: addend
Parameter 3: operation result output address.
64
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
ADD D0 100 D1
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D1=D0+100 is implemented.
65
HNC-8-PLCComponent specification 4. Basic function module
Subtraction SUB
Format
Data Expla Properti
Parameter Parameter form Storage area
type nation es
INT Constant, X、
< Address
□□□□ Y, F, G, R, W,
1>
D, P, B
INT Constant, X, Pre √
< Address
□□□□ Y, F, G, R, W, Post ○
2>
D, P, B
< Address Y, G, R, W, D,
□□□□ INT
3> B
Function Perform subtraction operation.
Parameter 2: subtrahend
Parameter 3: operation result output address.
66
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
SUB D0 100 D1
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D1=D0‐100 is implemented.
67
HNC-8-PLCComponent specification 4. Basic function module
Multiplication MUL
Format
Data Explana Properti
Parameter Parameter form Storage area
type tion es
INT Constant, X,
<Address
□□□□ Y, F, G, R, W,
1>
D, P, B
INT Constant, X, Pre √
<Address
□□□□ Y, F, G, R, W, Post ○
2>
D, P, B
<Address Y, G, R, W, D,
□□□□ INT
3> B
Function Perform multiplication operation.
Parameter 2: multiplier
Parameter 3: operation result output address.
68
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
MUL D0 100 D1
OUT R4.0
ion
cript
Des
D1=D0*100 When X3.4 is turned on, D1=D0*100 is implemented.
69
HNC-8-PLCComponent specification 4. Basic function module
Division DIV
Format
Parameter Data Explana Properti
Parameter Storage area
form type tion es
INT Constant, X,
<Address
□□□□ Y, F, G, R, W,
1>
D, P, B
INT Constant, X, Pre √
<Address
□□□□ Y, F, G, R, W, Post ○
2>
D, P, B
<Address Y, G, R, W, D,
□□□□ INT
3> B
Function Perform division operation.
Parameter 2: divisor
Parameter 3: operation result output address.
70
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
DIV D0 100 D1
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D1=D0/100 is implemented.
71
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres INT Y, G, R, W, Pre √
□□□□
s 1> D, B Post ○
Function Perform plus‐one operation.
Example
Ladder Diagram
Statement List
LD X3.4
INC D0
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D0=D0+1 is implemented.
72
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres INT Y, G, R, W, Pre √
□□□□
s 1> D, B Post ○
Function Perform minus‐one operation.
Example
Ladder Diagram
Statement List
LD X3.4
DEC D0
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D0=D0‐1 is implemented.
73
HNC-8-PLCComponent specification 4. Basic function module
Parameter Data Storage Explanatio Properti
Parameter
form type area n es
INT Constant, X,
<Address
□□□□ Y, F, G, R,
1>
W, D, P, B
INT Constant, X, Pre √
<Address
□□□□ Y, F, G, R, Post ○
2>
W, D, P, B
<Address Y, G, R, W,
□□□□ INT
3> D, B
Function Perform logic AND.
Parameter 2: operand.
Parameter 3: operation result output address.
Example
Diagram
Ladder
LD X3.4
nt List
Stateme
WAND D0 100 D1
OUT R4.0
ion
cript
Des
When X3.4 is turned on, D0=D0&100 is implemented.
74
HNC-8-PLCComponent specification 4. Basic function module
Logic OR WOR
Format
Parameter Data Storage Explanatio Properti
Parameter
form type area n es
INT Constant, X,
<Address
□□□□ Y, F, G, R,
1>
W, D, P, B
INT Constant, X, Pre √
<Address
□□□□ Y, F, G, R, Post ○
2>
W, D, P, B
<Address Y, G, R, W,
□□□□ INT
3> D, B
Function Perform logic OR
Parameter 2: operand.
Parameter 3: operation result output address.
75
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
WOR D0 100 D1
OUT R4.0
i
cript
Des
When X3.4 is turned on, D0=D0|100 is implemented.
76
HNC-8-PLCComponent specification 4. Basic function module
Function Perform logic XOR.
Parameter 2: operand
Parameter 3: operation result output address.
77
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X3.4
WXOR D0 100 D1
OUT R4.0
cript
When X3.4 is turned on, D0=D0^100 is implemented.
78
HNC-8-PLCComponent specification 4. Basic function module
Complement NEG
Format
Function Perform complement operation.
Example
Ladder Diagram
Statement List
LD X3.4
NEG D0
OUT R4.0
cript
When X3.4 is turned on, D0=-D0 is implemented.
79
HNC-8-PLCComponent specification 4. Basic function module
Counter
Parameter Data Storage Explanatio Properti
Parameter
form type area n es
<Address
□□□□. □ BOOL R, W, D, B
1>
Pre √
<Address INT Constant, R, Post √
□□□□
2> W, D, B, P
Function Common plus‐minus counter.
Parameter Parameter 1: current value of counter. This function is used to get the current
value of the counter.
Input
Input 1: control input
Input 2: start value after counter is reset. When condition is satisfied, the
counting starts with 1; when condition is not satisfied, the counting starts with 0.
80
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X2.5
LD X4.0
LD X4.1
LD X4.2
CTR R0 16
OUT Y1.4
Description
If X4.0 is turned on, the counting will start with 1. If X4.1 is turned
on, the counter will decrease the count. When X2.5 has been turnd on
sixteen times, the output is Y1.4. X4.2 is the reset signal, to clear the
counter output. When X2.5 has been turned on five times, the value
of R0 is 6
81
HNC-8-PLCComponent specification 4. Basic function module
Counter CTRC
Format
Function Fixed counter
Example
82
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
List LD X2.5
Statement LD X4.0
CTRC 0 100
OUT Y1.4
When X2.5 is switched on and then off 100 times, the counter is
n
Descriptio
on. When X4.0 is switched on, the counter is reset, and the signal
is output to Y1.4.
83
HNC-8-PLCComponent specification 4. Basic function module
Paramete Parameter Data Storage Explanatio
Properties
r form type area n
<Address
□□□□ INT Constant
1>
Pre √
<Address INT Constant, R, Post √
□□□□
2> W, D, B, P
Function Plus‐minus counter of custom start value.
Input 2: start value after reset. When condition is satisfied, the counting starts
with 1; when condition is not satisfied, the counting starts with 0.
84
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X2.5
LD X2.6
LD X2.7
LD X2.8
CTUD 0 100
OUT Y1.4
Description
When X2.5 is switched on and off 100 times, counter 0 is on, and the
signal is output to Y1.4. When X2.6 is switched on, the counter 0
counts with 1 after being reset; otherwise, the counter 0 counts with 0.
When X2.7 is switched off, the count is incremented; otherwise, the
count is decremented. When X2.8 is switched on, the counter 0 is reset.
85
HNC-8-PLCComponent specification 4. Basic function module
Timer
Paramet Data Explanat Properti
Parameter form Storage area
er type ion es
<Addres
□□□□ INT Constant
s 1>
<Addres
□□□□ INT Constant Pre √
s 2>
Post ○
<Addres INT Constant, R、
□□□□
s 3> W、D、P
Sequence
diagram ACT
TMRB
86
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Statement List
LD X35.5
TMRB 1 0 100
OUT Y4.2
tion
Descrip
After X35.5 has been on for 100ms, timer 1 in switched on, and the
signal is output to Y4.2.
87
HNC-8-PLCComponent specification 4. Basic function module
Paramet Data Storage Explanatio Properti
Parameter form
er type area n es
<Addres
□□□□ INT Constant
s1>
<Addres
□□□□ INT Constant Pre √
s2>
Post ○
<Addres INT Constant, R,
□□□□
s3> W, D, P
Sequence
diagram
88
HNC-8-PLCComponent specification 4. Basic function module
Parameter
Example
Ladder Diagram
Statement List
LD X35.5
STMR 1 0 100
OUT Y4.2
tion
Descrip
After X35.5 has been off for 100ms, timer 1 is off, and the output of
Y4.2 is cut off.
89
HNC-8-PLCComponent specification 4. Basic function module
Process Control
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ×
None None None None
Post ×
Function Defining initialization module is ended. Program generally is preceded by
initialization module which is performed only once after the system is turned
on.
Example
Diagram
Ladder
nt
eme
IEND
i
cript
Des
Initializer is ended.
90
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ×
None None None None
Post ×
Function PLC1 module is finished.
Example
Diagram
Ladder
List
Statement
1END
Description
91
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ×
None None None None
Post ×
Function PLC2 module is finished.
Example
Diagram
Ladder
List
Statement
2END
Description
92
HNC-8-PLCComponent specification 4. Basic function module
Jump JMP
Format
JMP <Address 1>
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres Pre √
□□□□ INT L
s1> Post ×
Function Jump by tag.
Example
Ladder Diagram
List
Statement
LD X35.5
JMP L1111
cript
93
HNC-8-PLCComponent specification 4. Basic function module
Label LBL
Format
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres Pre ○
□□□□ INT L
s1> Post ×
Function Label, jump by label. It is used with JMP.
Example
Ladder Diagram
nt List
Stateme
LBL L1111
Description
94
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres Pre ○
□□□□ INT S
s1> Post ×
Parameter Subprogram number.
Example
Ladder Diagram
X12.2
CALL S123
List
Statement
LD X12.2
CALL S123
Description
95
HNC-8-PLCComponent specification 4. Basic function module
Subprogram Start SP
Format
SP <Address 1>
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres Pre ×
□□□□ INT S
s1> Post ×
Parameter Number (support up to 512 numbers of subprogram.
Example
Ladder Diagram
Statement List
SP S111
Description
96
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ×
None None None None
Post ×
Parameter
Example
Ladder Diagram
List
Statement
SPE
n
Descriptio
Subprogram is ended.
97
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ○
None None None None
Post ×
Parameter
Example
Ladder Diagram
List
Statement
LDI R100.0
RETN
cript
98
HNC-8-PLCComponent specification 4. Basic function module
Loop LOOP
Format
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres Pre ×
□□□□ INT Constant
s1> Post ×
Function To start the loop. The statement within the body of each loop will be executed.
After all loops are finished, the rest statement will be continued. This instruction
must be used with NEXT instruction.
Parameter Number of loops, constant and register can be used.
Example
Ladder Diagram
Statement List
LOOP 5
NEXT
cript
99
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Pre ×
None None None None
Post ×
Example
Ladder Diagram
nt
eme
NEXT
cript
100
HNC-8-PLCComponent specification 4. Basic function module
Comparison
Comparison CMP
Format
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Function To compare. When the address 1 is larger than address 2, the output is 0, when
the address 1 is lower than or equal to the address 2, the output is 1.
101
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
n
Descriptio
102
HNC-8-PLCComponent specification 4. Basic function module
Lower Than LT
Format
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Constant
When the address 1
<Addres , X, Y, F,
□□□□ INT is larger than or
s1> G, R, W,
equal to the address
D, P, B
2, the output is 0, Pre ○
when the address 1 Post √
Constant
is smaller than the
<Addres , X, Y, F,
□□□□ INT address 2, the
s2> G, R, W,
output is 1.
D, P, B
Function To compare. When the address 1 is larger than or equal to the address 2, the
output is 0, when the address 1 is smaller than the address 2, the output is 1.
Example
Ladder Diagram
Des
103
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function Area comparison. When data of address 3 is larger than that of address 1, and
smaller than that of address2, the output is 1.
Parameter Parameter 1: the low end of comparison range, can be constant or register.
Example
Ladder Diagram
Des
104
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function Consistency comparison, When the data of address 1 and address 2 are the
same, the output is 1; when they are not the same, the output is 0.
Example
Ladder Diagram
Descripti
105
HNC-8-PLCComponent specification 4. Basic function module
Data Manipulation
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres Constant, X, Y, F,
□□□□ INT
s1> G, R, W, D, P, B Pre ○
Moving
data Post √
<Addres Y, G, R, W, D, B
□□□□ INT
s 2>
Function To move data. To transfer source data to destination address.
Example
Ladder Diagram
Des
106
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function To move data. To transfer source data to the destination address.
Parameter Parameter 1: the format of operand 1. 0 represents register, 1 represents
register B, 2 represents register P. For example, the parameter 1 is 0 and the
parameter 2 is R10, which can represent R10 address; the parameter 1 of 1
and the parameter 2 of R10 represent the register B, and the data stored in
R10 group of register B; the parameter 1 of 2 and the parameter 2 of R10
represent the register P, and the data stored in R10 group of register P.
Parameter 2: the address of operand 1.
Parameter 3: the address of operand 2.
Parameter 4: the address of operand 2.
107
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Descrip
108
HNC-8-PLCComponent specification 4. Basic function module
Function Move data in batch. Multiple data of source starting address is transferred to
starting address of destination.
Example
109
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
Descrip
Two data starting from D0 is assigned to two positions starting from D2,
that is, D0 is assigned to D2, and D1 is assigned to D3.
110
HNC-8-PLCComponent specification 4. Basic function module
Function Multiple moving data. Source data is transferred to a space that from the
starting address of destination to ending address of destination.
Example
111
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
Descripti
112
HNC-8-PLCComponent specification 4. Basic function module
D1□□□
D2□□□
XCH
D3□□□
D4□□□
Function Data exchange. Address of operand 2 is exchanged with address of operand 4.
The format of operand 2 can be represented by the value of address 1. 0
indicates the default register which is used in address 2, 1 indicates that B
register is used in address 2. In the same way, the format of operand 4 can be
represented by the value of address 3.
Parameter Parameter 1: the format of operand 1. 0 indicates register, 1 indicates B
register, and 2 indicates P register. For example, parameter 1 is 0 and
parameter 2 is R10, which represent the address R10. Parameter 1 of 1, and
parameter 2 of R10, represent B register, and the data stored in group R10 of
register B. Parameter 1 of 2, and parameter 2 of R10, represent P register,
and the data stored in group R10 of register P.
113
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Descripti
114
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function Data reset. Reset the data which is from starting address of operand to ending
address of operand.
Example
Ladder Diagram
Descripti
115
HNC-8-PLCComponent specification 4. Basic function module
Encoding ENCO
Format
<Address 1>
<Address 2>
ENCO
<Address 3>
<Address 4>
Function Encode. When there are 5 data bits (3, 5, 7, 8, 9) from the starting position of
encoded data, if source data is 3, the output is 00000001B, if source data is 5,
the output is 00000010B, if source data is 7, the output is 00000100B.
Parameter Parameter 1: the starting position of encoded data, can use register D.
Example
116
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
Des
117
HNC-8-PLCComponent specification 4. Basic function module
Decoding DECO
Format
<Address 1>
<Address 2>
DECO
<Address 3>
<Address 4>
Parameter Data Explan Proper
错误! Parameter Storage area
form type ation ties
□□□□. BOOL X, Y, F, G, R, W, D, P, B Pre√
<Address1>
□
It is
used
<Address 2> □□□□ INT Constant
for
overrid
□□□□. BOOL X, Y, F, G, R, W, D, P, B
<Address 3> e value
□
conver
sion
□□□□. BOOL Y, G, R, W, D, P, B Post×
<Address 4>
□
Function Decoding, which is reversed to encoding.
Parameter Parameter 1: the starting position of decoded data, can use register D.
118
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Des
119
HNC-8-PLCComponent specification 4. Basic function module
Transformation COD
Format
<Address 1>
<Address 2>
COD
<Address 3>
<Address 4>
Function Code transformation. It is mainly used for override value conversion. Take
spindle overrise as an example, there are 8 data bits (50, 60, 70, 80, 90, 100, 110,
120) from D0; when source data is 0, the data transformed is 50; when source
data is 1, the data transformed is 60; when source data is 2, the data transformed
is 70.
Parameter Parameter 1: the starting position for transforming data, can be register D.
120
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Des
121
HNC-8-PLCComponent specification 4. Basic function module
<Address 1>
<Address 2>
SER
<Address 3>
<Address 4>
Function To search data. Search a data in a statement list. When the data is found, the
output is 1; when the data is not found, the output is 0.
122
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Descrip
Search the data of D4 in the four data from D0, and output the position
of the data being found to D5.
123
HNC-8-PLCComponent specification 4. Basic function module
Function To merge several register data into one register.
parameter
Example
124
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
Descrip
Merge the four data which are from X0 into one data (that is, merge
four 8-bit data into one 32-bit data)
125
HNC-8-PLCComponent specification 4. Basic function module
Function To break up the data of one register into several registers.
Parameter
Example
126
HNC-8-PLCComponent specification 4. Basic function module
Ladder Diagram
Descrip
Break up the data of D0 into the four data which are from Y0 (that is,
one 32-bit data is broken up into 4 8-bit data).
127
HNC-8-PLCComponent specification 4. Basic function module
Function Convert source data which follows a certain proportional relationship to target
data.
0 Minimum value of source data
1 Maximum value of source data
2 Minimum value of target data
3 Maximum value of target data
128
HNC-8-PLCComponent specification 4. Basic function module
Example
Ladder Diagram
Descrip
129
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre √
<Addres
□□□□ INT Constant Number
s 1>
Post √
Function Alternate output. The component keeps its output status, until it encounters
the rising edge, then the output status changes (change from 0 to 1, or 1 to 0).
Example
Ladder Diagram
Descrip
When R100.0 is turned off from turned on, the module 1 changes the
output status.
130
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function Get the status of the current line or current position, and get its trigger signal of
the rising edge.
Set the input signal to 1 in the current scan cycle of the rising edge signal.
(Note the difference between the trigger component of rising edge for basic
component and this function). This function is suitable for the situations where
the rising edge status needs to be detected.
Example
Ladder Diagram
Descrip
When R100.0 status is changed from 0 to 1, fetch its rising edge status
and the output of R10.0 is 1.
131
HNC-8-PLCComponent specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Function Get the status of the current line or current position, and get its trigger signal of
the falling edge.
Set the input signal to 1 in the current scan cycle of the falling edge signal. (Note
the difference between the trigger component of falling edge for basic
component and this function). This function is suitable for the situations where
the falling edge status needs to be detected.
Example
Ladder Diagram
Descrip
When R100.0 status is changed from 1 to 0, fetch its falling edge status
and the output of R10.0 is 1.
132
HNC-8-PLC Component specification 4. Basic function module
<Address 3> □□□□ INT Constant
Pre ○
When the
X, Y, F, G, R,
□□□□. point is
<Address 4> BOOL W, D, P, T,
□ effective,
C, B
the
correspon
<Address 5> □□□□ INT Constant
ding
number is
X, Y, F, G, R,
□□□□. generated
<Address 6> BOOL W, D, P, T,
□ .
C, B
<Address 7> □□□□ INT Constant Post ×
X, Y, F, G, R,
□□□□.
<Address 8> BOOL W, D, P, T,
□
C, B
133
HNC-8-PLC Component specification 4. Basic function module
Parameter 2: point 1
Parameter 4: point 2
Parameter 5: number 2
Parameter 6: point 3
Parameter 7: number 3
Parameter 8: point 4
Parameter 9: number 4
Example
Ladder Diagram
Description
134
HNC-8-PLC Component specification 4. Basic function module
Function To build the corresponding relationship between numbers and points. The
point signal corresponding to the number in Parameter 1 is
generated.
135
HNC-8-PLC Component specification 4. Basic function module
Parameter 2: number 1
Parameter 3: point 1
Parameter 5: point 2
Parameter 6: number 3
Parameter 7: point 3
Parameter 8: number 4
Parameter 9: point 4
Example
Ladder Diagram
Description
136
HNC-8-PLC Component specification 4. Basic function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
When Pre ○
condition is
satisfied, 1 is
<Addres
□□□□ INT Constant added to part
s 1>
count of Post √
<Address 1>
channel.
Function To count machined parts.
Example
Ladder Diagram
on
Descripti
137
HNC-8-PLC Component specification 4. Basic function module
Paramet Parameter Data Storage Properti
Explanation
er form type area es
Function Clear the count of the part.
Example
Ladder Diagram
Description
138
HNC-8-PLC Component specification 4. Basic function module
139
HNC-8-PLC Component specification 4. Basic function module
X, Y, F, G, When Address
<Address
□□□□. □ BOOL R, W, D, P, 2 is 0, the Pre ○
1>
T, C, B temperature
collection
<Address module starts
□□□□ INT Constant to count, and
2>
the
temperature
data in Address
1 is stored in Post×
<Address
□□□□ INT Constant the starting
3>
address given
by Address 3.
Parameter 3: the initial location where the temperature collection data is stored,
and it can be register.
140
HNC-8-PLC Component specification 4. Basic function module
Example
Ladder Diagram
Description
141
HNC-8-PLC Component specification 5. Status word and control word programming
142
HNC-8-PLC Component specification 5. Status word and control word programming
The status word and control word are the most direct way of the interaction
between CNC and PLC. The status data of system can be obtained through the
status word, and you can write control word to change the system state. In the
system series 8, F represents status word with its property being read-only, G
represents control word with its property being read-write.
However, to limit the use of some key functions of system, some control words
are restricted, or are invisible to user. Please read following constraints of status
word and control word carefully.
Usage
restrictions
can be used
of status
word and reserved for future extension
control cannot be used by user
word
Range of Status words and control words can be divided into three types for each of its
application function in the system. They all have serviceable range, refer to the configuration
manual for details.
In this example, the format is channel 3, the second group of status word, and
143
HNC-8-PLC Component specification 5. Status word and control word programming
No.0 status word. 2560 is the offset of the channel status word. The format of
other types of words is similar.
144
HNC-8-PLC Component specification 5. Status word and control word programming
Axis status D7 D6 D5 D4 D3 D2 D1 D0
Return to
F0 Home Return to
Subaxis Subaxis Subaxis Home the Axis
completin the first
follow zero home failure second moving
g reference
reference
Axis The
Axis The forth The third The first
Axis reset Axis lock parameter second
overload reference reference reference
ok reference
Orientatio
F1 SPD Spindle n Rapid Spindle PMC
Reserved Reserved
arrival stop completin feed mode enable
F2 Capture
Servo Zero Servo 2nd stage
Reserved Reserved Servo ready the first Z
parameter capture home home
pulse
Orientatio
n
Reserved Reserved Reserved Reserved Reserved Reserved Reserved
completin
145
HNC-8-PLC Component specification 5. Status word and control word programming
Details 【F0.0】During the axis movement, when the axis is moving, the value is 1;
when the axis is not moving, the value is 0.
【F0.1】The first step of returning home: when the axis is returning home
without meeting home block, the value is 1; otherwise, the value is 0.
【F0.2】The second step of returning home: when Z pulse is being looked for,
the value is 1; otherwise, the value is 0.
【F0.3】Unsuccessful homing: when the axis hasn’t returned to zero, the value is
1; otherwise, the value is 0.
【F0.4】Successful homing: When the axis has been to zero, the value is 1;
otherwise, the value is 0.
【F0.5】Subaxis is returning home.
【F0.6】Zero point of subaxis has been checked.
【F0.7】Following status of subaxis has been released.
【F0.8】Comfirm the first reference: when the axis is at the first reference point,
the value is 1; otherwise, the value is 0.
【F0.9】Comfirm the second reference: when the axis is at the second reference
point, the value is 1; otherwise, the value is 0.
【F0.10】Comfirm the third reference: when the axis is at the third reference
point, the value is 1; otherwise, the value is 0.
【F0.11】Comfirm the forth reference: when the axis is at the forth reference
point, the value is 1; otherwise, the value is 0.
【F0.13】Axis parameter is effective.
【F0.14】Axis has been locked.
【F0.15】Axis has been repositioned.
【F1.0】PMC control enabled. When PMC control has been enabled, the value is
1; otherwise, the value is 0.
【F1.1】Feed spindle mode. 1 is position mode, and 0 is speed mode.
【F1.5】Orientation of feed spindle has been finished.
146
HNC-8-PLC Component specification 5. Status word and control word programming
147
HNC-8-PLC Component specification 5. Status word and control word programming
148
HNC-8-PLC Component specification 5. Status word and control word programming
149
HNC-8-PLC Component specification 5. Status word and control word programming
Axis
control
word
D7 D6 D5 D4 D3 D2 D1 D0
G0
D15 D14 D13 D12 D11 D10 D9 D8
negative positive
direction direction
ation follow
expansion
G1
*SP *SP *SP *SP Jog Expand The Relative Absolute
limit
G2
Servo Reserved Reserved Reserved Capture Z
Capture Z
Parameter pulse of Reserved Reserved
pulse
encoder 2
G3
Reserved Reserved Reserved Reserved Reserved Reserved Reserved Servo
enable
Details
150
HNC-8-PLC Component specification 5. Status word and control word programming
【G0.14】Compensation expansion
【G0.15】Single-axis reset
【G1.4】Feed-spindle Jog.
【G1.5】Feed-spindle orientation.
【G2.0】Z pulse flag. (when motor is at the position of Z pulse, this flag is 1.)
151
HNC-8-PLC Component specification 5. Status word and control word programming
【G2.15】Spindle current-limiting
【G4】Axis jog flag. When the axis is manual, or returning to zero, or the spindle
is rotating, this flag is effective.
【G8】Incremental rate.
【G9】Handwheel rate.
【G[10/11]】handwheel pulse.
【G[38/39]】Sample timestamp
152
HNC-8-PLC Component specification 5. Status word and control word programming
153
HNC-8-PLC Component specification 5. Status word and control word programming
Axis status D7 D6 D5 D4 D3 D2 D1 D0
User
Cycle
interventi 非自动时运动 Feedhold Mode #3 Mode #2 Mode #1 Mode #0
start
F2560 on
Interrupti
Wait for Interrupti Procedure Program Program
reserved reserved on
comletion on skip complete start select
F2561 complete
Non-null Non-null
n n
F2562
reserved reserved reserved reserved reserved reserved reserved reserved
Spindle is
4S 3S 2S 1S at Index
Tool
instructio instructio instructio instructio constant instructio reserved
offset flag
n n n n linear n
speed
Details
154
HNC-8-PLC Component specification 5. Status word and control word programming
【F2560.8】Cutting.
not allowed.
【F2560.11】Verify state.
【F2560.13】Suspend request.
【F2560.14】Channel is resetting.
155
HNC-8-PLC Component specification 5. Status word and control word programming
【F[2604/2607]】User output.
【F2632】Number of tool which is alarmed for the maximum life span being
reached.
【F2636.0】Channel is resetting.
【F2637.4】Complete loading.
【F2637.5】Start running.
156
HNC-8-PLC Component specification 5. Status word and control word programming
【F2637.6】Complete running.
【F2637.8】Process ends.
【F2637.9】Process error
【F2637.10】Process reset.
157
HNC-8-PLC Component specification 5. Status word and control word programming
Axis D7 D6 D5 D4 D3 D2 D1 D0
word
Measure
Handwhe
Program External
el User Explanati
Reserved modificati Reserved interruptio Reserved
interruptio motion on save
on n
n
G2562
Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved
Rotation
Reserved Reserved No Speed Reserved Reserved
speed MST lock
spindle check
arrival
Rapid
Reserved Reserved Reserved Reserved Reserved Incremental rate
traverse
Handwheel 1 Handwheel 0
G2621 Handwhe Hanwheel 0 rate
Reserved Reserved Reserved
el 1 Hanwheel 1 rate
enable
158
HNC-8-PLC Component specification 5. Status word and control word programming
Axis 8-
G2623 Reserved Reserved Reserved Reserved Reserved Reserved Reserved
【G2560.8】Verify
【G2560.9】PLC reset response: when PLC has been reset, set this flag to 1.
【G2560.10】Panel reset flag. Through deteting this flag, PLC discover whether
the system is resetting.
159
HNC-8-PLC Component specification 5. Status word and control word programming
selection stop.
【G2561.9】Exact-stop check.
【G2562.11】MST lock.
【G2562.14】Following start.
【G2563】T instruction.
【G2564】Feedrate override.
160
HNC-8-PLC Component specification 5. Status word and control word programming
【G2579】Machined-part counts
161
HNC-8-PLC Component specification 5. Status word and control word programming
【G2616】T code response of channel. When PLC has executed T code, set to
the currently executed T code; otherwise, set to -1.
【G2636.0】Channel reset (PLC sets register, and notifies HMI to reset channel.)
【G2636.3】IRQ control
162
HNC-8-PLC Component specification 5. Status word and control word programming
【G2561.0】Interpreter start.
163
HNC-8-PLC Component specification 5. Status word and control word programming
Ladder
diagram
Function
Set the status in the working pattern of channel. When the axis is in the position
control mode, set the working pattern of the current channel to auto, single block,
manual, increment, handwheel or home.
164
HNC-8-PLC Component specification 5. Status word and control word programming
Ladder
diagram
Function Get the status in the working pattern of channel, which can be auto, single block,
manual, increment, handwheel or home.
165
HNC-8-PLC Component specification 5. Status word and control word programming
Ladder
diagram
Function It is used to control the movement of feed axis, and the spindle rotation. Set the
current channel mode to manual mode, if you press Axis selection, and positive
or negative movement button, the moving status of the current axis will be set,
thus the axis will move; if you press spindle rotation (CW or CCW) button, the
rotation direction of the spindle will be set.
166
HNC-8-PLC Component specification 5. Status word and control word programming
Home
Example
Ladder
diagram
Function Obtain whether the current channel is returning home, through the status register.
During the process of meeting the home block, which is the first home process,
switching to other statuses is allowed; During the process of researching Z pulse,
which is the second home process, switching to other statuses is not allowed.
167
HNC-8-PLC Component specification 5. Status word and control word programming
Ladder
diagram
Function Incremental rate consumes two bits. 00 represents x1, 01 represents x10, 10
represents x100, and 11 represents x1000. The axis movement is controlled by
the setting of above axis register.
168
HNC-8-PLC Component specification 5. Status word and control word programming
Ladder
diagram
Function When the working pattern of channel is auto or single block, and is not at cycle
start, set to cycle start. Set to feed hold under the status of cycle start. If the
setting is successful, the system will be at the state of feed hold.
169
HNC-8-PLC Component specification 6. Extended function module
6.1 NC Function
170
HNC-8-PLC Component specification 6. Extended function module
NC Function
Paramet Parameter Data Storage Properti
Explanation
er form type area es
<Addres
INT Constant Channel No.
s 1> Pre ○
Constant, F,
<Addres Work mode Post ×
INT G, R, W, D,
s 2> value
P, B
Function Set the work mode of the current channel (Auto, Single-block, Manual,
Increment, Reference home, Handwheel, PMC)
Parameter Refere
Work mode Single‐ Manu Incre Hand
Auto nce PMC
Parameter block al ment wheel
home
D2□□□ 1 2 4 8 16 32 64
Supplemen If one of channel state is axis homing, switching mode will not be allowed.
tary note
171
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme
MDST 0 R0
nt List
Descripti
Set the work mode of channel 0 based on the value of R0.
on
172
HNC-8-PLC Component specification 6. Extended function module
Parameter Refere
Work mode Single‐ Manu Incre Hand
Auto nce PMC
Parameter block al ment wheel
home
D2□□□ 1 2 4 8 16 32 64
Supplemen If one of channel state is axis homing, switching mode will not be allowed.
tary note
Example
173
HNC-8-PLC Component specification 6. Extended function module
Ladder
Diagram
Stateme
MDGT 0 R1
nt List
Descripti
Take the work mode of Channel 0 into R1 register.
on
174
HNC-8-PLC Component specification 6. Extended function module
Mode MDI
Format
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre ○
<Addres
INT Constant Channel No.
s 1> Post ×
Example
Ladder
Diagram
Stateme
MDI 0
nt List
Descripti
When X36.4 is turned on, channel 0 is in MDI mode.
on
175
HNC-8-PLC Component specification 6. Extended function module
Function Lock the channel MST. When this function is turned on, all MST instructions of
this channel are not available, and are skipped.
Example
Ladder
Diagram
Stateme
MST 0
nt List
Descripti
When X36.4 is turned on, channel 0 is locked.
on
176
HNC-8-PLC Component specification 6. Extended function module
CYCLE <Address 1>
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre √
<Addres
INT Constant Channel No.
s 1> Post ×
Function Set the channel which needs cycle start by parameter, and perform cycle start via
ACT signal.
Example
Ladder
Diagram
Statement
CYCLE 0
List
Description When X36.4 is turned on, set the channel 0 to cycle start.
177
HNC-8-PLC Component specification 6. Extended function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre √
<Addres
INT Constant Channel No.
s 1> Post ×
Function Set the channel which needs emergency stop by parameter, and start
emergency stop via ACT signal.
Example
Ladder
Diagram
Stateme LD X1.2
nt List STOP 0
Descripti When X1.2 is turned on, set the channel 0 to emergency stop.
on
178
HNC-8-PLC Component specification 6. Extended function module
Reset RESET
Format
RESET <Address 1>
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre √
<Addres
INT Constant Channel No.
s 1> Post ×
Function Set the channel which needs reset by parameter, and activate reset via ACT
signal.
Example
Ladder
Diagram
Stateme LD X2.4
nt List RESET 0
179
HNC-8-PLC Component specification 6. Extended function module
Function Parameter Set the channel which needs to be exchanged by parameter, and
enable the channel exchange via ACT signal.
Example
Ladder
Diagram
Descripti When X36.4 is turned on, set the channel 0 to the active channel.
on
180
HNC-8-PLC Component specification 6. Extended function module
Function Parameter Set the channel which needs feed hold by parameter, and enable
feed hold through ACT signal.
Example
Ladder
Diagram
Stateme LD X36.4
nt List HOLD 0
Descripti When X36.4 is turned on, set the channel 0 to feed hold.
on
181
HNC-8-PLC Component specification 6. Extended function module
Function Set the channel that needs cycle start by parameter, if the cycle start is
successfully set, the output will light the cycle start LED.
Example
Ladder
Diagram
LDT
Stateme
CYCLED 0
nt List
OUT Y36.4
Descripti Get the cycle start state of channel 0, and the cycle start LED is
on lit.
182
HNC-8-PLC Component specification 6. Extended function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
To get the
Pre ○
<Addres channel of
INT Constant
s 1> feedhold
Post √
state.
Function Set the channel where the feed hold LED needs to be lit by parameter, and light
feed hold LED through ACT signal.
Example
Ladder
Diagram
LDT
Stateme
HOLDLED 0
nt List
OUT Y36.5
Descripti Control the feed hold LED based on the feed hold status of the
on channel 0.
183
HNC-8-PLC Component specification 6. Extended function module
Block Skip(G31)ESCBLK
Format
<Address 1>
ESC
BLK
<Address 2>
Paramet Parameter Data Properti
Storage area Explanation
er form type es
The channel
where the
<Addres block skip
INT Constant Pre ○
s 1> function
needs to be Post ×
activated.
<Addres The number
INT Constant
s 2> of G31
Function Set the channel where the block skip function needs to be activated by parameter,
and enable this function through ACT signal.
Example
Ladder
Diagram
Descripti When the rising edge of X31.4 is turned on, the first G31
on statement in the channel 0 is activated.
184
HNC-8-PLC Component specification 6. Extended function module
185
HNC-8-PLC Component specification 6. Extended function module
<Addres
INT Constant Channel No.
s 1>
Pre ○
Function The channel is selected by parameter 1. The override value is passed by
parameter 2 with the register. The rapid override function is enabled by ACT.
Supplemen The override value cannot be changed at the thread‐cutting time.
tary note
Example
Ladder
Diagram
Stateme LDT
nt List RPOVRD 0 R7
186
HNC-8-PLC Component specification 6. Extended function module
<Addres
INT Constant Channel No.
s 1>
Pre ○
Function The channel is selected by parameter 1. The override value is passed by
parameter 2 with the register. The feedrate override function is enabled by ACT.
Example
Ladder
Diagram
Stateme LDT
nt List FEEDOVRD 0 R7
Descripti Set the feedrate override of the channel 0 with the value of R7.
on
187
HNC-8-PLC Component specification 6. Extended function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres
INT Constant Channel No.
s 1>
<Addres Pre ○
INT Constant Spindle No.
s 2>
Post ×
Function The channel is selected by the parameter 1, the override value is passed by the
parameter 3 with register, and ACT enables rapid override function.
Example
Ladder
Diagram
188
HNC-8-PLC Component specification 6. Extended function module
Stateme LDT
nt List SPDLOVRD 0 0 R7
Descripti Set the No. 0 spindle override value of the channel 0, by the value
on of R7.
189
HNC-8-PLC Component specification 6. Extended function module
<Addres
INT Constant Axis No.
s 1>
Pre ○
< Post ×
Constant, X, Y, F,
Address INT Rate
G, R, W, D, P, B
2>
Function Parameter The axis number is set by the parameter 1, the rate is passed by the
parameter 2 with register, and ACT enables feedrate override function.
Supplemen This function can only be used in the incremental (stepping) status.
tary note
Example
Ladder
Diagram
Stateme LDT
nt List STEPMUL 0 R7
Descripti Set the incremental rate of the channel 0 by the R7 value.
on
190
HNC-8-PLC Component specification 6. Extended function module
Dryrun DRYRUN
Format
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres Pre √
INT Constant
s 1>
Post ×
Function Press Dryrun button in the auto mode on the control panel, its indicator lamp is
lit, and CNC is in dryrun status, where the feed rate specified by the program is
ignored, and the coordinate axis moves at the rapidest speed.
The machine doesn’t perform actual cutting in dryrun status. The purpose of
dryrun is to confirm the cutting path and the program.
During the process of actual cutting, this function must be turned off; otherwise,
it may cause danger.
This function cannot work on thread cutting.
Parameter Parameter 1: channel No.
Example
Ladder
Diagram
Stateme DRYRUN 2
nt List
Descripti When Y32.2 is turned on, the channel 2 is in dry run.
on
191
HNC-8-PLC Component specification 6. Extended function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
Pre √
<Addres
INT Constant
s 1>
Post ×
Function The system can skip some specified blocks in the auto mode. If “/” is put at the
start of a program block, press Block skip, then this block will be skipped in the
auto mode; if Block skip is released, “/” will not work, and this block will be
implemented.
Parameter Parameter 1: channel No.
Example
Ladder
Diagram
Stateme SKIP 2
nt List
Descripti When Y32.2 is turned on, block-skip of channel 2 is valid.
on
192
HNC-8-PLC Component specification 6. Extended function module
USER
<Address 2>
IN
<Address 3>
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres
INT Constant Pre √
s 1>
<Addres
INT Constant
s 2>
Post ×
<Addres
INT Constant
s 3>
Function Set the user input. When ACT is effective, set user-defined group and bit to 1,
the macro-variable changes accordingly.
Parameter Parameter 1: channel No.
Parameter 3: power of 2. For example, 17 means that the value of #1190 is
2^17=131072.
Example
Ladder
Diagram
Stateme USERIN 0 1 1
nt List
Descripti When X31.4 is turned on, the macro-variable #1190 of user input
on group which corresponds to the channel 0 is 2.
193
HNC-8-PLC Component specification 6. Extended function module
Paramet Parameter Data Properti
Storage area Explanation
er form type es
<Addres
INT Constant Pre ○
s 1>
<Addres
None None None
s 2>
Pre ×
<Addres
INT Y, R
s 3>
Function
Set the user output. Set the value of macro-variable #1191in the program, which
will determine the group number and position number of user-defined output.
32-bit output is defined, and four groups of 8-bit outputs are obtained. The start
address of output is defined by parameter 3.
Parameter Parameter 1: channel No.
Parameter 3: Parameter 3: the start address of output register. The output value
is 32-bit. Therefore, for y register of 8-bit, four y registers are used.
Exampl
e
Ladder
Diagram
Stateme USEROUT 0 1 Y1
nt List
Descripti Y1.2 and Y1.3 will be output, and other bits of Y1 to Y4 are 0.
on
194
HNC-8-PLC Component specification 6. Extended function module
195
HNC-8-PLC Component specification 6. Extended function module
Pre √
<Addres
INT Constant
s 1>
Post ×
Function When “Selection stop” is enabled (the indicator light is on), the program stops at
M01 in the auto mode.
Example
Ladder
Diagram
Stateme SELSTOP 0
nt List
196
HNC-8-PLC Component specification 6. Extended function module
Pre ×
<Addres
INT Constant Channel No.
s 1>
Post √
Function This function is generally used for 5-axis machining. Set the vector direction of
the current tool in this channel to Z direction, enable this function, manually feed
and retract the tool along the vector direction.
Example
Ladder
Diagram
Stateme TOOLSET 0
nt List
197
HNC-8-PLC Component specification 6. Extended function module
Pre ×
<Addres
INT Constant Channel No.
s 1>
Post √
Function This function is generally used for 5‐axis machining. Z direction is cancelled in
this channel as the vector direction of the current tool. This function is used in
conjunction with TOOLSET function.
Example
Ladder
Diagram
Stateme TOOLCLR 0
nt List
198
HNC-8-PLC Component specification 6. Extended function module
Function The 8-bit digital tube on the panel displays the number of the current tool.
Example
Ladder
Diagram
199
HNC-8-PLC Component specification 6. Extended function module
200
HNC-8-PLC Component specification 6. Extended function module
Function Display the tool number in the currently executed T code to the interface of
CNC.
Example
Ladder
Diagram
201
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Descripti When X31.4 is effective, if X32.4 is valid, the 0 axis will rotate at
on the default speed in the clockwise direction.
202
HNC-8-PLC Component specification 6. Extended function module
Function A spindle in a channel is set to be valid. Set the device which is set to be
associated with the spindle number by the channel parameter, to the spindle. For
example, the logical axis number of the 0 axis for the current channel 0 is 5,
(suppose No.5 axis is enabled), then the logical axis 5 is regarded as the first
spindle of the current channel. The spindle is enabled to be effective by this
functional module.
Example
Ladder
Diagram
Stateme SPDLBUS 0 1
nt List
203
HNC-8-PLC Component specification 6. Extended function module
<Address 1>
<Address 2>
SPDL
BUS1
<Address 3>
<Address 4>
<Address
INT P
4>
Parameter
Parameter 4: control parameter. The specified parameter holds the data such as
maximum rotational speed of spindle motor, initial rotational speed and the like.
Reference value of spindle control value for parameter 4 includes:
204
HNC-8-PLC Component specification 6. Extended function module
0 Maximum rotational speed of motor
1 Minimum rotational speed of actual measurement
2 Maximum rotational speed of actual measurement
3 Numerator of current transmission ratio
4 Denominator of current transmission ratio
205
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme
nt List
206
HNC-8-PLC Component specification 6. Extended function module
Function Spindle orientation enable. The spindle needs to be directed to a specified angle
at the beginning of tool changing and rigid tapping. Perform spindle orientation
via this function. The orientation angle is set by the parameter in the servo
amplifier.
Example
Ladder
Diagram
Stateme SPDLORI 0
nt List
207
HNC-8-PLC Component specification 6. Extended function module
Function orientation is complete, which indicates that the spindle has been at the specified
orientation angle.
The spindle
Example
Ladder
Diagram
Stateme SPDLOROK 0
nt List
Descripti When No.0 spindle orientation has been enabled, set R10.1 to be
on effective.
208
HNC-8-PLC Component specification 6. Extended function module
Spindle Control【DA】SPDA
Format
Parameter 4:invalid
0 Maximum rotational speed of motor
1 Minimum rotational speed of actual measurement
2 Maximum rotational speed of actual measurement
3 Numerator of current transmission ratio
4 Denominator of current transmission ratio
209
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme SPDA 1 0 R1 R2 P5
nt List
210
HNC-8-PLC Component specification 6. Extended function module
Pre ○
<Addres
INT Constant
s 1>
Post ×
Example
Ladder
Diagram
Stateme SPDLZERO 1
nt List
211
HNC-8-PLC Component specification 6. Extended function module
Pre ○
<Addres
INT Constant Channel No.
s 1>
Post ×
Function To detect whether the spindle speed reaches the instruction speed.
Example
Ladder
Diagram
Stateme SPDLRCH 1
nt List
212
HNC-8-PLC Component specification 6. Extended function module
Pre √
<Addres Channel
INT Constant
s 1> number
Post ×
Function Enable the sub-axis to return to zero. When this function is turned on, the driven
axis returns home to search Z pulse. Z pulse has been found, which means
homing of driven axis is completed. Then the driving axis continues to return to
zero.
Example
Ladder
Diagram
Stateme SUBAXEN 0
nt List
Descripti When X32.6 is valid, the driven axis is enabled to return to zero.
on
213
HNC-8-PLC Component specification 6. Extended function module
Function Release driven axis. An axis is set to the driven axis of another one by parameter.
If some instructions are sent to driving axis, driven axis will also get those.
When the function of driven axis release is turned on, the driven axis is
disassociated with the driving axis, without receiving instruction pulse of the
driving axis.
Parameter Parameter 1: Driven axis number
Example
Ladder
Diagram
Stateme DESYN 0
nt List
214
HNC-8-PLC Component specification 6. Extended function module
Parameter 2: the positive direction of aix jog. The value of 1 indicates the
positive direction, and the value of 0 indicates the negative direction.
Example
Ladder
Diagram
215
HNC-8-PLC Component specification 6. Extended function module
Parameter 2: the direction of axis stepping. “0” represents jog in the positive
direction, and “1” represents jog in the negative direction.
Example
Ladder
Diagram
216
HNC-8-PLC Component specification 6. Extended function module
1: og speed of parameter
Example
Ladder
Diagram
Stateme JOGVEL 0 R0
nt List
Descripti When X33.2 is turned on, the 0 axis runs at the speed specified in
on R0.
217
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme HOMRUN 1
nt List
Descripti When X1.1 is turned on, the axis 1 starts to return home.
on
218
HNC-8-PLC Component specification 6. Extended function module
<Address
INT Constant Pre √
1>
Example
Ladder
Diagram
Stateme HOMERUN1
nt List
When X1.1 is turned on, the axis 1 starts to return home; when
Descripti
X23.3 is turned on, the Jog of axis 0 in positive direction is
on
enabled.
219
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme HOMESW 1
nt List
Descripti X1.4 is turned on, which means the axis 1 meets the home block.
on
220
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme HOMLED 1
nt List
Descripti Axis 1 has completed homing, and the lamp of axis 1 is lit.
on
221
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme AXEN 1
nt List
222
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme AXRDY 1
nt List
223
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme AXISLOCK 2
nt List
224
HNC-8-PLC Component specification 6. Extended function module
Function PMC axis is a special motion axis, which cannot be moved by the instruction,
and cannot be used for the interpolation. The PMC axis can only be moved by
the PLC program. This instruction is used to move the PMC axis, and specify the
relative moving distance.
Example
Ladder
Diagram
Stateme AXISMOVE 2 2
nt List
Descripti When X2.0 is turned on, axis 2 relatively moves the distance of 2
on units.
225
HNC-8-PLC Component specification 6. Extended function module
Function This instruction is used to move the PMC axis to an absolute position.
Parameter 2: the position that the axis moves (unit: 1/1000mm, or 1/1000
degree).
Example
Ladder
Diagram
Stateme AXISMVTO 2 2
nt List
Descripti When X2.0 is turned on, the axis 2 moves to the position 2.
on
226
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme AXLMF2 2
nt List
Descripti When X2.0 is turned on, the second soft limit of the axis 2 is
on effective.
227
HNC-8-PLC Component specification 6. Extended function module
<Addres Pre √
INT Constant
s 1>
Post ×
Example
Ladder
Diagram
Stateme AXISPLMT 1
nt List
Descripti X1.1 being effective represents the positive limit direction of the
on axis 1.
228
HNC-8-PLC Component specification 6. Extended function module
<Addres Pre √
INT Constant
s 1>
Post ×
Example
Ladder
Diagram
Stateme AXISNLMT 1
nt List
Descripti X1.2 being effective indicates the axis 1 meets the negative limit
on point.
229
HNC-8-PLC Component specification 6. Extended function module
Handwheel MPGSET
Format
<Address 1>
MPG
<Address 2>
SET
<Address 3>
Example
Ladder
Diagram
Stateme MPGSET 1 R6 R7
nt List
230
HNC-8-PLC Component specification 6. Extended function module
<Addres Pre ○
INT Constant
s 1>
Post ×
Example
Ladder
Diagram
Stateme SVSW 1
nt List
231
HNC-8-PLC Component specification 6. Extended function module
Example
Ladder
Diagram
Stateme AXISMODE 1 1
nt List
232
HNC-8-PLC Component specification 6. Extended function module
REFPT
<Address 2>
Parameter 2: Parameter 2: “2” indicates that the second reference is valid, “3”
indicates that the third reference is valid, “4” indicates that the fifth reference is
valid.
Example
Ladder
Diagram
Stateme REFPT 1 2
nt List
Descripti The second reference of the axis 1 is valid, and R10.1 is output.
on
233
HNC-8-PLC Component specification 6. Extended function module
Function To get the home status while the axis is returning home. In the process of axis
home, some operations cannot be performed, in which case the home status must
be judged. The corresponding F status word is F0.2.
Example
Ladder
Diagram
Stateme AXISHOM2 0
nt List
Descripti The home sign of axis 0 is valid. While the axis is returning home,
on R1.1 is output, where other manual operations are not allowed.
234
HNC-8-PLC Component specification 6. Extended function module
Function To get the axis status during its movement. In the process of axis moving, some
operations cannot be performed, in which case the status must be judged. The
corresponding F status word is F0.0.
Example
Ladder
Diagram
Stateme AXMOVING 0
nt List
Descripti The moving sign of axis 0 is valid. While the axis is moving, R1.1
on is output.
235
HNC-8-PLC Component specification 6. Extended function module
System Function
Rotation ROT
Format
Function Rotation control, which is used for tool rest and the like. The output is 0 for the
rotation in the clockwise direction, and the output is 1 for the rotation in the
counter clockwise direction.
Input 4: target location type. When the value is 0, the current target location is
counted; when the value is 1, the previous location of target is counted.
236
HNC-8-PLC Component specification 6. Extended function module
Count result. The value of 0 represents the number of count locations, and the
value of 1 represents the count steps.
Example
Ladder
Diagram
R66.0 is a ture contact, where the setting status of ROT module is:
start counting for the starting numbers from 1, use the function of
Descripti short-path selecting tool, count the current target location, output
on the counting steps, and output the counting value to R59. The
current tool location is saved in B0, and the target tool location is
saved in R27.
237
HNC-8-PLC Component specification 6. Extended function module
Alarm ALARM
Format
Parameter Parameter 1: alarm code. The PLC alarm code is from 1 to 256, and the prompt
number of PLC is from 501 to 884.
Example
Ladder
Diagram
Stateme ALARM 3
nt List
238
HNC-8-PLC Component specification 6. Extended function module
Event EVENT
Format
Example
Ladder
Diagram
239
HNC-8-PLC Component specification 6. Extended function module
Parameter None.
Example
Ladder
Diagram
Stateme SAVEDATA
nt List
Descripti When X30.4 is turned on, the data, which hasn’t been saved
on before outage, can be saved.
240
HNC-8-PLC Component specification 6. Extended function module
Function To get panel reset signal (must be used with RSTCLR simultaneously). If some
reset actions in PLC need to be performed after the reset button on the panel is
pressed, use this function module. “Resetting…” will be shown on the CNC
interface.
Example
Ladder
Diagram
Stateme RSTCHK 0
nt List
241
HNC-8-PLC Component specification 6. Extended function module
RST
<Address 1>
CLR
Function After the reset actions in PLC are complete, the reset must be cleared (must be
used with RSTCHK simultaneously), and the signal of completing reset is
transmitted to CNC. “Reset done” will be shown on the CNC interface.
Example
Ladder
Diagram
Stateme RSTCLR 0
nt List
Descripti When 30.5 is turned on, the reset is cleared, and the output is 0.
on
242
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
243
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Ladder diagram diagnosis: view the value of each variable, and perform
intervention operations of component.
244
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Inhibit function button. Move the cursor on the component, and press Inhibit
button, to shield the component. As shown in the below diagram, press Inhibit,
the component turns red, which indicated that the component is shielded. Press
Restore button to restore the function of the component, which will be covered
later.
245
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Enable function button. Move the cursor on the component, press Enable
button, and the component is enabled. As demonstrated below, the cursor has
been moved on the component, press Enable button, the component turns green,
which indicates that the component is enabled. In the below figure, X0.0 is
normally open. Move the cursor on X0.1, press Enable button, the component
turns green, and is switched off.
246
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Restore function button. Move the cursor on the component, and press Restore,
to undo the shielding or enabling operations described above. Press this button
after Inhibit function is enabled, the red color on the component disappears,
which indicates that the function of component is restored, as shown in the
figure below.
The value in this system is by default in decimal, user can press the button
corresponding to “hexadecimal”, then the value is in hexadecimal, which is
shown as below:
¾ In decimal
¾ In hexadecimal
247
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Return function button. Press this button to return to the interface of ladder
diagram monitoring, for performing other operations.
248
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Search
Press Search, then the operation interface as shown in the figure below appears,
where the component can be looked up.
For example, type X0.0, press “Enter”, the first X0.0 of the program under the
cursor line can be found. See illustration as below:
249
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
The functional button of Return. Press this button to return to the interface of
the ladder diagram monitoring.
250
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Change
User can press the corresponding functional button of “Change” menu, to
perform operations on the new component.
Functional module: insert a function (user can press the initial word of the
component, to select it)
251
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
252
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Delete Component
Move the cursor on the component to be deleted, press the functional button of
“Delete Component” to delete the component in the ladder diagram.
253
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Normal Open
Move the cursor to the position where the normal-open contact is to be inserted,
press the functional button of “Normal open” to insert the normal-open contact
at the specified position.
254
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Normal Closed
Move the cursor to the position where the normal-closed contact is to be
inserted, press the functional button of “Normal close” to insert the
“normal-closed” contact at the specified position. as shown in the figure below:
Logical Output
Move the cursor to the position where the logical output needs to be inserted,
press the functional button of “Logical output” to insert the logical output at the
specified position in the ladder diagram, as shown in the figure below. It is
important to note that pre can be added to the logical output, but post cannot.
Refer to the section of programming for details.
255
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Inverted Output
Move the cursor to the position where the inverted output needs to be inserted,
press the functional button “Inverted output” to insert the inverted output at the
specified position in the ladder diagram, which is illustrated by the following
figure.
Functional Module
Press the functional module button to access the operation interface shown as
below figure, and select the functional module needed.
256
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Then hit Enter to enter the selected functional module into the ladder diagram.
User can press the initial word of the component to select the relevant
component.
Return
Press “Return” to return to the previous operation interface.
257
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Command
User can press the buttons listed in the below table to edit the ladder diagram.
258
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Select
Move the cursor to the line that you want to select, press the functional button of
“Select”, the selected line turns blue, and then press “Select” button again to
select the next line of the current line. It is illustrated by the following figure.
You can perform the operations such as delete, after selecting the line you want.
Delete
Move the cursor to the line to be deleted, press “Select” button, the line turns
blue, then press “Delete” to delete this line.
259
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Move
First move the cursor to the line to be moved, then press “Select” button, this
line turns blue.
260
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Press the functional button “Move” to access the interface which is shown in the
below figure, and the selected line disappears.
Move the cursor to the target line, and press “Paste” to move the selected line to
the target line.
261
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
262
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Copy
Move the cursor to the position of the line that needs to be copied, then press the
functional buttons of “Select” and “Copy”. See as below:
Move the cursor to the target line, and press the functional button of “Paste” to
paste the copied line.
263
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Paste
The functional button of “Paste” has been applied in section 7.4.3 and 7.4.4.
Refer to the two sections for the detailed operations.
Insert Line
As shown in the figure below, move the cursor to the next line of the line to be
inserted, press the functional button of “Insert line”, then the line is inserted.
Note that the line is generally inserted above the cursor line.
¾ Before inserting,
264
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
¾ After inserting,
Add Line
The functional button of “Insert line” is in contrast to “add line” where the line is
added below the cursor line, as shown in the figure below, press the functional
button of Add line, then a new line is added below the cursor line.
¾ Before adding
265
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
¾ After adding
Return
Press the functional button of Return to back to the previous interface.
266
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Load
Edit and check the ladder diagram, press the functional button of Load, then the
system loads the current ladder diagram.
267
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Discard
If you want to re-edit the edited ladder diagram, press the functional button of
“Discard” to cancel the operations that you have edited to the diagram.
268
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Save
After the ladder diagram is saved, press this button, to save the ladder diagram
edit operations.
269
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram
Return
Press the functional button of Return, to return to the diagnosis interface.
270
HNC-8-PLC Programming specification 8 . PLC Development environment description
7.1 Overview
271
HNC-8-PLC Programming specification 8 . PLC Development environment description
Overview
HNC-LADDER-WIN Numerical Ladder Diagram Programming Software is a
latest software of PLC program development environment for Series 8 NC
system. This software runs on Windows XP operating system, and can easily set
up ladder diagrams by visual graph programming. It is compatible with various
of PLS languages that are compliant to IEC61131-3 international standard, and is
a simple, efficient, and reliable PLC development tool.
272
HNC-8-PLC Programming specification 8 . PLC Development environment description
(2) Place the disk of ladder diagram development environment in the CD-ROM
drive.
(3) Double click Setup.exe file under the directory of Huazhong NC ladder
diagram, the installation program may run automatically, and then the
installation wizard appears.
(4) The greeting window appears after the installation wizard interface.
(5) Click “Next (N)”, and the selection dialog displays on the screen.
273
HNC-8-PLC Programming specification 8 . PLC Development environment description
(6) After doing some necessary modifications to your installation path on the
selection dialog, click “Next(N)”.
(7) Then the formal installation starts, with the above displaying on the screen.
274
HNC-8-PLC Programming specification 8 . PLC Development environment description
275
HNC-8-PLC Programming specification 8 . PLC Development environment description
Menu
The bar at the top of the development environment is called menu, where every
pulldown menus of ladder diagram interface are listed. Clicking a menu item
shows the command options in the pulldown menu. Click a command to handle
relevant operation.
There are six items in the development environment menu: file, view, tool,
window, and help, which are discussed in the following:
File
The “File” menu contains the command items working on files, which mainly
provide operations on files of ladder diagram with user.
Edit
276
HNC-8-PLC Programming specification 8 . PLC Development environment description
The “Edit” menu contains rapid operations of copy, paste and the like, of which
the purpose is to improve the efficiency of writing the ladder diagram.
View
Tool
Window
277
HNC-8-PLC Programming specification 8 . PLC Development environment description
Help
278
HNC-8-PLC Programming specification 8 . PLC Development environment description
Toolbar and primitive tree can dock freely, that means, they can be put on any of
the four side walls of the main window. Toolbar can be located anywhere on the
desktop.
Toolbar
There are two toolbars including action bar and component bar, in the ladder
diagram interface.
(1) Action bar is used to manipulate new files quickly, such as zooming, undo,
redo, and so on.
(2) Component bar is used to fast add the basic input/output cell and the
selection function module.
279
HNC-8-PLC Programming specification 8 . PLC Development environment description
Primitive Tree
Primitive tree is used for selection function module. Double-clicking the icon
can expand and collapse the instruction tree. Select the instruction icon needed
from the instruction tree.
Edit Window
Edit Edit window is for displaying and editing the ladder diagram. The area between
the left busbar and the right busbar is the editing domain of the ladder diagram,
the row number you are currently editing displays on the left of the left busbar,
and the comments to the meaning of output status for the current line displays on
the right of the right busbar.
280
HNC-8-PLC Programming specification 8 . PLC Development environment description
Message Box
While the ladder diagram is being compiling, the statement error and syntax
error which can be recognized, may appear in the message box.
Toolbar
Edit Window
Edit window is for displaying and editing statement list, and can judge the
current row when the statement list is being editing.
281
HNC-8-PLC Programming specification 8 . PLC Development environment description
Selection box for register is on the left of edit window of the symbol list, and
edit box for register is on the right.
The edit box for register includes number, address, symbol name and comments.
282
HNC-8-PLC Programming specification 8 . PLC Development environment description
All the register bits and points from X0000 and X0049 may appear in the edit
box of register.
283
HNC-8-PLC Programming specification 8 . PLC Development environment description
Click “Symbol name” item at the X10.0 row three times, then the edit
box pops up.
After typing the symbol name, annotate the address. The edit box will
pop up, with the three-click on the “comments” item at the X10.0
row.
284
HNC-8-PLC Programming specification 8 . PLC Development environment description
Type “positive X limit, active high” in the edit box, and hit Enter button.
Then defining the symbol name of X10, and annotating X10.0 are
complete.
When the symbol name and comments of X10.0 are not needed, delete them.
Select “X10.0” in the column of address, and hit Delete button, to delete X10.0
from the list.
285
HNC-8-PLC Programming specification 8 . PLC Development environment description
286
HNC-8-PLC Programming specification 8 . PLC Development environment description
(1) When you want to insert basic component, first select a position on the
ladder diagram.
(1) Select the functional components needed from the primitive tree.
287
HNC-8-PLC Programming specification 8 . PLC Development environment description
Component
library
(2) Double-left click the ladder diagram, then the functional component is
inserted.
Deleting Component
Select the component to be deleted in the ladder diagram, and hit Delete button
to delete it.
288
HNC-8-PLC Programming specification 8 . PLC Development environment description
289
HNC-8-PLC Programming specification 8 . PLC Development environment description
Deleting Multi‐row
Select the rows needed to be deleted. (Drag the mouse to select the area to be
deleted)
Then choose “Cut” or “Copy” in the “Edit” menu. Or right-click the component
to be cut or copied, and select “Cut” or “Copy”.
290
HNC-8-PLC Programming specification 8 . PLC Development environment description
The first step: drag the mouse to select the rows to be cutted or copied.
The second step: click “Cut” or “Paste” in the menu. Or right-click the
component to be cut or copied, and click “Cut” or “Paste”.
291
HNC-8-PLC Programming specification 8 . PLC Development environment description
Insert Row
A row can be inserted before the position selected in the ladder diagram.
Delete Row
292
HNC-8-PLC Programming specification 8 . PLC Development environment description
Undo
Redo
Conversion
Using this button to convert the current ladder diagram to the corresponding
statement list. If there are errors in the ladder diagram, the message box
showing error information will pop up.
Output
Using this button to convert the current ladder diagram to the corresponding
statement list, and output the plc.dit file (execution file of ladder diagram). If
there are errors in the ladder diagram, the message box showing error
information will pop up.
Edit
293
HNC-8-PLC Programming specification 8 . PLC Development environment description
In the statement list, type characters directly to edit the statement list.
After a line of statement has been typed and the cursor is moved away, the
system will check and arrange the line.
If there are errors in this line, the statement list will annotate the errors.
Use the mouse to drag on the statement list, to select some statements.
Then use Cut, Copy and Paste in the menu, to work accordingly.
294
HNC-8-PLC Programming specification 8 . PLC Development environment description
Conversion
Select this button on the toolbar, to convert the current statement list to the
corresponding ladder diagram.
Output
Hit this button on the toolbar to convert the current ladder diagram to the
corresponding statement list, and output the plc.dit file (execution file of ladder
diagram).
295
HNC-8-PLC Programming specification appendix
Appendix A
¾ Panel of 818A lathe
0 1 2 3 4 5 6 7
Internal/E
Referen Chuck
Single Incremen xternal
X480 Auto Manual ce release/cla Dry run
block t clamping
home mping
Tailstoc
k Manual
Block Option MST Machine Hydraulic Feed hold
X481 looseni tool
skip stop Lock Lock start Ⅱ
ng/tight changing
ening
296
HNC-8-PLC Programming specification appendix
0 1 2 3 4 5 6 7
X480 Tool Tool
Single Incremen Referenc changing clamping
Auto Manual Dry run
block t e home permissio
n
X481 Z-axis Machine Protectiv Lamp Manual
Block Option Feed hold
lock Lock e door tool
skip stop Ⅱ
changing
X482 +4 +Z —Y x1 x10 x100 x1000 F1
X483 F2 +X Fast —X Spindle Spindle Spindle Cooling
forward orientatio Jog brake
n
X484 F3 F4 +Y —Z —4 Spindle Spindle Spindle
CW stop CCW
X485 Lubricat Overtrav
ion el release
X486 Cycle
Rapid override Feed hold
start
X487 Spindle override
X488 Handwheel emergency stop, Handwheel axis selection and Handwheel rate
X489 Feedrate override
X490 Incremental pulse per cycle for handwheel
X491
297
HNC-8-PLC Programming specification appendix
0 1 2 3 4 5 6 7
X480 Chuck Tailstock
Single Incremen Reference clamping loosening Dry
Auto Manual
block t home /tightenin run
g
X481 Center Tailstock Feed Manual
Block Option MST Machine rest joint holdⅡ tool
skip stop Lock Lock changi
ng
X482 0% 25% Spindle Spindle Spindle
CW stop CCW
X483 Lamp +C —Y 50% 100% Spindle Spindle
Jog upshift
X484 Spindle Protectiv —X Fast +X F1 F2 Coolin
downshi e door forward g
ft
X485 Lubricat Hydrauli Auto +Y —C F3 F4
ion c start power off
X486 Chip Chip Chip Overtrav
Cycle
removal removal removal el release Feed hold
start
CW stop CCW
X487 Spindle override
X488 Handwheel emergency stop, Handwheel axis selection, and Handwheel rate
X489 Feedrate override
X490 Incremental pulse per cycle for handwheel
X491
298
HNC-8-PLC Programming specification appendix
0 1 2 3 4 5 6 7
X480 Tool Tool Dry run
Single Incremen Reference changing clamping
Auto Manual
block t home permissio
n
X481 Z-axis Machine Tool Tool
Block Option
lock Lock magazine magazine
skip stop
CW CCW
X482 X Y Z 0% 25% Spindle Spindle Spindle
CW stop CCW
X483 Lamp A B C 50% 100% Spindle Spindle
orientatio Jog
n
X484 Spindle Protectiv 7 8 9 F1 F2 Cooling
brake e door
X485 Lubricati Chip Auto — Fast + F3 F4
on blowing power off forward
X486 Chip Chip Chip Overtrave
Cycle
removal removal removal l release Feed hold
start
CW stop CCW
X487 Spindle override
X488 Handwheel emergency stop, Handwheel axis selection, and Handwheel rate
X489 Feedrate override
X490 Incremental pulse per cycle for handwheel
X491
299
HNC-8-PLC Programming specification appendix
300