0% found this document useful (0 votes)
239 views314 pages

Series 8 PLC Programming

PLC Programming for HNC systems

Uploaded by

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

Series 8 PLC Programming

PLC Programming for HNC systems

Uploaded by

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

 

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

SPECIFICATIONS OF PLC .......................................................................................................... 4

SEQUENTIAL PROGRAM NOTION ............................................................................................... 5

ALLOCATION INTERFACE ........................................................................................................... 6

SEQUENTIAL PROGRAM ............................................................................................................ 7

SEQUENTIAL PROGRAM COMPOSITION .................................................................................... 12

ADDRESS ............................................................................................................................... 14

BASIC INSTRUCTION ........................................................................................................... 15

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

BASIC ELEMENT ..................................................................................................................46

NORMAL-OPEN CONTACT ....................................................................................................... 47

NORMAL-CLOSE CONTACT ...................................................................................................... 48

TRUE CONTACT ..................................................................................................................... 49

RISING EDGE OF CONTACT ..................................................................................................... 50

FALLING EDGE OF CONTACT ................................................................................................... 51


HNC-8-PLC Programming specification Catalog

LOGIC OUTPUT ...................................................................................................................... 52

INVERTED LOGIC OUTPUT ....................................................................................................... 53

SETTING OUTPUT ................................................................................................................... 54

RESET OUTPUT ...................................................................................................................... 55

BASIC FUNCTION MODULE ................................................................................................ 56

CONTROL INSTRUCTION .......................................................................................................... 57

Instructin M Get MGET .................................................................................................... 57

M Instruction Response MACK ........................................................................................ 58

T Instruction Get TGET .................................................................................................... 59

T Instruction Response TACK ......................................................................................... 60

Handwheel Control RTOMPG.......................................................................................... 61

Thermal Error Compensation Module TEMPSEN ........................................................... 62

MATHEMATICAL OPERATION ................................................................................................... 64

Addition ADD.................................................................................................................... 64

Subtraction SUB .............................................................................................................. 66

Multiplication MUL ............................................................................................................ 68

Division DIV...................................................................................................................... 70

Increase One INC ............................................................................................................ 72


HNC-8-PLC Programming specification Catalog

Decrease One DEC ......................................................................................................... 73

Logic AND WAND ............................................................................................................ 74

Logic OR WOR ................................................................................................................ 75

Logic XOR WXOR............................................................................................................ 77

Complement NEG ............................................................................................................ 79

COUNTER .............................................................................................................................. 80

Plus-minus Counter CTR ................................................................................................. 80

Counter CTRC ................................................................................................................. 82

Custom Plus-minus Counter CTUD ................................................................................. 84

TIMER .................................................................................................................................... 86

Delay-on Timer TMRB ..................................................................................................... 86

Delay-off Timer STMR ..................................................................................................... 88

PROCESS CONTROL ............................................................................................................... 90

Initialization Module End IEND ........................................................................................ 90

PLC1 Module End 1END ................................................................................................. 91

PLC2 Module End 2END ................................................................................................. 92

Jump JMP ........................................................................................................................ 93

Label LBL ......................................................................................................................... 94


HNC-8-PLC Programming specification Catalog

Call Subprogram CALL .................................................................................................... 95

Subprogram Start SP ....................................................................................................... 96

Subprogram End SPE ...................................................................................................... 97

Subprogram Return RETN............................................................................................... 98

Loop LOOP ...................................................................................................................... 99

Next Loop NEXT ............................................................................................................ 100

COMPARISON ....................................................................................................................... 101

Comparison CMP ........................................................................................................... 101

Lower Than LT ............................................................................................................... 103

Area Comparison ACMP................................................................................................ 104

Consistency Comparison COIN ..................................................................................... 105

DATA MANIPULATION ............................................................................................................ 106

Moving Data MOV .......................................................................................................... 106

Relative Moving Data XMOV ......................................................................................... 107

Batch Moving BMOV ...................................................................................................... 109

Multiple Moving Data FMOV .......................................................................................... 111

Data Exchange XCH ...................................................................................................... 113

Data Reset ZRST ........................................................................................................... 115


HNC-8-PLC Programming specification Catalog

Encoding ENCO ............................................................................................................. 116

Decoding DECO............................................................................................................. 118

Transformation COD ...................................................................................................... 120

Data Search SER ........................................................................................................... 122

Register Merging ASSEM .............................................................................................. 124

Register Decomposition DISAS ..................................................................................... 126

Area Conversion ACVT .................................................................................................. 128

Alternate Output ALT ..................................................................................................... 130

Fetch Rising Edge PLS .................................................................................................. 131

Fetch Falling edge PLF .................................................................................................. 132

Points Transformation PTN ............................................................................................ 133

Number Conversion NTP ............................................................................................... 135

Part Count PARTCNT .................................................................................................... 137

Part-counting Clear PARTCLR ...................................................................................... 138

Temperature Collection Module HEADSEN .................................................................. 140

STATUS WORD AND CONTROL WORD PROGRAMMING ............................................... 142

INTRODUCTION ON STATUS WORD AND CONTROL WORD ....................................................... 143

Axis Status Word............................................................................................................ 145


HNC-8-PLC Programming specification Catalog

Axis Control Word .......................................................................................................... 150

Channel Status Word ..................................................................................................... 154

Channel Control Word ................................................................................................... 158

EXAMPLE OF STATUS WORD AND CONTROL WORD PROGRAMMING ........................................ 164

Work Pattern Setting ...................................................................................................... 164

Work Pattern Getting ..................................................................................................... 165

Control of Feed Axis and Spindle .................................................................................. 166

Home.............................................................................................................................. 167

Incremental Rate Override ............................................................................................. 168

Cycle Start and Feed Hold ............................................................................................. 169

EXTENSION FUNCTION MODULE ..................................................................................... 170

NC FUNCTION ...................................................................................................................... 171

Channel Mode Setting MDST ........................................................................................ 171

Channel Mode Getting MDGT ....................................................................................... 173

Mode MDI....................................................................................................................... 175

Locking Channel MST .................................................................................................... 176

Cycle Start CYCLE ........................................................................................................ 177

Emergency Stop STOP .................................................................................................. 178


HNC-8-PLC Programming specification Catalog

Reset RESET ................................................................................................................. 179

Channel Exchange CHANSW........................................................................................ 180

Feed Hold Start HOLD ................................................................................................... 181

Cycle Start LED CYCLED .............................................................................................. 182

Feed Hold LED HOLDLED ............................................................................................ 183

Block Skip(G31)ESCBLK .......................................................................................... 184

Rapid Override RPOVRD .............................................................................................. 186

Feedrate Override FEEDOVRD ..................................................................................... 187

Spindle Override SPDLOVRD ....................................................................................... 188

Incremental (Stepping) Rate STEPMUL ........................................................................ 190

Dryrun DRYRUN ............................................................................................................ 191

Block Skip SKIP ............................................................................................................. 192

User Input USERIN ........................................................................................................ 193

User Output USEROUT ................................................................................................. 194

Selection Stop SELSTOP .............................................................................................. 196

Vector Tool Direction Setting TOOLSET ....................................................................... 197

Vector Tool Direction Clear TOOLCLR .......................................................................... 198

8-bit Nixie Tube NIXIE ................................................................................................... 199


HNC-8-PLC Programming specification Catalog

Tool Display TOOLUSE ................................................................................................. 201

FUNCTIONAL UNIT OF AXIS ................................................................................................... 202

Spindle JOG SPDLJOG ................................................................................................. 202

Spindle Control【Servo Spindle】SPDLBUS ................................................................ 203

Spindle Control with Gear【Servo Spindle】SPDLBUS1 ............................................. 204

Spindle Orientation Enable SPDLORI ........................................................................... 207

Completing Spindle Orientation SPDLOROK ................................................................ 208

Spindle Control【DA】SPDA ........................................................................................ 209

Zero Speed Detection for Spindle SPDLZERO ............................................................. 211

Spindle Speed Arrival SPDLRCH .................................................................................. 212

Driven Axis Home SUBAXEN ........................................................................................ 213

Release Driven Axis DESYN ......................................................................................... 214

Axis Jog JOGSW ........................................................................................................... 215

Axis Stepping STEPAXIS .............................................................................................. 216

Jog Velocity JOGVEL .................................................................................................... 217

Home Run HOMRUN ..................................................................................................... 218

Home Run 1 HOMERUN1 ............................................................................................. 219

Home Approaching Switch HOMESW ........................................................................... 220


HNC-8-PLC Programming specification Catalog

Home Completing HOMLED .......................................................................................... 221

Axis Enable AXEN ......................................................................................................... 222

Axis Ready (Bust) AXRDY ............................................................................................. 223

Axis Lock AXISLOCK ..................................................................................................... 224

Relative PMC Axis Movement AXISMOVE ................................................................... 225

Absolute PMC Axis Movement AXISMVTO ................................................................... 226

The Second Soft Limit of Axis AXLMF2 ......................................................................... 227

Block Switch in Positive Limit Direction AXISPLMT ...................................................... 228

Block Switch in Negative Limit Direction AXISNLMT..................................................... 229

Handwheel MPGSET ..................................................................................................... 230

Servo Enable (Bus) SVSW ............................................................................................ 231

Axis Mode AXISMODE .................................................................................................. 232

Axis Reference REFPT .................................................................................................. 233

During Axis Home AXISHOM2 ...................................................................................... 234

During Axis Moving AXMOVING.................................................................................... 235

SYSTEM FUNCTION .............................................................................................................. 236

Rotation ROT ................................................................................................................. 236

Alarm ALARM ................................................................................................................ 238


HNC-8-PLC Programming specification Catalog

Event EVENT ................................................................................................................. 239

Save Data SAVEDATA .................................................................................................. 240

Reset Setting Ouput RSTCHK ....................................................................................... 241

Reset Clear RSTCLR ..................................................................................................... 242

OPERATIONAL MONITORING AND ONLINE MODIFICATION FOR LADDER DIAGRAM 243

ONLINE DIAGNOSIS FOR LADDER DIAGRAM............................................................................ 245

SEARCH............................................................................................................................... 249

CHANGE .............................................................................................................................. 251

Insert Straight Line ......................................................................................................... 252

Insert Vertical Line ......................................................................................................... 252

Delete Vertical Line ........................................................................................................ 253

Delete Component ......................................................................................................... 253

Normal Open .................................................................................................................. 254

Normal Closed ............................................................................................................... 255

Logical Output ................................................................................................................ 255

Inverted Output .............................................................................................................. 256

Functional Module .......................................................................................................... 256

Return ............................................................................................................................ 257


HNC-8-PLC Programming specification Catalog

COMMAND ........................................................................................................................... 258

Select ............................................................................................................................. 259

Delete ............................................................................................................................. 259

Move .............................................................................................................................. 260

Copy ............................................................................................................................... 263

Paste .............................................................................................................................. 264

Insert Line ...................................................................................................................... 264

Add Line ......................................................................................................................... 265

Return ............................................................................................................................ 266

LOAD ................................................................................................................................... 267

DISCARD.............................................................................................................................. 268

SAVE ................................................................................................................................... 269

RETURN .............................................................................................................................. 270

INSTRUCTION ON PLC DEVELOPMENT ENVIRONMENT ............................................... 271

OVERVIEW ........................................................................................................................... 272

INSTALLATION OF DEVELOPMENT ENVIRONMENT.................................................................... 273

DEVELOPMENT ENVIRONMENT INTERFACE............................................................................. 276

Menu .............................................................................................................................. 276


HNC-8-PLC Programming specification Catalog

Ladder Diagram Interface .............................................................................................. 279

Statement List Interface ................................................................................................. 281

Symbol List Interface ..................................................................................................... 282

DEVELOPMENT ENVIRONMENT OPERATION............................................................................ 283

Symbol List Operation .................................................................................................... 283

Ladder Diagram Operation ............................................................................................ 287

Statement List Operation ............................................................................................... 293

APPENDIX A ....................................................................................................................... 296


HNC-8-PLC Programming specification Preface

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

Huazhong Numerical Control Co., Ltd. (HNC).

Without authorization or written permission, no entity or individual may

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

regarded as “Impossible” or “Not Allowed”.


Updates

The copyright of this manual is subject to Wuhan Huazhong Numerical


and

Control Co., Ltd (HNC). Any publishing and copy by other units or
upgrades

individuals are illegal, who may be investigated for legal responsibility.

Technical
support
Marketing Department: 027-87180095,027-87180303

Fax:027-87180303

1
HNC-8-PLC Programming specification Preface

E-mail : Zip Code:430223

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.1 Specifications of PLC

1.2 Sequential Program Notion

1.3 Allocation Interface

1.4 Sequential Program

1.5 Sequential Program Composition

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

Programming language Ladder,STL

Execution cycle of the first level 1ms


program

Program capacity

Ladder program 5000 lines

Statement list 10000 rows

Symbol name 1000

Instruction Basic instruction,


Function instruction

Internal relay of single byte(R) 400 bytes (R0~~R399)

Internal relay of double-byte(W) 400 bytes (W0~~W199)

Internal relay of four-byte(D) 400 bytes (D0~~D99)

Timer (T) 128 (T0~~T127)

Counter (C) 128 (C0~~C127)

Subprogram (S) ——

Label (L) ——

User-defined parameter (P) 200 (P0~~P199)

Holding storage area

Timer (T) 128 (T300~~T427)

Counter (C) 128 (C300~~C427)

Four-byte register(B) 200 bytes(B0~~B49)

I/O module(X) X0~~X512

(Y) Y0~~Y512

4
HNC-8-PLC Programming specification 1. PLC Summary

Sequential Program Notion


Notion A brief description on sequential program is provided before on programming.
Sequential program indicates that, the program which logically controls the
machine and its relevant devices. For the personnel of electrical automation
control engineering, the widely-used control flow is based on sequential control,
from which, sequential program, a programming method for PLC control, is
generated.

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.

The above is performed by PLC programming software, the role of which is to


document sequential program.

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.

For easier debugging to PLC of numerical control system, input/output points of


panel interfaces for series 818 have been fixed, and for that of other devices,
refer to the electrical principle drawing.

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 2.1 (a)

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.

The initialization program is performed once when system starts.

The first level program executes every 1ms.

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

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.

When subprogram is used, sequential program consists of:

10
HNC-8-PLC Programming specification 1. PLC Summary

11
HNC-8-PLC Programming specification 1. PLC Summary

Sequential Program Composition


Compositio For traditional PLC, ladder diagram can be only established sequentially. The
n ladder diagram language, which allows structured program, has the following
advantages:

‹ The program is easily to be understood and documented.

‹ It is more convenient to find out programming errors.

‹ It is easy to find out reasons of causing errors.

There are three main structured programming means

Subprogra
m

Subprogram regards the ladder diagram block as the processing unit.

Nesting The combination of documented subprograms forms structured program.

Conditiona
l branch

Main program executes recurrently and detects whether condition is satisfied or


not. If condition is satisfied, corresponding subprogram is executed; if condition
is not satisfied, corresponding subprogram is not executed.

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.

Address Address No.


format Bit No.

A word must be specified to the left of address No., to express the signal types as
below table:

Register Signal Range


X Input signal from machine X0~~X512
Y Signal output from PLC to machine Y0~~Y512
F Input signal from NC F0~~F3119
G Signal output from PLC to NC G0~~G3119
R Internal relay of single byte R0~~R399
W Internal relay of double-byte W0~~W199
D Internal relay of four-byte D0~~D99
B Outage hold relay B0~~B49
P User-defined parameter P0~~P199
Counter(Those after C300 can be held after C0~~C127
C
usage.) C300~~C427
Timer T0~~T127
T
(Those after T300 can be held after usage.) T300~~T427
L Label number ——
S Subprogram number ——

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.

As the international standard of IEC61131-3 lays out, ladder diagram language


and statement list language can convert each other logically, and ambiguity
caused by this can be avoided through some programming methods. In
HNC_LADDER_WIN(V1.0) editing software, you can see that the two
languages can mutually transform.

To better understand documenting and inner-making of sequential program, and


to avoid errors in logic or understanding, see the explanation of basic concepts as
following:

Type:

PLC instruction of series 8 is divided into basic instruction and function


instruction.

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.

Storage of logical outcome (ST)

Stack register (to store the intermediate result calculated) Result being executed

Storage of logical outcome is a stack-like structure. Result of the current


instruction is saved in ST0. When reading instruction such as LD and LDI
appears, result of current instruction is needed to be saved in stack. When ANB
or ORB instruction is encountered, the storage makes ST1 result out stack and

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.

Storage of multi-output logical outcome

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 and Post

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.

Here are constraint rules about the graphics in this manual:

16
HNC-8-PLC Programming specification 2. Basic instruction

Graphics Meaning

○ Can be used or not

√ Must be used

× Cannot be used

Can use pre component or not

Must use pre component

Cannot use pre component

Can use post component or not

Must use post component

Cannot use post component

17
HNC-8-PLC Programming specification 2. Basic instruction

Detailed basic instructions are listed below:

No. Instruc Function


tion
1 LD Read in specified element signal status
2 LDI Read in inverted status of specified element signal
3 LDT Read in ture element signal status
4 OUT Output result of logical operation to specified address
5 OOUT Output inver result of logical operation to specified address
6 SET After Logic OR the calculation result to signal in specified
address, return the result to this address.
7 RST After Logic AND the inverted calculation result to signal in
specified address, return the result to this address.
8 AND Logic AND
9 ANI Logic AND the inverted specified signal
10 OR Ligic OR
11 ORI Logic OR the inverted specified signal
12 LDP Read in rising edge of signal
13 LDF Read in falling edge of signal
14 ANDP Logic AND rising edge of specified signal
15 ANDF Logic AND falling edge of specified signal
16 ORP Ligic OR rising edge of specified signal
17 ORF Ligic OR falling edge of specified signal
18 ORB Block logic OR
19 ANB Block logic AND
20 MPS Node result push
21 MRD Reading node result
22 MPP Node result pull

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

N Instructi Addr Bit  Refer ST2 ST1  ST0 


o.  on  ess  No.  ance 
LDI  X1      .        0    A 
1 A 
Operation Process

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

ORI  X5      .        1  E  D+E  


6

OR  X5      .        3    F  D+E +F


7
 
AND  X5      .        4  G  (D + E + F ).G
8
 
OUT  R10    .        0  Outp (D + E + F ).G
9
ut   
W2 

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

No.  Instruct Addr Bit  Refer ST2 ST1  ST0 


ion  ess  No.  ence 
LDI  R1      .        0  A 
Operation Process

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.

Parameter  Register point parameter


   

Example   
Ladder Diagram

No.  Instr Addr Bit  Refer ST2 ST1  ST0 


uctio ess  No.  ence 

LDI  R1        .      0  A 
1 A 
Operation Process

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

Desc Cases about series circuit and parallel circuit


riptio
n

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.

It is used to output the result to one or more than one addresses.

Parameter  Register point parameter 
 

25
HNC-8-PLC Programming specification 2. Basic instruction

Example 

Ladder Diagram
 

No.  Instr Addr Bit  Refer ST2 ST1  ST0 


uctio ess  No.  ence 

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


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

No.  Instructi Addr Bit  Refer ST2 ST1  ST0 


on  ess  No.  ence 
Operation Process

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

No.  Instr Addr Bit  Refer ST2 ST1  ST0 


uctio ess  No.  ence 
Operation Process

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

Function  Logic AND

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

Function  Logic OR NOT

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.

It is used for the situation in which programming starts from elements of


rising edge.

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
 

No.  Instruct Address Bit No.  Referance 


Operation Process

ion 
1  LDP  R1        .      0  Rising edge of A 

2  ORF  X5        .      0  Falling edge of B 

3  ANDP  R2        .      0  Rising edge of C 

4  ANDF  R4        .      0  Falling edge of D 

5  OUT  R10      .      1  Output W1 

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.

It is used for the situation in which programming starts from elements of


falling edge.

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 
 

Example  See the example for instruction LDP


 

36
HNC-8-PLC Programming specification 2. Basic instruction

ANDF
Format

Function  Logic AND falling edge

Parameter  Register point parameter 
 

Example  See the example for instruction LDP


 

37
HNC-8-PLC Programming specification 2. Basic instruction

ORP
Format

Function  Logic OR rising edge

Parameter  Register point parameter 
 

Example  See the example for instruction LDP


 

38
HNC-8-PLC Programming specification 2. Basic instruction

ORF
Format

Function  Logic OR falling edge

Parameter  Register point parameter 
 

Example  See the example for instruction LDP

39
HNC-8-PLC Programming specification 2. Basic instruction

ORB
Format
ORB

Function 

  1) ORB is independent, and doesn’t need to connect with other elements or


function blocks.

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

No.  Instr Add Bit  Refer ST2 ST1  ST0 


Operation Process

uctio ress No. ance 



1  LD  X1 .        0    A      A 

2  AND  X2 .        0 B      A.B  

3  LD  X1 .        1 D    A.B   D 

4  AND  X2 .        1 E    A.B   D.E  

5  ORB          A.B+ D.E 

6  LD  X1.        2  F    A.B + D.E F  


 
7  AND  X2.        2  G    A.B + D.E F .G  
 
8  ORB          A.B+D.E+F.G

9  OUT  R10.      1  H      A.B+D.E+F.G


Descriptio

41
HNC-8-PLC Programming specification 2. Basic instruction

ANB
Format
ANB

Function 

  1) ANB is independent, and doesn’t need to connect with other elements or


function blocks.

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

No.  Instr Addr Bit  Refer ST2 ST1  ST0 


Operation Process

uctio ess  No.  ence 



1  LD  X1 .        0      A      A.  

2  OR  X1 .        1  B      A+ B 

3  LD  X2 .        0  C    A+B C 

4  AND  X4.        4  D    A+B C.D  

5  LD  X1 .      2  E  A + B C.D E 


 
6  AND  X2 .      1  F  A + B C.D E.F  
 
7  ORB        A+B C .D + E .F  

8  OR  X1.        3  G    A+B C.D+ E.F + G 

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.

4) Every MPS must ends with MPP.

5)  The last connection line must      be ended with MPP.

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:

3.1 Normal-open Contact

3.2 Normal-close Contact

3.3 True contact

3.4 Rising edge of Contact

3.5 Falling edge of Contact

3.6 Logic Output

3.7 Inverted Logic Output

3.8 Setting Output

3.9 Reset Output

46
HNC-8-PLC Programming specification 3. Basic component

Normal‐open Contact
Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
  X、Y、F、
Register  Pre    ○ 
  <Addres G、R、W、
□□□□。□ BOOL  bit to be 
s> D、P、T、 Post    √ 
  checked 
C、B 
 

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. 
 

Parameter  Parameter 1: register point parameter, in the form of X0.1.

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

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
  X、Y、F、
Register  Pro    ○ 
  <Addres G、R、W、
□□□□。□ BOOL  bit to be 
s> D、P、T、 Post    √ 
  checked 
C、B 
 

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.
 

Parameter  Parameter 1: register point parameter, in the form of X0.1.

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

   Parame Paramet Storage  Explanat


Data type Properties 
ter  er form area  ion 
 
Pre    ○ 
None None  None  None  None 
  Post    √ 
 

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

Rising edge of Contact


Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
  Contact 
X、Y、F、 Pre    ○ 
  of rising 
<Addres G、R、W、
□□□□。□ BOOL  edge 
  s> D、P、T、 Post    √ 
detectio
C、B 
  n 

Function  When signal is changed from “0” to “1”, this contact is conducted.

   

Parameter  Parameter 1: register bit.

Example 

 
Ladder Diagram

See the example for LDP instruction.


Description

50
HNC-8-PLC Programming specification 3. Basic component

Falling Edge of Contact


Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
  Contact 
X、Y、F、 Pre    ○ 
  of falling 
<Addres G、R、W、
□□□□。□ BOOL  edge 
  s> D、P、T、 Post    √ 
detectio
C、B 
  n 

Function  When signal is changed from “1” to “0”, this contact is conducted.

   

Parameter  Parameter 1: register bit.

Example 

 
Di
Ladder

See the example for LDF instruction.


Descriptio

51
HNC-8-PLC Programming specification 3. Basic component

Logic Output
Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
 
<Addres BOOL  Y、G、R、 Output  Pre      ○ 
  □□□□。□
s> W、D、B  coil 
Post      × 
 

Function Output result of logical operation to output register.


 

Parameter Parameter 1: register bit.

Example

 
Di
Ladder

See the example for OUT instruction.


Descriptio

52
HNC-8-PLC Programming specification 3. Basic component

Inverted Logic Output


Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
 
<Addres □□□□。□ BOOL  Y、G、R、 Inverted  Pre      ○ 
  s>  W、D、B  output 
Post      × 
  coil 

Function  Output inverted result of logical operation to output register.

   

Parameter  Parameter 1: register bit.

Example 

 
Di
Ladder

See the example for OOUT instruction.


Descriptio

53
HNC-8-PLC Programming specification 3. Basic component

Setting Output
Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
 
<Addres □□□□。□ BOOL  Y、G、R、 Setting  Pre      ○ 
  s>  W、D、B  output 
Post      × 
  coil 

Function When result of logical operation is “1”, set output coil to output status, until 
this coil is reset by other functions. 
 

Parameter Parameter 1: register bit.

Example

 
Di
Ladder

See the example for SET instruction.


Descriptio

54
HNC-8-PLC Programming specification 3. Basic component

Reset Output
Symbol

  Paramet Paramet Storage  Explanat


Data type Properties 
er  er form area  ion 
 
<Addres □□□□。□ BOOL  Y、G、R、 Reset  Pre        ○ 
  s>  W、D、B  output 
Post      × 
  coil 

Function When result of logical operation is “1”, reset output coil, until this coil is set by
other functions.

Parameter Parameter 1: register bit.

Example 
Lad

See the example for RST instruction.


 
Des

55
HNC-8-PLCComponent specification 4. Basic function module

Basic Function Module


This chapter includes:

4.1 Control Instruction

4.2 Mathematical Operation

4.3 Counter

4.4 Timer

4.5 Process Control

4.6 Comparison

4.7 Data Manipulation

56
HNC-8-PLCComponent specification 4. Basic function module

Control Instruction

Instructin M Get MGET


Format 

 
 
 
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

When channel 0 executes M3, R4.0 is set.

57
HNC-8-PLCComponent specification 4. Basic function module

M Instruction Response MACK


Format 

 
 
 
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

When X3.6 is effective, M3 in channel 0 is responded.

58
HNC-8-PLCComponent specification 4. Basic function module

T Instruction Get TGET


Format 

 
 
 
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

When channel 0 executes T instruction, T instruction parameter is sent


to R5 register, and R6.1 is reset.

59
HNC-8-PLCComponent specification 4. Basic function module

T Instruction Response TACK


Format 

 
  
 
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

When X3.4 is turned on, T instruction in this channel is replied.

60
HNC-8-PLCComponent specification 4. Basic function module

Handwheel Control RTOMPG


Format   

   

  Parameter  Data  Properti


Parameter  Storage area  Explanation 
form  type es 
 
Constant,  X,  Y, 
<Address 
  □□□□  INT  F, G, R, W, D, P,    Pre  ○ 
1> 

Post  × 
<Address 
□□□□  INT  Constant   
2> 

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)

Parameter 2: MPG number, this parameter is for handwheel numbering. When


there are more than one handwheels, they are distinguished by this parameter.

Example
Ladder Diagram
List
Statement

LD X3.4

RTOMPG X40 0
tion
Descrip

When X3.4 is turned on, enable handwheel control. Handwheel pulse


control register X40 is set into handwheel 0.

61
HNC-8-PLCComponent specification 4. Basic function module

Thermal Error Compensation Module TEMPSEN


Format   

 
 
 
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 1: number of temperature sensor (number of temperature register). HNC-8 NC system


is limited to input of 20 temperature acquisition signals. Therefore, the range of values for
temperature sensor number is zero to nineteen.

Parameter 2: group number of X register corresponding to the digital signal of temperature


acquisition.

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

sensor of PT100 is supported, and thermocouple grid of HIO-1075 is connected; 3: temperature


sensor of KTY84-300 is supported, and thermocouple grid of HIO-1076 is connected; 4: the
relationship between the measured temperature and the resistance calculated by the entered value
of DA is linear. The corresponding model is built to calculate temperature, by the user parameter
(P parameter) specified by “parameter 4” which includes the lowest and highest temperatures, as
well as minimum and maximum resistances (unit: 0.01Ω).

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

TEMPSEN 0 X15 0 P30


Description

The temperatures which have been gathered by No. 0 temperature


sensor, is put into X15 register. P30 specifies the lowest acquisition
temperatures.

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 Parameter 1: minuend

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 Parameter 1: multiplicand

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 Parameter 1: dividend

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

Increase One INC


 
Format 

 
 
 
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. 
 

Parameter Parameter 1: operand.

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

Decrease One DEC


 
Format 

 
 
 
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. 
 

Parameter Parameter 1: operand.

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

Logic AND WAND


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 AND. 
 

Parameter Parameter 1: the number being operated.

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 
 

Function Parameter 1: the number being operated.

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

Logic XOR WXOR


Format 

   

 
 
 

  Paramete Parameter  Data  Storage  Explan


Properties
r  form  type  area  ation 
 
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 XOR. 
 

Parameter Parameter 1: the number being operated.

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   

   

  Paramet Parameter  Data  Storage  Properti


Explanation 
er  form  type area  es 
 
<Addres Y,  G,  R,  W,  Pre  √ 
□□□□  INT   
s 1>  D, B  Post  ○ 

Function  Perform complement operation. 
 

Parameter Parameter 1: operand

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

Plus-minus Counter CTR


  
Format 

   
 
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.

Parameter 2: preset value of 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.

Input 3: plus-minus input. When condition is satisfied, the counter is


incremented; when condition is not satisfied, the counter is decremented.

Input 4: reset input

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 

   

Parameter  Data  Properti


Parameter  Storage area 
form  type es 

<Address 1>  □□□□  INT  Constant 


Pre  √ 
INT  Constant, R, W,  Post  √ 
<Address 2>  □□□□
D, B, P 

Function  Fixed counter 
 

Parameter Parameter 1: number of counter

Parameter 2: preset value of counter

Input Input 1: control input

Input 2: reset input

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

Custom Plus-minus Counter CTUD


Format 

 
 
 

 
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. 
 

Parameter Parameter 1: number of counter

Parameter 2: preset value of counter

Input Input 1: control input

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.

Input 3: plus-minus input. When condition is satisfied, the counter is


incremented; when condition is not satisfied, the counter is decremented.

Input 4: Reset input

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

Delay-on Timer TMRB


   
Format 

   
 
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 

Function  Delay-on timer


 

86
HNC-8-PLCComponent specification 4. Basic function module

Parameter Parameter 1: number of timer

Parameter 2: time unit, the details are as following:

Time unit is hour, in the event of the value being 3;

Time unit is minute, in the event of the value being 2;

Time unit is second, in the event of the value being 1;

Time unit is millisecond, in the event of the value being 0.

Parameter 3: Length of timing.

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

Delay-off Timer STMR


    
Format 

   
 
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

Function  Delay-off timer


 

88
HNC-8-PLCComponent specification 4. Basic function module

Parameter

Parameter 1: number of timer

Parameter 2: time unit, the details are as following:

Time unit is hour, in the event of the value being 3;

Time unit is minute, in the event of the value being 2;

Time unit is second, in the event of the value being 1;

Time unit is millisecond, in the event of the value being 0.

Parameter 3: Length of timing.

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

Initialization Module End IEND


 
Format 

 
 
 
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

PLC1 Module End 1END


  
Format 

 
 
 
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

PLC1 program is ended.

91
HNC-8-PLCComponent specification 4. Basic function module

PLC2 Module End 2END


  
Format 

 
 
 
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

PLC2 program is ended.

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

If x35.5 is on, go to the positon labeled L1111 to continue the execution.

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

Set label L1111.

94
HNC-8-PLCComponent specification 4. Basic function module

Call Subprogram CALL


  
Format 

  CALL <Address 1>

 
 
 
Paramet Parameter  Data  Storage  Properti
  Explanation 
er  form  type  area  es 
  <Addres Pre  ○ 
□□□□ INT S  
s1>  Post  × 

Function  Call subprogram.

   

Parameter  Subprogram number. 
 

Example 
Ladder Diagram

  X12.2

CALL S123
 

 
List
Statement

LD X12.2

CALL S123
Description

When X12.2 input is valid, jump to the subprogram of No. S123 to


execute.

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  × 

Function  To start subprogram.

   

Parameter  Number (support up to 512 numbers of subprogram.
 

Example 
Ladder Diagram

 
Statement List

SP S111
Description

Set subprogram number of S111.

96
HNC-8-PLCComponent specification 4. Basic function module

Subprogram End SPE


    
Format 

 
 
 
Paramet Parameter  Data  Storage  Properti
  Explanation 
er  form  type  area  es 
  Pre  × 
None  None None None  
Post  × 

Function  To end Subprogram.

   

Parameter 

Example 
Ladder Diagram

 
List
Statement

SPE
n
Descriptio

Subprogram is ended.

97
HNC-8-PLCComponent specification 4. Basic function module

Subprogram Return RETN


     
Format 

 
 
 
Paramet Parameter  Data  Storage  Properti
  Explanation 
er  form  type  area  es 
  Pre  ○ 
None  None None None  
Post  × 

Function  Subprogram return. If this instruction is encountered in the subprogram, the


execution will jump out of the subprogram, and continue the rest.
 

 
Parameter 

Example 
Ladder Diagram

 
List
Statement

LDI R100.0

RETN
cript

If normal-closed point of R100.0 is valid, the subprogram will return.

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

Five times of loops

99
HNC-8-PLCComponent specification 4. Basic function module

Next Loop NEXT


     
Format 

 
 
 
Paramet Parameter  Data  Storage  Properti
  Explanation 
er  form  type  area  es 
  Pre  × 
None  None None None  
Post  × 

Function  Enter the next loop.


 

Example 
Ladder Diagram

 
nt
eme

NEXT
cript

Enter the next loop. It is used with the instruction LOOP.

100
HNC-8-PLCComponent specification 4. Basic function module

Comparison

Comparison CMP
Format 

 
 
 
Paramet Parameter  Data  Storage  Properti
Explanation 
  er  form  type  area  es 

  Constant,  When  the  address 


<Addres X,  Y,  F,  G,  1  is  larger  than 
  □□□□  INT 
s1>  R, W, D, P,  address  2,  the 
  B  output  is  0,  when  Pre  ○ 
the  address  1  is 
 
Constant,  smaller  than  or  Post  √ 
<Addres X,  Y,  F,  G,  equal  to  the 
□□□□  INT 
s2>  R, W, D, P,  address  2,  the 
B  output is 1.     

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.

Parameter Parameter 1: comparing data, can be constant and register.

Parameter 2: data being compared, can be constant and register.

101
HNC-8-PLCComponent specification 4. Basic function module

Example

Ladder Diagram
n
Descriptio

When R0<=100, the condition is satisfied.

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.

Parameter Parameter 1: comparing data, can be constant and register.

Parameter 2: data being compared, can be constant and register.

Example
Ladder Diagram
Des

When R0<100, the condition is satisfied.

103
HNC-8-PLCComponent specification 4. Basic function module

Area Comparison ACMP


Format 

 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  <Addres Constant, X, Y, F,  When  data 


□□□□  INT 
s1>  G, R, W, D, P, B  of address 3 
 
is  larger 
  <Addres Constant, X, Y, F,  than  that  of 
□□□□  INT 
s 2>  G, R, W, D, P, B  address  1,  Pre  ○ 
 
and  smaller  Post  √ 
  Constant, X, Y, F,  than  that  of 
<Addres G, R, W, D, P, B  address2, 
  □□□□  INT 
s 3>  the  output 
is 1. 

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.

Parameter 2: the high end of comparison range, can be constant or register.

Parameter 3: Comparing data, can be constant or register.

Example
Ladder Diagram
Des

When R0<100 and R0>0, the condition is satisfied.

104
HNC-8-PLCComponent specification 4. Basic function module

Consistency Comparison COIN


Format 

 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  <Addres Constant, X, Y, F,  When  the  data 


□□□□  INT 
s1>  G, R, W, D, P, B  of  address  1  and 
 
address 2 are the 
  Constant, X, Y, F,  same, the output  Pre  ○ 
<  G, R, W, D, P, B  is  1;  when  they  Post  √ 
 
Address  □□□□  INT  are  not  the 
2>  same, the output 
is 0. 

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.

Parameter Parameter 1: benchmark data, can be constant and register.

Parameter 2: comparing data, can be constant and register.

Example
Ladder Diagram
Descripti

When R0=100, the condition is satisfied.

105
HNC-8-PLCComponent specification 4. Basic function module

Data Manipulation

Moving Data MOV


Format 

 
 
 
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.

Parameter Parameter 1: source data, can be constant and register.

Parameter 2: destination data, and be constant and register.

Example
Ladder Diagram
Des

Data in D0 is assigned to data in D1.

106
HNC-8-PLCComponent specification 4. Basic function module

Relative Moving Data XMOV


Format 

 
 
 
 
 
 
 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  <Addres INT  Constant 


□□□□ 
s1> 
 

  <Addres INT  G、R、W、D、B


□□□□ 
s 2>  Relative  Pre  ○ 
 
moving 
  <Addres INT  Constant  data  Post  √ 
□□□□ 
s 3> 
 

  <Addres INT  G、R、W、D、B


□□□□ 
s 4> 

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

Assign the data shifted to D1 in register B to the position shifted to D2


in register B.

108
HNC-8-PLCComponent specification 4. Basic function module

Batch Moving BMOV


Format 

   

  Paramete Parameter  Data  Explana


Storage area  Properties 
r  form  type  tion 
 
Constant, X, Y, 
  <Address
□□□□  INT  F,  G,  R,  W,  D, 
1> 
  P, B  Pre  ○ 
Moving 
Constant, X, Y,  the data   
<Address
□□□□  INT  F,  G,  R,  W,  D,  in 
2> 
P, B  batch. 

<Address  □□□□ INT  Constant


Post √
3>

Function  Move data in batch. Multiple data of source starting address is transferred to 
starting address of destination.

Parameter Parameter 1: Starting address of source data

Starting address of destination

Parameter 3: Moving number, can only be constant.

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

Multiple Moving Data FMOV


Format 

   

  Parameter  Data  Storage  Explanatio Properti


Parameter 
form  type  area  n  es 
 
<Address  INT  Y,  G,  R,  W, 
  □□□□ 
1>  D, B 
 
<Address  INT  Y,  G,  R,  W,  Multiple  Pre  ○ 
  □□□□ 
2>  D, B  moving 
data.  Post  × 
INT  Constant,  X, 
<Address 
□□□□  Y,  F,  G,  R, 
3> 
W, D, P, B 

  

Function  Multiple  moving  data.  Source  data  is  transferred  to  a  space  that  from  the 
starting address of destination to ending address of destination.
 

Parameter Parameter 1: starting address of destination

Parameter 2: ending address of destination

Parameter 3: source data

Example

111
HNC-8-PLCComponent specification 4. Basic function module

Ladder Diagram
Descripti

D3 data is assigned to the position that from D0 to D2.

112
HNC-8-PLCComponent specification 4. Basic function module

Data Exchange XCH


Format 

  D1□□□

 
D2□□□
  XCH
D3□□□
 
D4□□□
 

   

  Parameter  Data  Storage  Properti


Parameter  Explanation 
form  type  area  es 
 
<Address1 INT  Constant   
  □□□□ 

 
 
<Address  INT  G, R, W, D,   
  □□□□ 
2>  B  It  is  used  to   
  exchange 
<Address  INT  Constant  data.  Pre  ○ 
□□□□ 
3>   

<Address  INT  G, R, W, D,  Post  × 


□□□□ 
4>  B 

  

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

Exchange the data shifted to D1 with the data shifted to D2 in register


B.

114
HNC-8-PLCComponent specification 4. Basic function module

Data Reset ZRST


Format 

 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  <Addres Y, G, R, W, D, B Pre  ○ 


□□□.□  BOOL
  s1>   
Data reset 
<Addres Y, G, R, W, D, B Post  √ 
□□□.□  BOOL
s2> 

Function  Data reset. Reset the data which is from starting address of operand to ending 
address of operand.

Parameter Parameter 1: starting address of operand

Parameter 2: ending address of operand

Example
Ladder Diagram
Descripti

0 is assigned to the position that from D0 to D1

115
HNC-8-PLCComponent specification 4. Basic function module

Encoding ENCO
Format 

  <Address 1>

 
<Address 2>

  ENCO
<Address 3>

 
<Address 4>
 

   

  Parameter  Data  Explan Proper


Parameter  Storage area 
form  type  ation  ties 
 
<Address1 BOOL X,  Y,  F,  G,  R,  W, 
  □□□□. □ 
>  D, P, B  Pre  ○
  It  is 
<Address2 INT  Constant  used   
  □□□□ 
>  for 
overrid
<Address3 BOOL X,  Y,  F,  G,  R,  W,  e  value 
□□□□. □ 
>  D, P, B  conver
Post 
sion 
× 
<Address4 BOOL Y,  G,  R,  W,  D,  P, 
□□□□. □ 
>  B 

  
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.

Parameter 2: number of coded data, can be constant.

Parameter 3: source data, can be register R and D.

Parameter 4: Output address of destination data, can be register R and D.

Example

116
HNC-8-PLCComponent specification 4. Basic function module

Ladder Diagram
Des

After being encoded, data in D1 is output to D2.

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.

Parameter 2: number of decoded data, can be constant.

118
HNC-8-PLCComponent specification 4. Basic function module

Parameter 3: source date, can be register R and D

Parameter 4: Output address of destination data, can be register R and D.

Example
Ladder Diagram
Des

After being decoded, the data in D1 is output to D2

119
HNC-8-PLCComponent specification 4. Basic function module

Transformation COD
Format 

  <Address 1>

 
<Address 2>

  COD
<Address 3>

 
<Address 4>
 

   

  Parameter  Data  Explan Proper


Parameter  Storage area 
form  type  ation  ties 
 
<Address1 BOOL X,  Y,  F,  G,  R,  W,  Pre     
  □□□□. □ 
>  D, P, B  √ 
  It  is 
<Address  used 
  □□□□  INT  Constant 
2>  for 
overrid
<Address  BOOL X,  Y,  F,  G,  R,  W,  e  value  Post    
□□□□. □ 
3>  D, P, B  conver × 
sion 
<Address  BOOL Y,  G,  R,  W,  D,  P, 
□□□□. □ 
4>  B 

  
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.

Parameter 2: the number of data being transformed, which can be constant.

Parameter 3: source data, can be register R and D.

Parameter 4: output address of the target data, can be register R and D.

120
HNC-8-PLCComponent specification 4. Basic function module

Example

Ladder Diagram
Des

After being transcoded, the data in D1 is output to D2.

121
HNC-8-PLCComponent specification 4. Basic function module

Data Search SER


format 

  <Address 1>

 
<Address 2>

  SER
<Address 3>

 
<Address 4>
 

   

  Parameter  Data  Storage  Prop


Parameter  Explanation 
form  type  area  erties
 
<Address  INT  X, Y, F, G, R, 
  □□□□ 
1 >  W, D, P, B  When  data 
Pre
  has  been 
√ 
<Address  found,  the 
  □□□□  INT  Constant 
2 >  output is 1; 
when  data 
<Address  INT  X, Y, F, G, R,  hasn’t 
□□□□ 
3 >  W, D, P, B  been 
Post
found,  the 
× 
<Address  INT  Y,  G,  R,  W,  output is 0.   
□□□□ 
4 >  D, P, B 

  
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. 
 

      

Parameter Parameter 1: searching address, can only be register D.

Parameter 2: searching range, can be constant.

Parameter 3: the data to be searched, can be constant and register X, Y, K, L, F, G,


R, D.

Parameter 4: the output address of searched result, can only be register D.

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

Register Merging ASSEM


Format 

   

  Parameter  Data  Explanatio Proper


Parameter  Storage area 
form  type  n  ties 
 
<Address  INT  X,  Y,  F,  G,  R, 
  □□□□ 
1 >  W, D, P, B  To  merge 
  the  data  Pre√
<Address  of  several 
  □□□□  INT  Constant 
2 >  registers 
  into  one 
<Address  INT  G, W, D, B  register. 
□□□□  Post×
3 > 

  
Function  To merge several register data into one register. 

 
      

parameter

Parameter 1: source data.

Parameter 2: quantity of source registers, can only be constant.

Parameter 3: target address, can be register G, W, D, B.

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

Register Decomposition DISAS


Format 

   

  Parameter  Data  Storage  Proper


Parameter  Explanation 
form  type  area  ties 
 
<Address  INT  F, G, W, D, 
  □□□□ 
1 >  P, B 
To  break  up 
  Pre√
the  data  of 
<Address 
  □□□□  INT  Constant one  register 
2 > 
into  several 
 
registers. 
<Address  INT  Y, G, R, W, 
□□□□  Post×
3 > 

  
Function  To break up the data of one register into several registers. 

      

Parameter

Parameter 1: source address.

Parameter 2: number of source registers, can only be constant.

Parameter 3: target address, can be register Y, G, R, W.

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

Area Conversion ACVT


Format 

   

  Parameter  Data  Storage  Proper


Parameter  Explanation 
form  type  area  ties 
 
<Address  INT  P 
  □□□□  Convert 
1 > 
source  data 
 
which  follows  Pre√
X, Y, F, G, 
  <Address  a  certain 
□□□□  INT  R, W, D, P, 
2 >  proportional 
  B 
relationship 
to  target 
<Address  INT  Y, G, R, W, 
□□□□  data.  Post×
3 >  D, B 

  

Function  Convert source data which follows a certain proportional relationship to target 
data. 
 

      

parameter Parameter 1: Address of proportional relationship.

0  Minimum value of source data 
1  Maximum value of source data 
2  Minimum value of target data 
3  Maximum value of target data 

Parameter 2: number of source registers.

Paramter 3: target address, can be register Y, G, R, W, D, B;

128
HNC-8-PLCComponent specification 4. Basic function module

Example

Ladder Diagram
Descrip

Convert D0 data which follows a certain proportional relationship to


D1. D1=(D0-P0)*(P3-P2)/(P1-P0)+P0;

129
HNC-8-PLCComponent specification 4. Basic function module

Alternate Output ALT


Format 

 
 
 
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

Fetch Rising Edge PLS


Format 

 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  Rising  edge  Pre  ○ 


<Addres
□□□□  INT  Constant  module 
  s 1> 
number  Post  √
 

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

Fetch Falling edge PLF


Format 

 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  Falling  edge  Pre  ○ 


<Addres
□□□□  INT  Constant  module 
  s 1> 
number  Post  √

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

Points Transformation PTN


Format 

   

  Parameter  Data  Storage  Explanatio Properti


Parameter 
form  type  area  n  es 
 
Y, G, R, W, 
  <Address 1>  □□□□  BOOL
D, B   
   
X, Y, F, G, R,   
  □□□□.
<Address 2>  BOOL W, D, P, T, 
□   
  C, B 

   
<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 

<Address 9>  □□□□  INT  Constant 

  

133
HNC-8-PLC Component specification 4. Basic function module

Function          To  build  the  corresponding  relationship  between  points  and 


numbers.  When  the  point  is  effective,  the  corresponding 
 
number is generated. 
 

     

Parameter 1: the destination address.

Parameter 2: point 1

Parameter Parameter 3: number 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

When Y30.0 is effective, R0=0.

When Y30.1 is effective, R0=1.

When Y30.2 is effective, R0=2.

When Y30.3 is effective, R0=3.

134
HNC-8-PLC Component specification 4. Basic function module

Number Conversion NTP


Format 

   

  Parameter  Data  Explanat Properti


Parameter  Storage area 
form  type  ion  es 
 
<Address  Y, G, R, W, D, 
□□□□  BOOL
  1>  B 
<Address 
  □□□□  INT  Constant   
2> 
  X,  Y,  F,  G,  R, 
<Address  Pre  ○ 
  □□□□. □  BOOL W,  D,  P,  T,  C, 
3> 

  <Address 
□□□□  INT  Constant   
  4> 
X,  Y,  F,  G,  R, 
  <Address 
□□□□. □  BOOL W,  D,  P,  T,  C, 
5>   
  B 
<Address  INT  Constant   
  □□□□ 
6> 
  X,  Y,  F,  G,  R, 
<Address 
□□□□. □  BOOL W,  D,  P,  T,  C, 
  7>  Post  ×

<Address  INT  Constant   
□□□□ 
8> 
X,  Y,  F,  G,  R, 
<Address 
□□□□. □  BOOL W,  D,  P,  T,  C, 
9> 

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 1: the address of source data

Parameter 2: number 1

Parameter 3: point 1

Parameter Parameter 4: number 2

Parameter 5: point 2

Parameter 6: number 3

Parameter 7: point 3

Parameter 8: number 4

Parameter 9: point 4

Example
Ladder Diagram
Description

When R0=0, Y30.0 is effective.

When R0=1, Y30.1 is effective.

When R0=2, Y30.2 is effective.

When R0=3, Y30.3 is effective.

136
HNC-8-PLC Component specification 4. Basic function module

Part Count PARTCNT


Format 

 
 
 
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.

Parameter Parameter 1: channel number

Example
Ladder Diagram
on
Descripti

When 32.1 is turned on, 1 is added to the part count of channel 0.

137
HNC-8-PLC Component specification 4. Basic function module

Part-counting Clear PARTCLR


Format 

 
 
 
Paramet Parameter  Data  Storage  Properti
Explanation 
  er  form  type  area  es 

  When  condition  Pre  ○ 


is  satisfied,  part 
 
<Addres count  of 
□□□□  INT  Constant 
s 1>  <Address  > 
Post  √ 
channel  is 
cleared to zero. 

Function  Clear the count of the part. 
       

Parameter Parameter 1: channel number.

Example
Ladder Diagram
Description

When X32.1 is turned on, the part count in channel 0 is cleared.

138
HNC-8-PLC Component specification 4. Basic function module

139
HNC-8-PLC Component specification 4. Basic function module

Temperature Collection Module HEADSEN


Format 

   

  Parameter  Data  Storage 


Parameter  Explanation  Properties
  form  type  area 

  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. 

Function  Temperature collection module.

Parameter Parameter 1: total quantity of temperature collection data, can be constant.


Parameter 2: enable switch of temperature collection module, 0 indicates
counting starts, other values indicate the module is not enabled.

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

When X32.1 is turned on, the temperature collection module starts to


count, and 10 temperature data is stored in the initial location given by
D1.

141
HNC-8-PLC Component specification 5. Status word and control word programming

Status Word and Control Word


Programming
This chapter includes:

5.1 Introduction on Status Word and Control Word

5.2 Example of Status Word and Control Word Programming

142
HNC-8-PLC Component specification 5. Status word and control word programming

Introduction on Status Word and Control Word


Overview

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.

‹ Status words and control words of axis


‹ Status words and control words of channel
‹ Status words and control words of system

Symbol Take the words of channel as an example:


form

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 Word


Overview 80 status words are configured for each axis. Each status word has a 16-bit byte.
The first row indicates the bits from 0 to 7, and the second row indicates the bits
from 8 to 15. The axis status words need to be used with the logical number
offset of axis.

Axis status D7 D6 D5 D4 D3 D2 D1 D0

word D15 D14 D13 D12 D11 D10 D9 D8

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

Index axis Index Index axis


Reserved Reserved Reserved Reserved Reserved
locking position unlocking

F2 Capture
Servo Zero Servo 2nd stage
Reserved Reserved Servo ready the first Z
parameter capture home home
pulse

Spindle SPD Gain Z pulse Torque Speed Position


Sv ready
stop arrival switch capture control control control

Servo Servo Normal


Reserved Reserved Reserved Reserved Reserved
F3 prompt alarm servo

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

【F1.6】Feed spindle is at zero speed.


【F1.7】Feed spindle speed arrival.
【F1.13】Index axis is unlocked. 1 indicates that system notifies PLC to unlock
index axis. The index axis is enabled.
【F1.14】Index axis is at index position.
【F1.15】Index axis is locked. 1 indicates that system notifies PLC to lock index
axis. The index axis is disabled.
【F2.0】When Z pulse is captured once during homing of axis, the value is 1;
otherwise, the value is 0.
【F2.1】When servo ready flag is 0, servo can receive incremental data.
【F2.3】Capture Z pulse of the second encoder, which is mainly used for homing
of distance code grating scale.
【F2.4】When servo has been back to zero, the output is 1.
【F2.6】Zero capture, which is mainly usded for spindle. When spindle meets the
first Z pulse at rotating time, set the value to 1. In the event of CS switching, the
value nees to be set to 1.
【F2.7】Servo parameter switch. 0: default parameter. 1: switch to the second set
of parameter.
【F2.8】When bus servo is ready, the value is 1; otherwise, the value is 0.
【F2.9】When servo is in position control mode, the value is 1; otherwise, the
value is 0.
【F2.10】When servo is in speed control mode, the value is 1; otherwise, the
value is 0.
【F2.11】When servo is in torque control mode, the value is 1; otherwise, the
value is 0.
【F2.12】When Z pulse is encountered, the value is 1; otherwise, the value is 0.
【F2.13】
【F2.14】When the spindle speed reaches, the value is 1, otherwise, the value is
0.
【F2.15】Spinde stop: when spindle stops, the value is 1; otherwise, the value is
0.
【F3.0】When servo is normal, the value is 1.
【F3.1】When servo alarms, the value is1.
【F3.2】When servo prompts, the value is 1.
【F3.8】Spindle orientation is completed After spindle orientation is set, spindle
starts directing. After the directing is completed, servo returns the signal of
completing spindle orientation, and the value is 1; otherwise, the value is 0.
【F4】Number of channel which the axis belongs to. (Channel number is in
decimal.)
【F5】Number of driven axises which are guided. (Number of driven axises is in
decimal.)
【F[6/7]】Real-time output command increment, motor coordinate.

147
HNC-8-PLC Component specification 5. Status word and control word programming

【F[8/9/10/11]】Real-time output command position, motor coordinate. (metric


system)
【F[12/13/14/15]】Output command pulse position, unit: pulse.
【F[16/17]】Command pulse per cycle. Number of command pulses which is
sent to servo each cycle.
【F[18/19]】Output command torque.
【F[20/21/22/23]】Actual feedback position of encoder 1. (metric system)
【F[24/25/26/27]】Actual feedback position of encoder 2. (metric system)
【F[28/29/30/31]】Command position of machine. (metric system)
【F[32/33/34/35]】Actual position of machine. (metric system)
【F[36/37]】Axis alarm
【F36.2】Plus software limit switch reached.
【F36.3】Minus software limit switch reached
【F36.4】Actual speed is overspeed.
【F36.6】Overspeed
【F36.7】Super acceleration.
【F36.8】Z pulse cannot be found.
【F36.9】Connection has been aborted.
【F36.10】Not referenced.
【F36.11】Sync position out-of-tolerance
【F36.12】Slave axis zero check is aborted
【F36.13】Sync speed out-of-tolerance
【F37.0】Plus software limit exceeded.
【F37.2】Minus software limit exceeded.
【F37.2】Acceleration does not match maximum speed.
【F[38/39]】Axis prompt
【F38.0】Max compensation ratio exceeded.
【F38.1】Max compensation exceeded.
【F38.2】Zero offset parameter is too small.
【F38.4】Software limit is too large.
【F38.5】The second software limit is too large.
【F38.6】Absolute encoder cycle digits are illegal.
【F38.7】Position overflow.
【F38.8】Target is outside plus software limit.
【F38.9】Target is outside minus software limit.
【F38.10】Mask angle of Z pulse needs to be adjusted.
【F38.11】Reference position needs to be adjusted.
【F38.12】Tracking error is too large.
【F[70]】Current axis mode.

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


80 control words are configured for each axis. Each control word has a16-bit
Overview
byte. The first row indicates the bits from 0 to 7, and the second row indicates
the bits from 8 to 15. The axis contorl words need to be used with the logical
number offset of axis.

Axis
control
word
D7 D6 D5 D4 D3 D2 D1 D0

G0
D15 D14 D13 D12 D11 D10 D9 D8

Axis Axis lock Home Home No axis No axis Negative Positive

enable block start motion in motion in limit limit

negative positive

direction direction

Axis reset Compens Reserved Reserved Subaxis Reserved Reserved Reserved

ation follow

expansion

G1
*SP *SP *SP *SP Jog Expand The Relative Absolute

rotation rotation orientatio software second pmc pmc

CCW CW n limit software motion motion

limit

Response Response Reserved CS Reserved Reserved Reserved Reserved

locking unlocking response

G2
Servo Reserved Reserved Reserved Capture Z
Capture Z
Parameter pulse of Reserved Reserved
pulse
encoder 2

Spindle Directiona Reserved


Spindle Torque Speed Position Servo
current-li l
orientation control control control gain
miting gear-shift

G3
Reserved Reserved Reserved Reserved Reserved Reserved Reserved Servo

enable

Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved

Details

150
HNC-8-PLC Component specification 5. Status word and control word programming

【G0.0】Positive limit switch of axis.

【G0.1】Negative limit switch of axis.

【G0.2】No axis movement in positive direction.

【G0.3】No axis movement in negative direction.

【G0.4】Set to start homing.

【G0.5】Set home block.

【G0.6】Set to lock the axis.

【G0.7】Set axis enable

【G0.11】Set to disable function of subaxis following

【G0.14】Compensation expansion

【G0.15】Single-axis reset

【G1.0】Absolute PMC axis motion is enabled.

【G1.1】Relative PMC axis motion is enabled.

【G1.2】The second software limit is enabled.

【G1.3】Extension software limit is enabled.

【G1.4】Feed-spindle Jog.

【G1.5】Feed-spindle orientation.

【G1.6】Feed -spindle rotates in clockwise direction.

【G1.7】Feed -spindle rotates in counter clockwise direction.

【G1.12】Response flag of PLC to spindle C/S switch.

【G1.14】Response flag of PLC to signal of unlocking index axis.

【G1.15】Response flag of PLC to signal of locking index axis.

【G2.0】Z pulse flag. (when motor is at the position of Z pulse, this flag is 1.)

【G2.1】Wait for zero pulse

【G2.2】Turn off function of searching zero pulse.

【G2.3】Capture zero pulse of the second encoder.

【G2.7】 Servo parameter switch. 0: Defaul parameter, 1: switch to the second


set of parameter.

【G2.8】Servo gain switch.

【G2.9】Switch to position control mode.

151
HNC-8-PLC Component specification 5. Status word and control word programming

【G2.10】Switch to speed control mode.

【G2.11】Switch to torque control mode.

【G2.12】Spindle orientation start.

【G2.14】Directional gear-shift of spindle.

【G2.15】Spindle current-limiting

【G3.0】Servo enable switch.

【G4】Axis jog flag. When the axis is manual, or returning to zero, or the spindle
is rotating, this flag is effective.

【G5】Increment flag of axis. When axis is moving incrementally, this flag is


effective.

【G[6/7]】Jog speed. 0: stop; 1: Jog speed in paramter; 2: Rapid traverse speed in


parameter; >2: Self-defined speed.

【G8】Incremental rate.

【G9】Handwheel rate.

【G[10/11]】handwheel pulse.

【G[12/13/14/15]】Axis feedback position, unit: pulse

【G[16/17/18/19]】Axis feedback position 2, unit: pulse

【 G[20/21] 】 Actual speed of axis, unit: pulse. Actual axis-speed is the


incremental value per cycle of the actual feedback position of axis (G12-G15).

【G[22/23]】Actual speed 2 of axis

【G[24/25]】Actual torque of axis

【G[26/27]】Tracking error. (Tracking error of axis is the difference between the


actual axis feedback position (G12-G15) and the axis command position
(F12-F15).)

【G[28/29/30/31]】Counter value of encoder 1

【G[32/33/34/35]】Counter value of encoder 2

【G[36/37]】Real-time compensation value.

【G[38/39]】Sample timestamp

【G[40/41/42/43]】Latch position 1 (when the first encoder has z pulse, the


current position is latched, which is used for G31 or distance code homing.

【G[44/45/46/47]】Latch position 1 (when the second encoder has z pulse, the


current position is latched, which is used for G31 or distance code homing.

152
HNC-8-PLC Component specification 5. Status word and control word programming

【G[48/49/50/51]】Target position of absolute movement for PMC axis.

【G[52/53/54/55]】Incremental movement of PMC axis

【G[56/57]】Servo alarm code.

【G[58/59]】Servo prompt code.

【G60】(2 is handwheel interruption, and 103 is PMC mode)

【G61】Override value of PMC axis.

【G62.0】PMC axis stop.

【G62.1】Zero handwheel interruption.

【G62.2】Turn on function of tangent following.

【G62.4】Index axis switch.

【G62.5】When coupling of driven axis is restored, synchronize the position of


synchronization axis.

【G62.8】Spindle control, write actual rotation speed to instruction.

【G62.9】Start spindle rotation speed of gear shift.

【G64】Current axis gear.

【G66/67】Gear shift of spindle.

【G68/69】Z pulse position.

【G70/71】Z pulse interval 1.

【G72/73】Z pulse interval 2.

【G74】Gear shift of spindle.

【G78/79】Sample data of servo

153
HNC-8-PLC Component specification 5. Status word and control word programming

Channel Status Word


Overview 80 control words are configured for each channel. Each control word has a 16-bit
byte. The first row indicates the bits from 0 to 7, and the second row indicates
the bits from 8 to 15. The axis contorl words need to be used with the logical
number offset of channel.

Axis status D7 D6 D5 D4 D3 D2 D1 D0

word D15 D14 D13 D12 D11 D10 D9 D8

User
Cycle
interventi 非自动时运动 Feedhold Mode #3 Mode #2 Mode #1 Mode #0
start
F2560 on

Search Z Suspend Verify


Resetting Rest flag reserved Cut thread Cutting
pulse request state

Interrupti
Wait for Interrupti Procedure Program Program
reserved reserved on
comletion on skip complete start select
F2561 complete

Non-null Non-null

reserved reserved reserved reserved reserved reserved completio instructio

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

【F2560.0 ~F2560.3】To get mode

0: Reset mode 1: Auto mode 2: Manual mode

3: Increment mode 4: Handwheel mode 5: Home mode

6: PMC mode 7: Single block mode 8: MDI mode

154
HNC-8-PLC Component specification 5. Status word and control word programming

【F2560.4】Feedhold: channel is in state of feedhold.

【F2560.5】Cycle start:channel is in state of cycle start.

【F2560.6】Axis moves in non-auto mode.

【F2560.7】User movement is interfering.

【F2560.8】Cutting.

【F2560.9】Thread-cutting: channel is in state of cutting thread, and feedhold is

not allowed.

【F2560.11】Verify state.

【F2560.12】Channel reset: in the event of channel reset or reset button on panel


being pressed, channel reset is effective, until channel reset response is set.

【F2560.13】Suspend request.

【F2560.14】Channel is resetting.

【F2560.15】When axis is returning home to look for Z pulse, switching mode is


not allowed.

【F2561.0】Program is selected, which is set by interpreter.

【F2561.1】Program start, which is set by channel control.

【F2561.2】Program is completed, which is set by channel control.

【F2561.3】Interrupt instruction G28/G31 is completed.

【F2561.4】Skip interrupt instruction.

【F2561.5】Wait for completing instruction.

【F2561.8】There are non-empty instruction flags in channel.

【F2561.9】Non-empty instruction flag is completed in channel.

【F2562.9】Tool offset mark [tool offset number is in T instruction]

【F2562.10】PLC index instruction flag.

【F2562.11】Spindle is at constant linear speed.

【F2562.12】The first S instruction.

【F2562.13】The second S instruction.

【F2562.14】The third S instruction.

【F2562.15】The forth S instruction.

【F2569】Tool offset number, which is in T instruction.

155
HNC-8-PLC Component specification 5. Status word and control word programming

【F[2570/2571】The first S instruction. Unit: 0.001 revolution/minute.

【F[2572/2573】The second S instruction. Unit: 0.001 revolution/minute.

【F[2574/2575】The third S instruction. Unit: 0.001 revolution/minute.

【F[2576/2577】The forth S instruction. Unit: 0.001 revolution/minute.

【F2578/79】G31 number which is currently waiting signal.

【F2580】Currently running coordinate system.

【F[2581/2589]】Axis numbers of nine axises in channel

【F[2590/2593]】Axis number of the forth spindle in channel.

【F[2594/2595]】Alarm code of syntax error.

【F[2596/2599]】Channel alarm code.

【F[2600/2603]】Channel prompt number.

【F[2604/2607]】User output.

【F[2608/2615]】M codes which run in channel, with a maximum of 8.

【F2616】T instruction in channel. When T code is executing in channel, the


value of T code is in register; otherwise, the output is 1.

【F2617】B instruction in channel. B axis in boring machine is executed by PLC,


and indexing is executed by B instruction.

【F2632】Number of tool which is alarmed for the maximum life span being
reached.

【F2636.0】Channel is resetting.

【F2632.1】Program has been stopped exactly.

【F2632.2】Flag of inclined axis

【F2632.3】Interpolation instruction runs in channel.

【F2632.4】Flag of spindle synchronization.

【F2632.5】Handwheel feed direction.

【F2637.0】Subprogram process start.

【F2637.1】Subprogram waits for feedhold, and saves breakpoint.

【F2637.2】Break point flag.

【F2637.3】Start to load subprogram.

【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.7】Breakpoint has been restored.

【F2637.8】Process ends.

【F2637.9】Process error

【F2637.10】Process reset.

【F2637.11】Process waits for interpreter reset to complete.

【F2638.0】Tool life-span manage – cumulative times of tool changing

157
HNC-8-PLC Component specification 5. Status word and control word programming

Channel Control Word


Overview 80 control words are configured for each channel. Each control word has a 16-bit
byte. The first row indicates the bits from 0 to 7, and the second row indicates
the bits from 8 to 15. The axis contorl words need to be used with the logical
number offset of channe

Axis D7 D6 D5 D4 D3 D2 D1 D0

control D15 D14 D13 D12 D11 D10 D9 D8

word
Measure

ment Cycle Work Work Work Work


Dry run Feedhold
interrupti start mode mode mode mode
G2560
on

Data Clear Emergenc Panel Reset


Data save Reset Verify
revovery cache y stop reset response

Data Arbitrary Explanati Selection Skip Interpreter


Rerun Rerun 2
G2561 recovery row on reset stop block flag startup

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

G2620 Panel Handwhe Home Single


PMC Increment Manual Auto
enable el reference block

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 7+ Axis 6+ Axis 5+ Axis 4+ Axis 3+ Axis 2+ Axis 1+ Axis 0+


G2622
Axis 8+
Reserved Reserved Reserved Reserved Reserved Reserved Reserved

Axis 7- Axis 6- Axis 5- Axis 4- Axis 3- Axis 2- Axis 1- Axis 0-

Axis 8-
G2623 Reserved Reserved Reserved Reserved Reserved Reserved Reserved

Details 【G2560.0/1/2/3】Work mode. 0: reset mode, 1: auto mode, 2: manual mode, 3:


increment mode, 4: handwheel mode.

【G2560.4】Feedhold: Set feedhold in channel.

【G2560.5】Cycle start: set cycle start in channel.

【G2560.6】Dry run: set to dry run in channel.

【G2560.7】Mearsure interruption flag. When this flag is set to 1, system


interrupts ongoing G31 instruction. It is used with G2582.

【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.

【G2560.11】Emergency stop flag. This flag is set for emergency stop of


machine.

【G2560.12】Flag of channel buffering clear.

【G2560.13】This flag is set for resetting machine.

【G2560.14】Flag of channel data recovery.

【G2560.15】Channle data save.

【G2561.0】Flag of interpreter startup.

【G2561.1】Flag of the second step of program rerun.

【G2561.2】Flag of skipping block. When this flag is set to 1, system skips


block.

【G2561.3】Selection stop flag. When this flag is set to 1, system performs

159
HNC-8-PLC Component specification 5. Status word and control word programming

selection stop.

【G2561.4】Flag of interpreter reset.

【G2561.5】Flag of program rerun.

【G2561.6】Flag of MDI resetting to program header

【G2561.7】Flag of interpreter data recovery.

【G2561.8】Flag of interpreter data save.

【G2561.9】Exact-stop check.

【G2561.10】Flag of user motion control.

【G2561.11】Flag of external interruption.

【G2561.12】Turn on handwheel interruption.

【G2561.14】Flag of program modification.

【G2561.15】Coordinate of workpiece or tool changes, require to re-explain.

【G2562.0】S instruction response word of No.1 spindle.

【G2562.1】S instruction response word of No.2 spindle.

【G2562.2】S instruction response word of No.3 spindle.

【G2562.3】S instruction response word of No.4 spindle.

【G2562.8】Feed direction of trial cut by handwheel. 0 is moving forward, 1 is


retracting.

【G2562.10】Spindle speed check.

【G2560.10】Flag of panel reset. PLC discovers whether system is resetting by


detecting this flag.

【G2560.11】Emergency stop, to set channel of emergency stop.

【G2562.11】MST lock.

【G2562.12】Spindle is not started.

【G2562.13】Spindle speed doesn’t reach.

【G2562.14】Following start.

【G2562.15】Trial cut by handwheel. Use handwheel rate.

【G2563】T instruction.

【G2564】Feedrate override.

【G2565】Rapid traverse override.

160
HNC-8-PLC Component specification 5. Status word and control word programming

【G2566/67/68/69】Spindle overrise. Overrise of four spindles in channel.

【G2570/71/72/73/74/75/76/77】Spindle output instruction, output instructions


of four spindles in channel. After obtaining spindle rotation speed
(F2570-F2577), PLC calculates spindle override, and outputs spindle instruction.
In servo spindle, the output is spindle rotation, and in converter spindle, the
output is DA value.

【G2578】F2578.1 imaginery axis control.

【G2579】Machined-part counts

161
HNC-8-PLC Component specification 5. Status word and control word programming

【G2580/81】Mask in protected area.

【G2582】G31 number. When G31 execution is interrupted, the number of


interrupted G31.

【G2584/85/86/87】User bit input

【G2588~2607】User value input.

【G2608~2615】M code response of channel. When PLC is not executing M


code, set to -1; when PLC is executing M code, set to -2; when PLC has
executed M code, set to the currently executed M code.

【G2616】T code response of channel. When PLC has executed T code, set to
the currently executed T code; otherwise, set to -1.

【G2617】Tangent following of tool.

【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

【G2636.4】No channel reset【Reset button is invalid】

【G2636.5】Life timing/counting pause.

【G2560.15】Channel data save

【G2561.0】Interpreter start.

【G2637】Subprogram calling start.

【G2638】Counting of tool changing.

【G2970】Flag of system activity channel.

【G2978】System activity control channel

【G2980~2989】Control word of handwheel【previous axis selection】

【G2990~2999】Display output of handwheel.

【G3010~3025】External alarm of PLC (External alarm of PLC, and 8*32=256


external alarms exist concurrently).

【G3040~3055】External event of PLC (external event of PLC, and 8*32=256


external events exist concurrently).

【G3056~3070】External reminder of PLC (external reminder of PLC, and


8*32=256 external events exist concurrently).

【G3080~3099】Temperature sensor value.

163
HNC-8-PLC Component specification 5. Status word and control word programming

Example of Status Word and Control Word


Programming

Work Pattern Setting


Example

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

Work Pattern Getting


Example

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

Control of Feed Axis and Spindle


Example

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

Incremental Rate Override


Example

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

Cycle Start and Feed Hold


Example

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

Extension Function Module


This chapter includes:

6.1 NC Function

6.2 Functional Unit of Axis

6.3 System Function

170
HNC-8-PLC Component specification 6. Extended function module

NC Function

Channel Mode Setting MDST


Format 

 
 
 
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

Channel Mode Getting MDGT


Format 
<Address 1>
 
MDGT
 
<Address 2>
 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 
<Addres
  INT  Constant  Channel No.  Pre  ○ 
s 1>   
  <Addres Constant, F, G, R,  Work  mode  Post  × 
INT 
s 2>    W, D, P, B  value 
 

Function  To get the work mode value of the current channel.

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  × 
 

Function To get MDI mode of the channel.

Parameter Parameter 1: channel No.

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

Locking Channel MST


Format
MST <Address 1>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
Pre  √ 
<Addres
INT  Constant  Channel No. 
s 1>    Post  × 

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 Start CYCLE


Format 

 
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

Emergency Stop STOP


Format 
STOP <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 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

Descripti When X2.4 is turned on, the channel 0 is set to reset.


on 

179
HNC-8-PLC Component specification 6. Extended function module

Channel Exchange CHANSW


Format
CHAN
<Address 1>
SW

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
Set  the  Pre  √ 
<Addres
INT  Constant  channel  of 
s 1>    Post  × 
feedhold 

Function  Parameter Set the channel which needs to be exchanged by parameter, and
enable the channel exchange via ACT signal.

Example

Ladder 
Diagram 

Stateme LD    X36.4 


nt List  CHANSW    0 

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

Feed Hold Start HOLD


Format
HOLD <Address 1>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
Set  the  Pre  √ 
<Addres
INT  Constant  channel  of 
s 1>    Post  × 
feedhold 

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

Cycle Start LED CYCLED


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
To  get  eh 
Pre  ○ 
channel 
<Addres
INT  Constant  which 
s 1>   
needs  cycle  Post  × 
start. 

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

Feed Hold LED HOLDLED


Format 

 
 
 
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 

Stateme LDP X31.4


nt List  ESCBLK 0 1

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

Rapid Override RPOVRD


Format 
<Address 1>
 
RP
  OVRD
<Address 2>
 
 
 
Paramet Parameter  Data  Properti
Storage area  Explanation 
  er  form  type  es 

  <Addres
INT  Constant  Channel No. 
s 1>   
  Pre  ○ 

  <Addres Constant, X, Y, F,  Override  Post  × 


INT 
s 2>    G, R, W, D, P, B  value 

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

Descripti Set the rapid override of the channel 0 by the value of R7


on 

186
HNC-8-PLC Component specification 6. Extended function module

Feedrate Override FEEDOVRD


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<Addres
INT  Constant  Channel No. 
s 1>   
Pre  ○ 

<Addres Constant, X, Y, F,  Override  Post  × 


INT 
s 2>    G, R, W, D, P, B  value 

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.

Supplemen The override value cannot be changed at the thread-cutting time.


tary note 

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

Spindle Override SPDLOVRD


Format 

 
 
 
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  × 

  <Addres Constant, X, Y, F,  Override 


INT 
s 3>    G, R, W, D, P, B  value 
 

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.

Supplemen The override value cannot be changed at the thread-cutting time.


tary note 

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

Incremental (Stepping) Rate STEPMUL


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<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

Block Skip SKIP


Format 

  SKIP <Address 1>

 
 
 
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 Input USERIN


Format 
<Address 1>

  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 2: not available at present

  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

User Output USEROUT


Format 

 
 
 
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 2: not available at present.

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

Selection Stop SELSTOP


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

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.

Parameter Parameter 1: channel No.

Example

Ladder 
Diagram 

Stateme SELSTOP 0
nt List 

Descripti When Y32.2 is turned on, the selection stop of channel 0 is


on  effective.

196
HNC-8-PLC Component specification 6. Extended function module

Vector Tool Direction Setting TOOLSET


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

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 

Descripti When Y32.2 is turned on, the tool orientation of channel 0 is


on  effective.

197
HNC-8-PLC Component specification 6. Extended function module

Vector Tool Direction Clear TOOLCLR


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

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 

Descripti The tool direction of channel 0 is set to be invalid.


on 

198
HNC-8-PLC Component specification 6. Extended function module

8-bit Nixie Tube NIXIE


Format

Paramet Parameter  Data  Storage  Properti


Explanation 
er  form  type  area  es 
Constan
The  number  to  be 
<Addres t, X, Y, F, 
INT  shown by the digital  Pre  √ 
s 1>    G,  R,  W, 
tube 
D, P, B 

”0”  indicates  single 


<Addres Constan byte,  and  “1” 
INT 
s 2>    t    indicates 
double‐byte.  Post  √ 

<Addres Y,  R,  W,  Set  the  8‐bit  digital 


BOOL
s 3>    D, B  tube on the panel 

Function The 8-bit digital tube on the panel displays the number of the current tool.

Example

Ladder 
Diagram

Stateme NIXIE R23 0 Y37


nt List 

199
HNC-8-PLC Component specification 6. Extended function module

Descripti The tool number in R23 is displayed to the digital tube.


on 

200
HNC-8-PLC Component specification 6. Extended function module

Tool Display TOOLUSE


Format
<Address 1>
TOOL
USE
<Address 2>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Constant, X, Y, F, 
INT  Pre  ○ 
s 1>    G, R, W, D, P, B 
 
<Addres Constant, X, Y, F, 
INT  Post  × 
s 2>    G, R, W, D, P, B 

Function Display the tool number in the currently executed T code to the interface of
CNC.

Parameter Parameter 1: channel number

Parameter: tool number

Example

Ladder 
Diagram 

Stateme TOOLUSE 0 R23


nt List 

Descripti The tool number of channel 0 is displayed on the interface.


on 

201
HNC-8-PLC Component specification 6. Extended function module

Functional Unit of Axis

Spindle JOG SPDLJOG


Format
<Address 1>
SPDL
JOG
<Address 2>

Paramete Parameter  Data  Properti


Storage area  Explanation 
r  form  type  es 
<Address
INT  Constant  Pre  ○ 
1>   
 
<Address X,  Y,  F,  G,  R,  W, 
BOOL Post  × 
2>    D, P, B 

Function Control spindle manually.

Parameter Parameter 1: spindle number

Parameter 2:signal of rotation direction;

Example

Ladder 
Diagram 

Stateme SPDLJOG 0 X32.4


nt List 

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

Spindle Control【Servo Spindle】SPDLBUS


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres
INT  Constant  Pre  ○ 
s 1>   
 
<Addres
INT  Constant  Post  × 
s 2>   

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.

Parameter Parameter 1: channel number

Parameter 2: spindle number

Example

Ladder 
Diagram 

Stateme SPDLBUS 0 1
nt List 

Descripti When X31.4 is effective, the No.1 spindle of channel 0 is


on  controlled.

203
HNC-8-PLC Component specification 6. Extended function module

Spindle Control with Gear【Servo Spindle】SPDLBUS1


Format

<Address 1>

<Address 2>
SPDL
BUS1
<Address 3>

<Address 4>

Paramete Parameter  Data  Properti


Storage area  Explanation
r  form  type  es 
<Address
INT  Constant  Pre  ○ 
1>   
<Address
INT  Constant 
2>   
<Address Constant, Y, G, R,   
INT 
3>    W, D, B 
 

<Address
INT  P 
4>   

Function Bus spindle control with gear.

Parameter

Parameter 1: channel number.

Parameter 2: spindle number.

Parameter 3: gear register, with gear starting with 1.

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 

When X31.4 is effective, the current gear for No. 1 spindle


Descripti override of channel 0 is in R1 register. Control parameter is in
on  user paramters from P2. Refer to the Parameter manual for filling
in parameters, according to the actual condition of machine.

206
HNC-8-PLC Component specification 6. Extended function module

Spindle Orientation Enable SPDLORI


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Axis  Pre  ○ 
INT  Constant 
s 1>    number  Post  × 

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 

Descripti The spindle orientation for No.0 spindle.


on 

207
HNC-8-PLC Component specification 6. Extended function module

Completing Spindle Orientation SPDLOROK


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  ○ 
INT  Constant   
s 1>    Post  √ 

Function orientation is complete, which indicates that the spindle has been at the specified
orientation angle.
The spindle

Parameter Parameter 1:轴号。Parameter 1: axis number

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

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres
INT  Constant  Pre  ○ 
s 1>   
<Addres
INT  Constant 
s 2>   
<Addres Constant, Y, G, R, 
INT   
s 3>    W, D, B 
Post  × 
<Addres
BOOL Y, G, R, W, D, B 
s 4>   
<Addres
BOOL P 
s 5>   

Function DA control of spindle. It is used to control the analog spindle.

Parameter Parameter 1: channel number

Parameter 2: spindle number

Parameter 3: gear register(gear starts from 1)

Parameter 4:invalid

Parameter 5:reference of spindle control value includes:

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 

Channel 1. The current gear for spindle 0 of channel 1 is in R1


Descripti
register. The reference value of spindle control is in R2. Control
on 
parameter is in P5.

210
HNC-8-PLC Component specification 6. Extended function module

Zero Speed Detection for Spindle SPDLZERO


Format
SPDL
<Address 1>
ZERO

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

Pre  ○ 
<Addres
INT  Constant   
s 1>   
Post  × 

Function Zero speed detection for spindle.

Parameter Parameter 1: axis number

Example

Ladder 
Diagram 

Stateme SPDLZERO 1
nt List 

Descripti Zero speed detection for the No.1 spindle.


on 

211
HNC-8-PLC Component specification 6. Extended function module

Spindle Speed Arrival SPDLRCH


Format
SPDL
<Address 1>
RCH

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

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 

Descripti Speed arrival for the No.1 spindle.


on 

212
HNC-8-PLC Component specification 6. Extended function module

Driven Axis Home SUBAXEN


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

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.

Parameter Parameter 1: Driven-axis number

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

Release Driven Axis DESYN


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

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 

Descripti When X32.6 is valid, the No.0 driven axis is released.


on 

214
HNC-8-PLC Component specification 6. Extended function module

Axis Jog JOGSW


Format
<Address 1>
JOG
SW
<Address 2>

Paramete Parameter  Data  Properti


Storage area  Explanation 
r  form  type  es 
<Address Constant, X, Y, F, 
INT    Pre  ○ 
1>    G, R, W, D, P, B 
<Address X,  Y,  F,  G,  R,  W, 
BOOL   Post  × 
2>    D, P, B 

Function Enable axis jog by manual.

Parameter Parameter 1: axis number

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 

Stateme JOGSW 0 X32.3


nt List 

When X32.3 is turned on, axis 0 is enabled to move manually in


Descripti
positive direction; when X32.3 is not turned on, axis 0 is enabled
on 
to move manually in negative direction.

215
HNC-8-PLC Component specification 6. Extended function module

Axis Stepping STEPAXIS


Format
<Address 1>
STEP
AXIS
<Address 2>

Paramete Parameter  Data  Properti


Storage area  Explanation 
r  form  type  es 
<Address Constant, X, Y, F, 
INT    Pre  ○ 
1>    G, R, W, D, P, B 
<Address X,  Y,  F,  G,  R,  W, 
BOOL   Post  × 
2>    D, P, B 

Function Enable axis by stepping.

Parameter Parameter 1: axis number.

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 

Stateme STEPAXIS 0 X32.3


nt List 

When X32.3 is turned on, axis 0 is enabled to jog in negative


Descripti
direction; when X32.3 is not turned on, axis 0 is enabled to jog in
on 
positive direction.

216
HNC-8-PLC Component specification 6. Extended function module

Jog Velocity JOGVEL


Format
<Address 1>
JOG
VEL
<Address 2>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Constant, X, Y, F, 
INT    Pre  √ 
s 1>    G, R, W, D, P, B 
<Addres Constant, X, Y, F, 
INT    Post  × 
s 2>    G, R, W, D, P, B 

Function Manually control the jog speed.

Parameter Parameter 1: axis number

Parameter 2: axis speed, and its value can be as below:

1: og speed of parameter

2: apid traverse speed of parameter

>2: speed (pulse/circle)

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

Home Run HOMRUN


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

Function To start to return home.

Parameter Parameter 1: axis number

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

Home Run 1 HOMERUN1


Format

Paramete Parameter  Data  Properti


Storage area  Explanation 
r  form  type  es 

<Address
INT  Constant    Pre  √ 
1>   

<Address X,  Y,  F,  G,  R,  W, 


BOOL   Post  × 
2>    D, P, B 

Function To start to return home.

Parameter Parameter 1: axis number

Parameter 2: the direction where the axis returns home.

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

Home Approaching Switch HOMESW


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

Function The axis meets the home block.

Parameter Parameter 1: axis number

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

Home Completing HOMLED


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  √ 

Function Returning home is complete.

Parameter Parameter 1: axis number.

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

Axis Enable AXEN


Format
AX
<Address 1>
EN

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

Function Axis enable.

Parameter Parameter 1: axis number, can be constant and register.

Example

Ladder 
Diagram 

Stateme AXEN 1
nt List 

Descripti When X0.1 is turned on, axis 1 is enabled.


on 

222
HNC-8-PLC Component specification 6. Extended function module

Axis Ready (Bust) AXRDY


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  × 
INT  Constant     
s 1>    Post  √ 

Function The axis is ready.

Parameter Parameter 1: axis number.

Example

Ladder 
Diagram 

Stateme AXRDY 1
nt List 

Descripti When the axis 1 has been ready, R10.1 is set to 1.


on 

223
HNC-8-PLC Component specification 6. Extended function module

Axis Lock AXISLOCK


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

Function The axis is locked.

Parameter Parameter 1: axis number.

Example

Ladder 
Diagram 

Stateme AXISLOCK 2
nt List 

Descripti When X2.0 is turned on, the axis 2 is locked.


on 

224
HNC-8-PLC Component specification 6. Extended function module

Relative PMC Axis Movement AXISMOVE


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Constant, X, Y, F, 
INT    Pre  √ 
s 1>    G, R, W, D, P, B 
<Addres Constant, X, Y, F, 
INT    Post  × 
s 2>    G, R, W, D, P, B 

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.

Parameter Parameter 1: axis number

Parameter 2: axis movement (unit: 1/1000mm, or 1/1000 degree).

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

Absolute PMC Axis Movement AXISMVTO


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Constant, X, Y, F, 
INT    Pre  √ 
s 1>    G, R, W, D, P, B 
<Addres Constant, X, Y, F, 
INT    Post  × 
s 2>    G, R, W, D, P, B 

Function This instruction is used to move the PMC axis to an absolute position.

Parameter Parameter 1: axis number

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

The Second Soft Limit of Axis AXLMF2


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<Addres Constant, X, Y, F,  Pre  √ 


INT   
s 1>    G, R, W, D, P, B  Post  × 

Function The second soft limit of the axis.

Parameter Parameter 1: axis number.

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

Block Switch in Positive Limit Direction AXISPLMT


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<Addres Pre  √ 
INT  Constant     
s 1>   
Post  × 

Function The positive limit direction of the axis.

Parameter Parameter 1: axis number.

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

Block Switch in Negative Limit Direction AXISNLMT


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<Addres Pre  √ 
INT  Constant   
s 1>   
Post  × 

Function The negative limit direction of the axis.

Parameter Parameter 1: axis number.

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>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres
INT  Constant    Pre  √ 
s 1>   
<Addres Constant, X, Y, F, 
INT   
s 2>    G, R, W, D, P, B 
Post  × 
<Addres Constant, X, Y, F, 
INT   
s 3>    G, R, W, D, P, B 

Function To set handwheel.

Parameter Parameter 1: handwheel number.

Parameter 2: axis number.

Parameter 3: override value.

Example

Ladder 
Diagram 

Stateme MPGSET 1 R6 R7
nt List 

Handwheel 1 gets its incremental value. The axis number selected


Descripti
by the handwheel 1 is stored in R6. Override value of the
on 
handwheel 1 is stored in R7.

230
HNC-8-PLC Component specification 6. Extended function module

Servo Enable (Bus) SVSW


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 

<Addres Pre  ○ 
INT  Constant   
s 1>   
Post  × 

Function Servo enable.

Parameter Parameter 1: axis number.

Example

Ladder 
Diagram 

Stateme SVSW 1
nt List 

Descripti Servo enable of the axis 1.


on 

231
HNC-8-PLC Component specification 6. Extended function module

Axis Mode AXISMODE


Format
<Address 1>
AXIS
MODE
<Address 2>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres
INT  Constant      Pre  ○ 
s 1>   
<Addres
INT  Constant      Post  × 
s 2>   

Function To select the working mode of the axis.

Parameter Parameter 1: axis number.

Parameter 2: “0” is position, “1” is speed, and “2” is torque.

Example

Ladder 
Diagram 

Stateme AXISMODE 1 1
nt List 

Descripti The working mode of axis 1 is set to the speed mode.


on 

232
HNC-8-PLC Component specification 6. Extended function module

Axis Reference REFPT


Format
<Address 1>

REFPT
<Address 2>

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres
INT  Constant    Pre  ○ 
s 1>   
<Addres
INT  Constant    Post  √ 
s 2>   

Function To confirm the axis reference.

Parameter Parameter 1: axis number.

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

During Axis Home AXISHOM2


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Axis  Pre  ○ 
INT  Constant 
s 1>    number  Post  ○ 

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

During Axis Moving AXMOVING


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Axis  Pre  ○ 
INT  Constant 
s 1>    number  Post  ○ 

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

Paramete Parameter  Data  Properti


Storage area  Explanation 
r  form  type  es 
<Address
INT  Constant    Pre  ○ 
1>   
<Address  X,  Y,  F,  G,  R,  W, 
INT   
2>    D, P, B 
<Address  X,  Y,  F,  G,  R,  W, 
INT    Post  √ 
3>    D, P, B 
<Address  X,  Y,  F,  G,  R,  W, 
INT   
4>    D, P, B 

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.

Parameter Input 1: enable on/off

Input 2: starting number. If the number is 0, the position number of rotational


equipment starts from 0; if the number is 1, the position number of rotational
equipment starts from 1.

Input 3: Whether to select a cutter nearby. If it is 0, the cutter will be selected in


the clockwise direction; if it is 1, the cutter will be selected nearby.

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.

Parameter 1: maximum quantity of cutter rests.

Parameter 2: address of current position.

Parameter 2: address of target position

Parameter 4: address of count result. The meaning of count result is determined


by input 4 and input 5.
Input 5:

Example

Ladder 
Diagram 

Stateme ROT 16 B0 R27 R59


nt List 

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

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  ○ 
INT  Constant   
s 1>    Post  × 

Function To generate alarm.

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 

Descripti When X3.4 is turned on, the alarm 3 is generated.


on 

238
HNC-8-PLC Component specification 6. Extended function module

Event EVENT
Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant   
s 1>    Post  × 

Function To create the event object.

Parameter Parameter 1: event number.

Example

Ladder 
Diagram 

Stateme EVENT 122


nt List 

Descripti When 30.4 is turned on, the event 122 is generated.


on 

239
HNC-8-PLC Component specification 6. Extended function module

Save Data SAVEDATA


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
Pre  √ 
None         
Post  × 

Function To save all data.

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

Reset Setting Ouput RSTCHK


Format

Paramet Parameter  Data  Properti


Storage area  Explanation 
er  form  type  es 
<Addres Pre  √ 
INT  Constant  Channel No. 
s 1>    Post  √ 

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 

Descripti The output of setting reset is 1


on 

241
HNC-8-PLC Component specification 6. Extended function module

Reset Clear RSTCLR


Format Paramet Parameter  Data  Properti
Storage area  Explanation 
er  form  type  es 
Use  it  Pre  √ 
<Addres together 
INT  Constant 
s 1>    with  Post  × 
RSTCHK. 

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.

Parameter Channel number.

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

Operational Monitoring and Online


Modification for Ladder Diagram
The function of operational monitoring and online modification for the ladder
diagram, which is provided by PLC edit function, will monitor changes in the
status of each component in the ladder diagram, and force a modification of a
component status to achieve the goals of debugging.

Press “Ladder diagram monitoring” on the diagnosis interface, to access the


ladder diagram interface, as seen above. The buttons on this interface include
Ladder diagram diagnosis, Search, Change, Command, Load, Discard, Save
and Return.

The next sections offer more details.

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.

Search: type the component name to search the component.

Change: perform component modification operations.

Command: can edit the ladder diagram.

Load: load the current information on the ladder diagram.

Discard: undo the edits of ladder diagram.

Save: save the edits of ladder diagram.

Return: return to the previous action.

244
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram

Online Diagnosis for Ladder Diagram


Press Ladder diagram diagnosis button to access the corresponding interface, as
seen in below figure. There are 6 buttons on this interface: Inhibit, Enable,
Redo, Decimal, Hexadecimal, and Return.

Press “Diagnosis→Ladder diagram monitoring→Ladder diagram diagnosis”, to


view the value of each variable. User can move the cursor up and down to view
variables. As seen above, the component turning green indicates that this
component is turned on or is valid, then user can use operations on the
component, such as inhibit, enable, redo and the like.

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 found component is covered by blue curser. If you want to continue to


search, press “Continue”, then the next one can be found.

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.

Straight line: insert a straight line

Vertical line: insert a vertical line

Delete vertical line: Delete a vertical line

Delete component: delete a component

Normal open: insert a normal-open contact

Normal closed: insert a normal-closed contact

Logical output: insert an output

Inverted output: insert an inverted output

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

Insert Straight Line


Press the functional button of “Straight Line” to insert a straight line in the
ladder diagram, see as below:

Insert Vertical Line


Press the functional button of “Vertical line” to insert a vertical line after the
cursor, as shown in the figure below:

252
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram

Delete Vertical Line


Press the functional button of “Delete Vertical Line” to delete the vertical line
after the cursor, as demonstrated below:

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.

¾ Before the deletion

253
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram

¾ After the deletion

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.

Press functional module button again to return to the interface of operation


modification.

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.

Select: select the cursor line

Delete: delete the cursor line

Move: move the selected component

Copy: copy the selected component

Paste: paste the selected component

Insert row: insert a line before the cursor line

Add row: insert a line after the cursor line

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.

¾ Before the deletion

259
HNC-8-PLC Programming specification 7. Operation monitoring and online modification of ladder diagram

¾ After the deletion

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

Instruction on PLC Development


Environment
This chapter includes:

7.1 Overview

7.2 Installation of Development Environment

7.3 Development Environment Interface

7.4 Development Environment Operation

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

Installation of Development Environment


Using the example of installing from CD on Chinese Windows XP, this section
explains how to install the ladder diagram development environment.

(1) Boot into Chinese WindowsXP.

(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

(8) After the installation is complete, the installation complete interface


appears.

275
HNC-8-PLC Programming specification 8 . PLC Development environment description

Development Environment Interface


Development Environment of ladder diagram is divided into four parts: menu,
ladder diagram, statement list, and symbol table.

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.

New This item is for creating a new project.


Open This item is to open an existing dft file.
Save This item is for saving files of current window as dft files.
Save as The function of this item likes “save ladder diagram” item,
which is to save open files, and the difference is that this
item is to save the open files with new names.
Close This item is for closing current ladder diagram interface.
Load dit file This item is for opening existing dit files.
Print This item is for printing current window contents.
Print preview This item is for previewing print effect.
Print setup Parameter This item is to set printing parameters.
Exit When you select this item, the program exits.

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.

Cut Cut string and element.


Copy Copy string and element
Paste Paste string and element
Insert row Insert a row at the current cursor location
Delete row Delete the row which the current cursor locates.

View

“View” menu is to control the subwindow displaying in the main window.

Ladder To open (close) ladder diagram view.


diagram
Statement list To open (close) statement list view.
Symbol list To open (close) symbol list view.
Primitive tree To open (close) primitive tree view on the left.
Message box To open (close) message box at the bottom.
Toolbar To open (close) toolbar.
Status bar To open (close) status bar.

Tool

The function of “Tool” menu is to find/replace.

Search To search the specified string.


Search next To continue to search the specified string.
Replace To replace the specified string.

Window

“Window” menu is used to open each window.

Overlap To arrange subwindows in overlap.


Tile To arrange subwindows in tiling.
REG To display symbol list window.
STL To display statement list window.
LADDER To display ladder diagram window.

277
HNC-8-PLC Programming specification 8 . PLC Development environment description

Help

About NEWPLC: to display the software version.

278
HNC-8-PLC Programming specification 8 . PLC Development environment description

Ladder Diagram Interface


Four parts including toolbar, primitive tree, edit window, and message box are in
the ladder diagram window.

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.

Statement List Interface


Toolbar and edit window are in the statement list interface.

Toolbar

An action tool is in the statement list interface.

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

Symbol List Interface


Symbol names and comments of relevant addresses can be defined in symbol list
interface.

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.

z Number: automatically generate the number of the current symbol name in


all the symbol names.

z Address: the specified address.

z Symbol name: the symbol name corresponding to the specified address.

z Comments: the comments corresponding to the specified address.

282
HNC-8-PLC Programming specification 8 . PLC Development environment description

Development Environment Operation


Before editing PLC, first define the symbol name for the address to be used, and
annotate the address, then edit PLC in the way of ladder diagram or statement
list.

Symbol List Operation


Symbol list is used to define the symbol name for the specified address, and
annotate the address.

Add Symbol List

Here in X10.0 (the positive limt direction of X axis) as an example to introduce.

X10.0 is in X register. Select X register in the selection box of register. X10.0 is


in X000-X0049.

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.

Type “positive X limit”, and hit Enter button.

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.

Delete Symbol List

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

Ladder Diagram Operation

The ladder diagram is composed of rows which themselves have up to 10 cells.

插入元件 Inserting Component

Inserting components can be separated into two types: inserting basic


components and inserting functional components.

¾ Inserting basic components

(1) When you want to insert basic component, first select a position on the
ladder diagram.

(2) Click the basic component to be inserted on the toolbar.

(3) Then the component is inserted in the ladder diagram.

¾ Inserting functional components

(1) Select the functional components needed from the primitive tree.

287
HNC-8-PLC Programming specification 8 . PLC Development environment description

Or select it from the selection box of component on the toolbar.

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)

Hit Delete button to delete the selected area.

Cutting, Copying and Pasting Component

First select a component in the ladder diagram.

Then choose “Cut” or “Copy” in the “Edit” menu. Or right-click the component
to be cut or copied, and select “Cut” or “Copy”.

¾ The first way

¾ The second way

290
HNC-8-PLC Programming specification 8 . PLC Development environment description

At last, paste the component on other locations.

Cutting, Copying and Pasting Multi‐row

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”.

The third step: select somewhere on the ladder diagram.

291
HNC-8-PLC Programming specification 8 . PLC Development environment description

The forth step: Click “Paste”

Insert Row

A row can be inserted before the position selected in the ladder diagram.

Delete Row

Can delete a row selected in the diagram.

292
HNC-8-PLC Programming specification 8 . PLC Development environment description

Undo

Using this button in the toolbar to undo the previous operations

Redo

Select this button on the toolbar to recover the undone operations.

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.

Statement List Operation

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.

Cut, Copy and Paste

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

X482 —X x1 x10 x100 x1000 Lamp

Protectiv Fast Spindle Lubricatio Spindle


X483 —Z +Z Cooling
e door forward Jog n upshift
Chip Chip
Spindle Spindle Spindle
X484 removal removal +X
CW stop CCW
CW CCW
Spindle
Overtrave
X485 downshif
l release
t
Cycle
X486 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

296
HNC-8-PLC Programming specification appendix

¾ Panel of 818A milling machine

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

¾ Panel of 818B lathe

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

¾ Panel of 818B milling machine

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

You might also like