0% found this document useful (0 votes)
11 views148 pages

PLC英文版

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 148

The so- called sequential program refers to the program for logic control

of machine tools and related equipment. After the program is converted


into a certain format, the CPU can decode and process it, and store the
results in RAM. The CPU reads each code stored in the memory at high
speed and executes the program through arithmetic operation. The
compilation of sequence program starts from the compilation of ladder
diagram.
After the control object is determined and the corresponding
input/output signal points are calculated, the interface can be
allocated. When assigning interfaces, please refer to the I/O
interface signal table in the relevant instructions.

Through ladder diagram online editing, the control action


required by the machine tool is represented by ladder diagram.
Timer, counter and other functions that cannot be represented
by relay symbols shall be represented by designated function
code symbols.
The edited ladder diagram needs to be saved, and it needs to
be converted into the corresponding PLC code, that is, the
instruction list, before running.

Debug the sequence program as follows:


1) Debugging with simulator
Replace the machine tool with a simulator (consisting of lights
and switches). Switch on and off are used to indicate the input
signal status of the machine tool, and light on and off are used
to indicate the output signal status.
2) Through actual operation debugging
Chapter 2 Sequence Procedure
Because PLC sequence control is realized by online graphic editing, its
working principle is different from that of the general relay circuit.
Therefore, the principle of sequence control should be fully understood
when designing PLC sequence program.

2.1 Execution process of sequence program


In the general relay control circuit, all relays can act simultaneously in
time. In the example below, when relay A acts, relays D and E can act
simultaneously (when contacts B and C are closed). In PLC sequence
control, each relay acts in turn. When relay A acts, relay D acts first, and
then relay E acts (see the figure below). That is, each relay acts
according to the sequence (editing sequence) in the ladder diagram.

Figure 2.1 (a) Circuit Example


Figure 2.1 (b) and (c) below show the difference between relay circuit and
PLC program action.

Figure 2.1 (b)

Figure 2.1 (c)

(1) Relay circuit


The actions in Figure 2.1 (b) and (c) are the same. After A is switched on, B
and C are switched on. C turns ON and B turns OFF.
(2) PLC program
In Figure 2.1 (b), like the relay circuit, after A is turned on, B and C are turned on.
B is disconnected after one cycle of the PLC program. In Figure 2.1 (c), after A
is switched on, C is switched on, but B is not switched on.

2.2 Cycle execution


The PLC executes from the beginning of the ladder to the end of the
ladder. After the ladder ends, the execution starts again from the
beginning of the ladder. This is called loop execution. The execution time
from the beginning to the end of the ladder is called the cycle processing
cycle for short. The shorter the processing period, the stronger the
response ability of the signal.
2.3 Priority of implementation (first level, second level)
The PLC program is divided into two parts: the first level program and the
second level program. They are inconsistent in the execution cycle. The
first level program is executed once every 8ms. It can process some short
pulse signals requiring fast response.
The second level program is executed once every 8 * nms. N is the
number of divisions of the second level program. When starting to
execute the second level program, the PLC will divide the second level
program into N copies. Only one copy is executed for each 8ms.

First level procedure Specifies the end of the first


segment of the program

Division 1

Division 2

Second level program

Division N

Specifies the end of


the second segment

The PLC is executed separately in the PLC-ARM7. The 1ms of each 8ms
is the communication time for CNC to read and write PLC data. The 5ms is
the communication time for PLC to obtain system control signals (F, X),
upload control result data (G, Y parameters) and external port I/O (X, Y).
The PLC is executing ladder diagram operation at other times except for
interrupt response exchange data.
The first level
The second level
Division 1 Division 2 Division N

After the execution of the second level program with the final split number
of n, the program starts from the beginning again. Thus, when the number
of partitions is n, the execution time of a cycle is 8 * n ms. The first level
program is executed once every 8ms, and the second level program is
executed once every 8 * n ms. If the number of steps of the first level
program increases, the number of steps executed by the second level
program will be correspondingly reduced within 8ms, so the number of
partitions will become more and the processing time of the whole program
will become longer. Therefore, the first level procedure should be as short
as possible.

2.4 Sequence program structure


In traditional PLC, ladder diagram is programmed in sequence. In the
ladder diagram language that allows structured programming, it has the
following advantages:
1. The program is easy to understand and prepare.
2. It is easier to find programming errors. When running errors occur, it is
easy to find out the cause.
There are three main structured programming methods:
1) The subprogram subprogram takes the ladder diagram as the
processing unit.

Task A

Task B

2) Nesting
The subprogram can call other subprograms to complete the task.

main program A subroutine 1 A subroutine 2

Task A Task A1 Task A11

Task A12
Task B
Task An
3) Conditional branching
The main program executes circularly and checks whether the conditions
are met. If the conditions are met, execute the corresponding
subprogram. If the conditions are not met, the corresponding subprogram
will not be executed.
main program A subroutine 1
Task A Processing 1 Processing 11

Processing A12
Task B
Processing 2

Processing A12

2.5 Input/output signal processing


The processing of input and output signals is shown in Figure 2-5-1. The
X signal at the machine tool I/O end and the F signal of NC are
respectively input to the machine tool side input memory and the NC side
input memory of the PLC, which are directly used by the first level
program; They are respectively input to the synchronous input memory on
the machine tool side and the synchronous input memory on the NC side,
and are adopted by the second level program. The output signals of the
first level program and the second level program are respectively output
to the NC side output memory and the machine tool side output memory,
and then output to the NC and machine tool I/O terminals.

NC side input memory


NC side output memory
First level procedure

Machine side input memory


Machine tool Machine side output memory

NC side synchronous input memory Second level program


Machine side synchronous input memory

2.5.1 Input signal processing


(1) Input signals adopted in the first-level program:
The input memory on the NC side scans and stores F signals from the NC
every 8ms, and directly references the status of these signals when
executing the first level program. The input memory at the machine tool
side scans and stores the input signal X from the machine tool side every
8ms, and directly references these signals when executing the first level
program.
(2) Input signals used in the second level program:
The input signal in the second level program of PLC is the input signal in
the first level program that has been latched. The first level program
directly uses the F signal and X signal, so the input signal in the second
level program lags behind the input signal in the first level program, and
can lag the execution cycle of the second level program by a maximum of
one.
(3) The difference between the input signal status of the first level
program and the second level program:
In the process of PLC reading the input signal, even if it is the same input
signal, the status in the first level program and the second level program
may be different, because when PLC executes, the first level program
reads the NC side input memory and the machine side input memory,
while the second level program reads the NC side synchronous input
memory and the machine side synchronous input memory, The input
signal in the second level program lags behind the input signal in the first
level program by up to 8 nms (the execution cycle of a second level
program). This should be noted when programming.
2.5.2 Processing of output signal
(1) Signal output to NC
The PLC transmits the output signal to the output memory on the NC side
every 8ms, and the output memory on the NC side directly outputs the
signal to the NC.
(2) The signal output to the machine tool PLC directly transmits the output
signal to the output memory on the machine tool side, and the output
memory on the machine tool side outputs the signal to the machine tool
every 8ms.
2.5.3 Difference of signal status in the first level and
second level programs
The same input signal may have different states in the primary and
secondary programs. This is because different input memories are used
in the two levels of programs. That is, the input signal used by the
secondary program is the input signal of the latched primary program.
Therefore, the signal in the second level program lags behind the input
signal in the first level. In the worst case, a secondary program execution
cycle can be delayed.
This should be kept in mind when compiling ladder diagrams.

The second cut of a


secondary procedure
In the first 8ms, if A=1 executes the first level program, B=1. And start to
execute the secondary program to lock A=1 to the secondary program,
and execute the first division of the secondary program.
When the second 8ms, A becomes 0, and the first level program is
executed, then B=0. Then the second division of the secondary program
is executed, but the A state is still the state 1 of the last latch. Therefore,
C=1.
In this way, the states of B and C are different.
2.6 Interlock
In the sequence control, interlocking is very important in terms of safety.
Necessary interlocking must be adopted in the sequence control
program. At the same time, in the relay control circuit of the strong current
cabinet at the machine tool side
Programming chapter 3 PLC address

Chapter 3 Address
The address is used to distinguish signals. Different addresses
correspond to the input/output signals on the machine tool side, the
input/output signals on the CNC side, internal relays, counters, timers,
holding relays and data tables. Each address consists of address number
and tag number. The numbering rules are as follows:
Address numbering rules:
The address number consists of address type, address number and tag
number.

X 000 . 6
Type Address No Tag No

Address type: including X, Y, R, F, G, K, A, D, DC, C, T, DT


Address No.: decimal number, representing a byte.
Bit number: octal number. 0-7 represents 0-7 bits of the byte represented
by the preceding address number.
The address types in the PLC are as follows:

address Address description Address range


Machine →PLC (64 bytes)
PLC → machine tool (48 bytes)
CNC→PLC (64 bytes)
PLC →CNC (64 bytes)
Intermediate relay (512 bytes)
Data register (0~127)
Counter preset value data register
Counter (0~127)
PLC alarm detection
Timer (0~127)
Timer preset value data register
Holding relay (64 bytes)

The INT8U data type is an unsigned 8-bit character type, and the INT16U
data type is an unsigned 16 bit integer type.
3.1 Machine tool → PLC address (X)
The X address of the PLC is divided into two categories:
1. The X address is allocated to the system's CN61 input interface and
CN15 spindle interface (see Appendix 3: Definition of spindle interface), a
total of 36.
2. The X address is assigned to the input key on the MDI panel of the
system.
3.2 PLC → address on machine side (Y)
The Y address of the PLC is divided into two categories:
1. Y address is allocated to the CN62 output interface and CN15 spindle
interface of the system (see Appendix 3: Definition of spindle interface),
totaling 36.
2. The Y address is assigned to each indicator on the MDI panel of the
system.
3.3 Address of PLC → CNC (G)
The address is G0 to G63. Definition type: INT8U, 64 bytes in total. The
meaning of each address signal is shown in Appendix 4: G and F signals.
3.4 Address of CNC → PLC (F)
The address is from F0 to F63. Definition type: INT8U, 64 bytes in total.
The meaning of each address signal is shown in Appendix 4: G and F
signals.
3.5 Internal relay address (R)
This address area is cleared when the system is powered on. R510 and
R511 are occupied by the system.
Definition type: INT8U, 512 bytes in total.

Address no.

R relay area

System program management area:


R510
When the PLC starts or restarts, set the signal of R510.0 address to 1,
which is used to initialize the signal set by the user. Reset R510.0 to 0 after
the first ladder execution.
R511 (system timer)
The following four signals can be used as system timers:
Has been shut off

Have been through

ON shut
200ms cycle signal

ON shut
1s cycle signal

3.6 Holding relay address (K)


This address area is used as a holding relay and to set PLC parameters.
This area is a non-volatile storage area. Even if the system is powered
down, the contents in the memory will not be lost.
Definition type: INT8U, 64 bytes in total.
Address no.

K relay area

3.7 Information display request address (A)


This address area is cleared when the system is powered on.
Definition type: INT8U, 32 bytes in total.
Address no.

3.8 Counter address (C)


This address area is used to store the current count value of the counter.
After the system is powered off, the data is cleared. The definition type is:
128 addresses in total.
3.9 Counter preset value address (DC)
This address area is used to store counter preset values. This area is a
non-volatile storage area. Even if the system is powered down, the
contents in the memory will not be lost.
The definition type is: 128 addresses in total. The DC settings can only be
read but not written.
3.10 Timer address (T)
This address area is used to store the current value of the timer. After the
system is powered off, the data will initially be the preset value. When the
condition is set to 0, the current data is the preset value.
The definition type is: 128 addresses in total.
3.11 Timer preset value address (DT)
This address area is used to store timer preset values. This area is a non-
volatile storage area. Even if the system is powered down, the contents in
the memory will not be lost.
The definition type is: 128 addresses in total. DT settings can only be read
but not written.
3.12 Data sheet address
Even if the system is powered down, the contents of the memory will not be
lost.
The definition type is: 128 addresses in total.
Programming chapter 3 PLC address

3.13 Mark address


Used to specify the jump target label and LBL code label in JMPB code.
Range: 0 ~ 99
3.14 Subprocess No. (P)
It is used to specify the sequence number of the target subprocess called
in the call code and the sequence number of the SP code.
Range: 0 ~ 99
Chapter 4 PLC Basic Code
The design of sequential program starts from the compilation of ladder
diagram. The ladder diagram consists of relay contacts and function codes.
The logical relationship represented in the ladder diagram constitutes a
sequential program. There are two methods to input sequential programs:
one method uses mnemonic language (PLC instruction code of RD, AND, OR,
which is not supported by the system temporarily); Another way to use relay
symbols. Using relay symbols, you can use ladder format and program
without understanding the PLC code format.
In fact, even if the sequence program is input by the relay symbol method, it is
also converted into the corresponding PLC code within the system.
Basic code is the most commonly used code when designing sequential
programs. They perform a bit operation.
The basic instruction code is as follows:

Code name function


Move the contents of the register to the left by 1 bit, and set the
signal status of the specified address to St0
Move the contents of the register to the left by 1 bit, and set the signal
status of the specified address to ST0 after the value is set to none
Output the logical operation result to the specified address

Output the result of logical operation to the specified address


after negation
Logical AND

Logical AND after the specified state is not taken

Logical OR

Take the specified state as non post logical OR


After the logical OR of ST0 and ST1, the stack register is shifted one
bit to the right
After the logical sum of ST0 and ST1, the stack register is shifted one
bit to the right

Code name
Mnemonics and Functions

Mnemonics Functions
Move the contents of the register to the left by 1 bit, and set the signal
status of the specified address to St0
Move the contents of the register to the left by 1 bit, and set the signal
status of the specified address to ST0 after the value is set to none
Output the logical operation result to the specified address

Output the result of logical operation to the specified address


after negation

Code description:
●WRT、WRT. NOT code is the coil driving code for output relay and
internal relay. The input relay cannot be used.
●Parallel WRT commands can be used continuously for many times,
but can not be output in double coils.
Programming chapter 4 PLC basic code

4.2 AND、AND. NOT code


Mnemonics and Functions

Mnemonics Functions
Logical AND
Logical AND after the
specified state is not taken

Code description
Use AND, AND The NOT code can connect 1 contact in series. The
number of series contacts is unlimited, and the code can be used
multiple times.
For example, programming:

4.3 OR、OR. NOT code


Mnemonics and Functions

Mnemonics Functions
Logical OR
Take the specified state as non
post logical OR
Code description
●Use OR, OR The NOT code can connect 1 contact in parallel.
●OR and OR.NOT refer to parallel connection with the aforementioned
RD and RD.NOT code steps starting from the step of the code

Such as programming

4.4 OR. STK code


Mnemonics and Functions

Mnemonics Functions
and Shift stack register right one bit after logical OR

Code description
●The OR.STK code is a separate code without an address.

Such as programming

As shown in the figure, there are three branches ①, ②, ③ from the left
bus to node N1, and branches ① and ② are all series circuit blocks.
When there are parallel series circuit blocks between the bus to node or
between nodes, except for the first branch, RD code is used at the end
of subsequent branches. Branch ③ is not a series circuit block, and the
OR code can be used.
OR.STK and AND.STK are codes without operating elements,
representing the OR, AND relationship between circuit blocks.
Programming chapter 4 PLC basic code

4.5 AND. STK code

Mnemonics and Functions

Mnemonics Functions
After the logical sum of ST0 and ST1,
the stack register is shifted one bit to the right

Code Description
●The AND.STK code is used when a branch circuit (parallel circuit block) is
connected in series with a previous circuit. The starting point of the branch
is RD, RD.NOT code, and after the parallel circuit block is completed, AND
is used The STK code is connected in series with the previous loop.
●AND.STK code is independent code without address.

Mnemonics and Functions

The upper ladder diagram and instruction table, ⑴ OR.STK represents the
series circuit block in block ② in parallel, ⑵ AND.STK represents the series
connection between circuit block ① and circuit block ②.
Chapter 5 PLC Function Code
When it is difficult to program some machine tool actions with basic
instruction codes, functional instruction codes can be used to simplify
programming.
Table 5-1 (PLC function instruction code)

NO name function NO name function


End of first level Binary rotation control
sequence program
End of second level Register shift
sequence program
Call subprogram Rising edge detection
Invoke subprogram Falling edge detection
unconditionally
Subprogram Binary number
comparison
End of subprogram Consistency comparison
Set Data transmission
Reset 1 byte transfer
Label Jump Two byte transmission
grade Binary indexing data
transmission
Timer Binary data search
Fixed timer Binary addition
Timer Binary subtraction
Binary counter Logical AND
Binary decoding Logical OR
Binary code Logical negation
conversion
Common line control XOR
End of common
line control

5.1 END1 (end of first level sequence program)


Function:
It must be given once in the sequence program, which can be at the end
of the first level program or at the beginning of the second level
program when there is no first level program. The first level program
can be written up to 500 steps.

Format:
Programming chapter 5 PLC function code

5.2 END2 (end of second level sequence program)


Function:
It is given at the end of the second level program.

Format:

5.3 CALL(Call subprogram)


Function:
Call a specified subprogram.
It has the following characteristics and limitations:
The subprogram can call other subprograms nested, with a
maximum of 18 layers allowed, but the system will give an alarm
when the closure call causes an endless loop. In order to control
the amount of execution data, the maximum number of subroutine
calls allowed by the system is 100, and no subroutine calls will be
allowed in the first level program. The system cannot execute any
code or network written between SP and END2 and before SP after
SPE, so the system gives an alarm.

Format:

Control conditions:
ACT=0, the next code after CALL is executed.
ACT=1, call the subprogram with the specified subprogram
number.

Parameters:
Sub procedure SN: specifies the sub procedure SN to be called.
The range of subprocess serial numbers is 0~99.

5.4 CALLU(Invoke subprogram unconditionally)


Function:
Invoke a specified subprogram unconditionally.
It has the following characteristics and limitations:
The subprogram can call other subprograms nested, with a maximum of
18 layers allowed, but the system will give an alarm when the closure
call causes an endless loop. In order to control the amount of execution
data, the maximum number of subroutine calls allowed by the system is
100, and no subroutine calls will be allowed in the first level program.
The system cannot execute any code or network written between SP
and END2 and before SP after SPE, so the system gives an alarm.

Format:

Parameters:
Sub procedure SN: specifies the sub procedure SN to be called. The
range of subprocess serial numbers is 0~99.

5.5 SP (subroutine)
Function:
SP is used to generate a subprogram. The subprogram serial number is
used as the name of the subprogram. The SP code is used with the SPE
code described later to specify the scope of the subprogram.

be careful:
1. The subprogram must be written after END2.
2. It is not allowed to set another subprogram within one subprogram.

Format:

Parameters:
Subprocedure No.: specifies the subprogram label to be called. The
range of subprocess serial numbers is 0~99.

5.6 SPE (end of subprogram)


Function:
*The SPE is used with the SP to specify the scope of the subprogram.
*When this function code is executed, control will return to the main
program calling this subprogram.
*The subprogram must be written after END2.
Programming chapter 5 PLC function code

Graphic format:

For example:

5.7 SET(Set)
Function:
Set 1 on the specified address.

Format:

Control conditions:
ACT=0,add. The state of b remains unchanged.
ACT=1,add. B Set to 1.

Parameters:
Add. b: Set the element address bit, which can be output coil, Add=Y, G, R,
K, A.
5.8 RST (reset)
Function:
Set 0 on the specified address.

Format:

Control conditions:
ACT=0,add. The state of b remains unchanged.
ACT=1,add. B Set to 0.

Parameters:
Add. b: Reset element address bit, which can be output coil, Add=Y, G,
R, K, A.

5.9 JMPB (label jump)


Function:
JMPB immediately transfers control to the program after the label set in
the ladder program.
It has the following characteristics and limitations:
*Multiple jump codes can use the same label.
*The first level program and the second level program cannot jump to
each other.
*Subprograms cannot jump to each other.
*Jumpback is allowed, but users should take care of the loopback they
may cause!
*The main program and subprogram cannot jump to each other.

Format:

Control conditions:
ACT=0, no jump, execute the next code after JMPB.
ACT=1, jump to the specified label, and execute the next code after the
label

Parameters:
Lx: Specify the destination label of the jump. Any value from 0 to 99 can
be specified.
Programming chapter 5 PLC function code

5.10 LBL(label)
Function:
Specify a label in the ladder, that is, specify the jump destination for
JMPB.
Note that an xx label can only be specified once with LBL. Multiple
alarms.

Format:

Parameters:
Xx: specifies the target label of the jump. The label range is 0-99.

For example:

5.11 TMR (Timer)


Function:
Delay conduction timer.

Format:

Control conditions:
ACT=0, turn off the timer.
ACT=1, start the timer.
The specific work is as follows:

Parameters:
TIMER: Timer number, represented by xxx, with xxx as a number
(0~127).
Output:
W: Output coil. When the preset is reached, W=1. W=0 when not
reached.
Note: Timer TIMER is executed every 8ms, with ms as the setting unit
and 8ms as the execution base. If it is less than 8ms, 8ms shall be
supplemented. For example, if it is set as 54ms, 54=6 * 8+6, 2ms shall
be supplemented, and the actual execution is 56ms. The timer time is
set in [TMR] under the PLC parameter interface. The system will
automatically detect the range of the timer serial number, and give an
alarm if the serial number is repeated or exceeds the range.

5.12 TMRB (fixed timer)


Function:
Delay conduction timer.

Format:

Control conditions:
ACT=0, turn off the timer.
ACT=1, start the timer.

The specific work is as follows:

Parameters:
TIMER: fixed timer number, represented by xxx, xxx is a number (0~127).
Programming chapter 5 PLC function code

Table 5-12-1 (Timer Accuracy)


Timer accuracy Set NO Set time range Error range
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to 1 s
0 to first level program
scanning cycle

Preset time:
Fixed timer timing time setting, value range (0~65535).

Output:
W: Output coil. When the preset is reached, W=1. W=0 when not
reached.
Note: The system will automatically detect the range of the timer serial
number, and give an alarm if the serial number is repeated or exceeds
the range. The preset time in this timer is fixed in ROM with the ladder,
so the timer time can only be changed by modifying the ladder file.

5.13 TMRC (Timer)


Function:
Delay conduction timer.

Format:

Control conditions:
ACT=0, turn off the timer.
ACT=1, start the timer.

The specific work is as follows:

Parameters:
TIMER: Timer number, represented by xxx, with xxx as a number (0~127).
Table 5-12-1 (Timer Accuracy)
Timer accuracy Set NO Set time range Error range
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to first level program
scanning cycle
0 to 1 s
0 to first level program
scanning cycle

Output:
W: Output coil. When the preset is reached, W=1. W=0 when not reached.

Note: The timer time is set in [TMR] under the PLC parameter interface.
TMRC timer and TMR timer share the same address, so TMRC timer and
TMR timer cannot have the same serial number. The system will
automatically detect the range of the timer serial number, and give an
alarm if the serial number is repeated or exceeds the range.

5.14 CTR (binary counter)


Function:
The data in this counter is binary, and has the following functions
according to the application.
1) Preset counter
Preset the count value, and output the signal if the count reaches the
preset value.
2) Ring counter
When the counter reaches the preset value, input the counting signal,
reset to the initial value, and count again.
3) Plus and minus counters
This is a reversible counter, which can be used for both addition and
subtraction.
4) Selection of initial value
The initial value can be 0 or 1.

Format:
Programming chapter 5 PLC function code

Control conditions:
Specify initial value (Cn0):
CN0=0 The counter starts from 0.
CN0=1 counter starts from 1.
Specify ascending or descending counter (UPDOWN):
UPDOWN=1 minus counter.
UPDOWN=0 plus counter.
Reset (RST):
RST=0 to remove the reset.
RST=1 is reset, W is reset to 0, and the count value is reset to the initial
value. Set RST to 1 only when a reset is required.
Count signal (ACT):
When ACT=1: count at the rising edge of ACT.
When ACT=0, the counter will not act and W will not change.

Parameters:
COUNTER: specify the counter number, represented by xxx, and xxx is a
number (0~127).

Output:
W: Coil output, when the preset value is reached, W=1.
Note 1: The system will automatically detect the range of the counter
serial number, and give an alarm if the serial number is repeated or
exceeds the range.
Note 2: After the ladder is re converted and downloaded, the current
value of the counter will be reset automatically.

To ensure the reliability of counter counting, please reset the counter


with pulse signal before counting.

5.15 DEC (binary decoding)


Function:
DEC can decode binary code data. When one of the eight (1-byte) or
sixteen (2-byte) continuous data is the same as the code data, the
corresponding output data bit is 1. When there are no identical numbers,
the output data is 0. This code is used for data decoding of M or T
functions.

Format:

Control conditions:
ACT=0: reset all output bits.
ACT=1: Perform data decoding, and set the processing result at the
output data address.
Parameters:
Length: set the size of code data in the first data of the parameter.
0001: Code data is one byte binary code data.
0002: Code data is binary code data of two bytes.
S1: code data address. Give an address to store code data.
S2: Decode the specified number. The first bit of 8 (1-byte) or 16 (2-byte)
consecutive digits to be decoded is given.
S3: decoding result address. Give an address to output the decoding
result. The storage area must have a one byte or two byte area for output.

For example:

5.16 COD (binary code conversion)


Function:
When inputting the data capacity, the COD code will automatically
generate a table of corresponding size under its function block for the
user to input the data of the conversion table. This table has 10 cells per
row. If it cannot be divided by 10, the row will be calculated by the
quotient+1, but the capacity data will not change, and the address of the
table number will not be displayed.

Format:

Length1 S1 conversion S2 conversion


Format Data capacity input data output data
specification of meter address address
change
Programming chapter 5 PLC function code
Control conditions:
Reset (RST):
RST=0 does not reset.
RST=1 Reset error output W
Work Code (ACT):
ACT=0: COD is not executed.
ACT=1: Execute COD. Take the value of "conversion input data address
(S1)" as the table number of the conversion table, take the conversion
data corresponding to the table number from the conversion table, and
output it to the output address (S2) of the conversion data.
Conversion table
Convert Translate data
Translate input No
Data output address
data address

Parameters:
Length1: Specifies the number of bytes of binary data of converted data
in the conversion table.
1: One byte binary.
2: Two byte binary.
Lengthh2: the capacity of the conversion table data. The capacity of
each conversion table cannot exceed 100. It is 100 bytes when 1 byte
format is specified, and 100 words when 2 byte format is specified. The
total capacity of all COD code conversion tables shall not exceed 512
bytes.
S1: The data in the conversion table can be retrieved by specifying the
table number. The address of the specified table number is called the
input address of the conversion data. This address requires one byte of
memory.
S2: Output address of converted data. The number of bytes of the
memory specified in the format specification starting at the specified
address.

Output:
If there is an exception during the COD code execution, W=1, it indicates
that an error has occurred.

Note: The maximum capacity of the conversion data table is 100 bytes
(words). The table is arranged between the output address of parameter
conversion data and the error output (W).
5.17 COM (Common Line Control)
Function:
COM specifies to control coil operation up to the range of common end
code COME. If no common line end code is specified, the system will
give an alarm.
Format:

Control conditions:
When ACT=0, the coil within the specified range is unconditionally turned
on and off (W=0).
ACT=1 is the same as COM code does not perform an operation.
Note 1: It is not allowed to specify other COM codes within the scope
specified by one COM code.
Note 2: When ACT of COM=0, the coil of WRT NOT within the specified
range is unconditionally set as 1 (WRT NOT=1).
Note 3: JMPB, END1, END2, CALL, CALLU, LBL, SP, SPE, COM, COME
and other function codes cannot be used between COM and COME,
otherwise the system will give an alarm.
5.18 COME (End of common line control)
Function:
This code specifies the control range of the common control line code
(COM). It cannot be used alone and must be used together with COM.

Format:

5.19 ROT (binary rotation control)


Function:
Used for rotary control, such as tool rest, rotary worktable, etc. The code
has the following functions:
1. Select the direction of rotation for the short path.
2. Calculate the steps from the current position to the target position; Or
calculate the steps from the previous position of the current position to
the previous position of the target position.
3. Calculate the position number of the previous position of the target or
the number of steps to the previous position of the target.
Programming chapter 5 PLC function code
Format:

Control conditions:
Specify the initial number of the turntable (Cn0):
CNO=0 counter starts from 0.
CNO=1 counter starts from 1.
Select rotation direction by short path (DIR):
DIR=0 No selection, rotation direction is only positive
DIR=1 for selection, and the rotation direction can be divided into
positive and negative directions.
Specify operating conditions (POS):
POS=0 count target location.
POS=1 Previous position of counting target.
Specify number of positions or steps (INC):
INC=0 Number of counting positions. To calculate the previous position
of the target position, specify INC=0 and POS=1.
INC=1 counting steps. To calculate the gap between the current position
and the target position, the codes INC=1 and POS=0.
Execution code (ACT):
When ACT=0: ROT code is not executed. W has not changed.
When ACT=1: execute ROT code. Generally, set ACT=0. If the operation
result is required, set ACT=1

Parameters:
S1: Give the turntable positioning number.
S2: Address of given storage current position.
S3: Specify the address (or code value) of the storage target location.
For example, the address to store the T code output by CNC.
S4: Calculate the result output address, calculate the steps of the
turntable to rotate, and the steps to reach the target position or the
previous position. When using the calculation results, always check
whether ACT is 1.

Output:
W: Rotation direction output. Output to W through the direction of short-
circuit rotation. When W=0, the direction is positive (FOR); When W=1,
it is the reverse direction (REV). The definitions of FOR and REV are
shown in the figure below. The direction in which the position number of
the turntable increases is the positive direction (FOR); If reduced to
REV. The address of W can be selected arbitrarily. However, when using
the result of W, always check the condition of ACT=1.
For example:
There is a turntable as follows:
current location

Turntable Current Destination Calculation


location location Location result
address address Address output
address

Perform short path rotation and calculate the position number of the
previous position of the target position.
The current position number S2=1, the number of indexing positions
S1=12, CNO=1, DIR=1, POS=1, INC=0.
Then:
S3=10 When the target position is A, under ACT=1, S4=11, W=1
S3=8 When the target position is B, under ACT=1, S4=9, W=1
S3=5 When the target position is C, under ACT=1, S4=4, W=0
S3=3 When the target position is D, under ACT=1, S4=2, W=0
5.20 SFT (register shift)
Function:
This code can shift 1-byte long (8-bit) data by the number of bits
specified in the code parameter each time. For cyclic shift, each overflow
"1" will be added from the opposite direction. If the highest bit is "1" and
overflow occurs during left shift, the lowest bit will be added to "1", and
the opposite direction is also.
Programming chapter 5 PLC function code
Format:

Mobile Format
bit data specification
address

Control conditions:
Specify shift direction (DIR)
DIR=0 Shift Left
DIR=1 Shift Right
Status assignment (CONT)
CONT=0 Do not rotate
CONT=1 Rotate
Reset (RST)
Reset shift output data (W=1) is (W=0)
RST=0 W does not reset
RST=1 W reset (W=0)
Execution conditions (ACT)
Do not execute SFT code when ACT=0.
If ACT=1, execute the shift. If only 1 bit is moved, set ACT to 0 after the
code is executed.

Parameters:
S1: Set the shift data address, which is composed of a byte storage
area.
Length: a four digit number, as defined in the following figure:

Number of bits per move

Move Status

L :The range is 0~8.


A: It is a bit parameter. When A=0, it is always shifted when ACT=1, and
it is moved once every cycle.
When A=1, ACT is regarded as a pulse signal. When it changes from 0 to
1, it moves once.

Output:
W: After W=0 shift operation, no "1" state is moved out.
After W=1 shift operation, a "1" state is moved out.

5.21 DIFU (rising edge detection)


Function:
This code sets the output signal to 1 during the scan cycle at the rising
edge of the input signal.

Format:

Control conditions:
Input signal: Set the output signal to 1 at the rising edge of the input
signal (0 1).
Output signal: When this function code is executed, the output signal is
kept as 1 during a scanning cycle of the ladder.

Parameters:
50: The rising edge is 0~255. If another DIFU code or DIFD code in the
ladder uses the same number, the system will alarm.

Operation:

The system will automatically detect the range of the serial number of
the rising edge, and give an alarm if the serial number is repeated or
exceeds the range.

5.22 DIFD (falling edge detection)


Function:
This code outputs a 1 signal for one scan cycle time at the falling edge of
the input signal.
Programming chapter 5 PLC function code
Format:

Control conditions:
Input signal: Set the output signal to 1 at the falling edge (1◆0) of the
input signal.
Output signal: when this function code is executed, the status of output
signal 1 will keep a scanning cycle of ladder.

Parameters:
50: The number of falling edge, ranging from 0 to 255. If there is
another DIFU code or DIFD code number in the ladder, the system will
alarm.

Operation:
Execution cycle

The system will automatically detect the range of the serial number of
the falling edge, and give an alarm if the serial number is repeated or
exceeds the range.
5.23 COM(binary number comparison)
Function:
Compares the size of two binary data. You need to specify enough
bytes in the storage area to store the input data and comparison data.

Format:

Length S1 input S2
format data Comparison
specification address data address

Control conditions:
ACT=0, do not execute COMP code. The W value remains unchanged.
ACT=1, execute COMP code

Parameters:
Length: the specified form (constant or address) of input data and the
specified data length (1, 2 bytes).
Specify data length
Format specification 1: 1 byte long
0: Constant 2: 2 bytes long
1: Address

S1, S2: contents of comparison source 1 and comparison source 2. It


can be a constant or an address number. Address number: R, X, Y, F, G,
K, A, D, C.
Output:
W=0: input data > comparison data
W=1: input data ≤ comparison data
5.24 COIN(Consistency comparison)
Function:
This code checks whether the input value is consistent with the
comparison value.

Format:

Format Input value Comparison


specification value address

Control conditions:
ACT=0, do not execute COIN code. The W value remains unchanged.
ACT=1, execute COIN code.

Parameters:
Length: the specified form (constant or address) of input data and the
specified data length (1, 2 bytes).

Specify data length


Format specification 1: 1 byte long
0: Constant 2: 2 bytes long
1: Address

S1: The input data can be specified by either constant or storage


address.
S2: Storage address of comparison data.
Programming chapter 5 PLC function code

Output:
W: W=0: input value ≠ comparison value.
W=1: input value=comparison value.
5.25 MOVN (data transmission)
Function:
To transfer source address data or specified binary data to the destination
address.

Graphic format:

Number of Delivery Delivery


bytes to source destination
transfer address address

Control conditions:
ACT=0, no data is transmitted.
ACT=1, a specified number of bytes are transmitted.

Parameters:
Length: the number of bytes or data to be transmitted.
S1: Source starting address or constant.
Select the transmission mode according to S1:
1. When S1 is a constant, if S2 is a single byte address, copy S1 by byte
to the address of corresponding Length bytes starting from S2 address;
If S2 is a word address, take S1 as a word, and the address of the
corresponding Length word starting from S2 address.
2. When S1 is an address, data will be transmitted by byte address
regardless of whether S1 and S2 address types match.
S2: Target starting address.

For example:

1. When S1 is constant 5 and S2 is R60, R60=00000 101 and


R61=00000 101.
2. When S1 is constant 5 and S2 is D60, D60=5 and D61=5.
3. When S1 is the address D50 and S2 is D60, D60=D50.
W=1 The specified number of bytes are transmitted.
W=0 No data is transmitted.
During transmission, if it is detected that the number of parameter types
exceeds the range, the system will give an alarm.
5.26 MOVB (1 byte transfer)
Function:
The MOVB code transfers 1-byte data from a specified source address
to a specified destination address.

Graphic format:

Delivery Delivery
source destination
address address

Control conditions:
ACT=0, no data is transmitted.
ACT=1, 1 byte is transmitted.

Parameters:
S1: Source address or constant.
If S2 is a single byte address, copy S1 to S2 by byte; If S2 is a word
address, copy S1 to the low byte address of S2 by byte.
S2: Destination address.

5.27 MOVW (transfer of two bytes)


Function:
MOVW code transfers 2-byte data from a specified source address to a
specified destination address.

Graphic format:

Delivery Delivery
source destination
address address

Control conditions:
ACT=0, no data is transmitted.
ACT=1, 1 byte is transmitted.

Parameters:
S1: Source address or constant.
S2: Destination address.
Programming chapter 5 PLC function code

5.28 XMOV (binary index data transmission)


Function:
This function code is used to read or overwrite data in the data table.
The number of data (table capacity) in the data table can be specified by
address, and PLC will operate the data table according to the user's
settings during operation.

Format:
Length S1 data S2 Data S3 input/ S4 Table
format table header output number
specification capacity address data storage
storage address address
address

Control conditions:
Specify read or write operations (RW)
RW=0: Read data from the data table.
RW=1: write data to the data table.
Reset (RST)
RST=0: reset is released.
RST=1: reset W=0.
Execution code (ACT)
ACT=0: XMOV code is not executed, and W remains unchanged.
ACT=1: execute XMOV code.
Parameters:
Length: the format specifies the length of data to be transferred.
1: 1 byte long.
2: 2 bytes long.
S1: Data table data capacity storage address. This address is used to
store the data capacity of the data table. The number of bytes it
occupies should conform to the length specified by Length. The
effective range of data is determined by the length of bytes specified in
the Length1 format.
1 byte: 1 to 256.
2 bytes long: 1 to 128, i.e. 128 × 2=256 bytes, which is the capacity of
PLC data table.
S2: Set data header address. The storage area of data table is byte
length × The number of data in the data table. The header address must
be the value set in the D data sheet.
S3: Input/output address. When reading data, set the address for
storing the reading results. When writing data, set the address to store
the written data. The number of bytes it occupies should conform to the
Length format setting. Limit the address to a D register.
S4: Table number storage address. Used to store the number in the
table that is read out or written into data. The number of bytes it
occupies should conform to the specification in Length. If the set table
number is greater than the data stored in S1, the error output W=1. The
actual transmission address=header address+number in the table, the
number in the table is 0~(S1-1), and the actual transmission address
cannot exceed the data table.
Output:
When the number in the table exceeds the value in S1, W=1, the read or
write operation of the data table will not be executed.
W=0, indicating no error.
W=1, indicating an error.

5.29 DSCH (binary data retrieval)


Function:
This function code is used to retrieve binary data in the data table. The
number of data in the data table (table capacity) can be specified with the
address, so that the table capacity can be changed even after the
program is written to the ROM.

Format:
Length S1 data S2 Data S3 S4
format table header Search Search
specification capacity address Data result
storage Address output
address address

Control conditions:
Duplicate detection (REP)
REP=0: Execute the DSCH code and start the search from the first
address of the data table. Whether the target data appears repeatedly
will not be considered. When the target data is detected for the first time,
the search will be stopped and its address will be output. If the retrieved
data is not found, W=1.
REP=1: Execute DSCH code. If the retrieved data is not found or there
are two (more than two), then W=1.
Reset (RST)
RST=0: reset is released.
RST=1: reset W=0.
Execution code (ACT)
ACT=0: DSCH code is not executed, and W remains unchanged.
ACT=1: execute DSCH code. If the retrieved data is found, the number in
the table is output. If it is not found or there are two (more than two), then
W=1.

Parameters:
Length: The format specifies the length of the retrieved data.
1: 1 byte long.
2: 2 bytes long.
S1: Storage address of data number in data table. The byte length
specified by this address allocates the storage area of the required
bytes. The number of data in the data table is n+1 (the header is 0, and
the footer is n).
Programming chapter 5 PLC function code
S2: Set data header address.
S3: Set the retrieval data input address.
S4: Search result output address. Actual address=head address+number
in the table, the number in the table is 0~(S1-1), and the actual address
cannot exceed the data table. After retrieval: if the retrieved data is
found, the number in the table is output, and the number in the table is
output to the retrieval result output address. The number of storage bytes
required for this address should conform to the specified format.
Output:
W=0, find the retrieved data.
W=1, the retrieved data is not found.

5.30 ADD(binary addition)


Function:
This code is used for addition of 1-byte and 2-byte binary data. For the
addend data and the output data of the addition result, the storage
address of the corresponding byte length needs to be set.
Format:

Format Addend Addend Output


specification address address
of
operation
result

Control conditions:
Reset (RST):
RST=0: reset is released.
RST=1: reset W=0.
Execution code (ACT):
ACT = 0: Do not execute the ADD code, W remains unchanged.
ACT=1: execute the ADD code.

Parameters:
Length: Specify the data length (1 byte or 2 bytes) and the specified
method (constant or address) of the addend.

Format specification Specify data length


0: Constant 1: 1 byte long
1: Address 2: 2 bytes long
S1: Specify the address to store the addend.
S2: The method of specifying addends depends on the provisions of
Length.
S3: Specify the address of the output operation result.

Output:
W=0: the operation is normal.
W=1: Abnormal operation.
When the addition result exceeds the specified data length, W=1.
5.31 SUB (binary subtraction)
Function:
This code is used for subtraction of 1-byte and 2-byte binary data. The
minuend data and the output data of the subtraction result need to set
the storage address of the corresponding byte length.

Format:

Output
Format Minuend Subtract address
specification address of
operation
result

Control conditions:
Reset (RST):
RST=0: reset is released.
RST=1: reset W=0.
Execution code (ACT):
ACT=0: no SUB code is executed, W remains unchanged.
ACT=1: execute SUB code.

Parameters:
Length: Specify the data length (1 or 2 bytes) and the specified method
(constant or address) of the addend.

Format specification Specify data length


0: Constant 1: 1 byte long
1: Address 2: 2 bytes long

S1: Specify the address to store the minuend.


S2: The method of specifying subtraction depends
on the provisions of Length.
S3: Specify the address of the output operation result.
Programming chapter 5 PLC function code

Output:
W=0: the operation is normal.
W=1: Abnormal operation.
When the result of subtraction exceeds the specified data length, W=1.
5.32 ANDF (bitwise AND)
Function:
This code matches the content in address A with a constant (or the
content in address B), and stores the result in address C.

Format:

Format Address A Constant or Address C


specification address B

Control conditions:
ACT=0: no ANDF code is executed.
ACT=1: execute ANDF code.

Parameters:
Length: specify the data length (1 or 2 bytes), and enter the data format
(constant or address).

Format specification Specify data length


0: Constant 1: 1 byte long
1: Address 2: 2 bytes long

S1: Specify the input data to be compared with. Start from this address
and the data length is consistent with the length specified.
S2: Input data corresponding to input data. When the format
specification is selected as the address specification, it starts from this
address and the data length is consistent with that specified by Length.
S3: Address used to store ANDF operation results. The results of ANDF
operation are stored at this address, and the data length is consistent
with the length specified by Length.

For example, when address A and address B contain the following data:
The results of ANDF operation are as follows:
Address C

5.33 ORF (bitwise or)


Function:
This code combines the content in address A with a constant (or the
content in address B), and stores the result in address C.

Format:

Format Address A Constant or Address C


specification address B

Control conditions:
ACT=0: No ORF code is executed.
ACT=1: execute ORF code.

Parameters:

Format specification Specify data length


0: Constant 1: 1 byte long
1: Address 2: 2 bytes long

Length: specify the data length (1 or 2 bytes), and enter the data format
(constant or address).
S1: Specify the input data to be phased or. Start from this address and
the data length is consistent with the length specified.
S2: Input data corresponding to or corresponding to input data. When
the format specification is selected as the address specification, it
starts from this address and the data length is consistent with that
specified by Length.
S3: Address used to store ORF operation results. The result of ORF
operation is stored at this address, and the data length is consistent
with the length specified by Length.

For example: when address A and address B contain the following


data:
Programming chapter 5 PLC function code
The ORF operation results are as follows:
Address C

5.34 NOT(Bitwise non)


Function: This code reverses each bit of the content in address A and
stores the result in address B.

Format:

Format Address A Address B


specification

Control conditions:
ACT=0, do not execute NOT code.
ACT=1, execute NOT code.

Parameters:
Length: Specify the data length (1 or 2 bytes).

Specify data length


1: 1 byte long
2: 2 bytes long

S1: Input data inverted bit by bit. Start from this address and the data
length is consistent with the length specified.
S2: Address used to output the NOT operation result. The result of the
NOT operation is stored at this address, and the data length is
consistent with the length specified by Length.

For example:
When address A and address B contain the following data:

Address A

The results of NOT operation are as follows:

Address B
5.35 EOR(XOR)
Function:
This code distinguishes the content in address A from the constant (or
the content in address B) or, and stores the result in address C.

Format:

Format Address A Constant or Address C


specification address B

Control conditions:
ACT=0: EOR code is not executed.
ACT=1: execute EOR code.

Parameters:
Length: specify the data length (1 or 2 bytes), and enter the data format
(constant or address).

Format specification Specify data length


0: Constant 1: 1 byte long
1: Address 2: 2 bytes long

S1: Specify the input data to be differentiated or. Start from this address
and the data length is consistent with the length specified.
S2: Input data different from or. When the format specification is
selected as the address specification, it starts from this address and is
consistent with the length specified by Length.
S3: Address used to store EOR operation results. The EOR operation
results are stored at this address, and the data length is consistent with
the length specified by Length.

For example: when address A and address B contain the following data:

The operation results of EOR are as follows:


Programming chapter 5 PLC function code

Chapter 6 Ladder Editing Limitations


1. The program must have the END1 and END2 codes as the end sign of
the first and second level programs, and the END1 must precede the
END2.
2. Only parallel output is supported, and multi-level output is not
supported.
3. The result output address in all basic codes and output function codes
shall not be set as follows:
1) Counter preset address DC, timer preset address DT.
2) The G63, R510 and R511 addresses are occupied by the system and
cannot be defined by the user.
3) X address and F address on the IO input port.
4. The system will give an alarm when the vertical line is suspended, the
node is not connected to the subsequent node, and the horizontal
conductor is connected in parallel with the node network.
5. Star network, that is, there is no direct connection between the vertical
lines of different lines in the same column, and there is no continuous
vertical line in the middle of a line. The system cannot handle this
situation, so it will give an alarm.
6. No bulge is allowed inside the network, that is, a parallel network
appears above a certain number of nodes in a row, and any row above
cannot be connected to this parallel network. The system will give an
alarm. The following conditions are considered as syntax errors, and the
system will give an alarm.
Chapter II Functions
Function Chapter I Control Axis
Chapter I Control Shaft
1.1 Output of axis movement status
The movement status of each axis can be output to PLC.
Axis movement signal MV1 ~ MV4 (F038.0 ~ F038.3)
● Signal type: NC → PLC
● Signal function: these signals indicate that a control axis is moving
MV1: X-axis moving
MV2: Z-axis moving
Mv3: Y-axis moving
MV4: A-axis moving
The signal becomes 1 when:
The corresponding axis has started to move
The signal becomes 0 when:
The corresponding axis is already in the stop state
● Signal address

Axis moving direction signal MVD1 ~ MVD4 (F039.0 ~ F039.3)


● Signal type: NC → PLC
● Signal function: these signals indicate the moving direction of a
control axis.
MVD1: Moving direction of X axis
MVD2: moving direction of Z-axis
MVD3: moving direction of Y-axis
MVD4: moving direction of A-axis
"0" indicates that the corresponding axis moves in the negative
direction, and "1" indicates that the corresponding axis moves in the
positive direction.
● Signal address

1.2 Servo ready signal


Servo ready signal SA (F000.6)
Function Chapter I Control Axis

● Signal type: NC → PLC


● Signal function: SA signal becomes 1 after the servo is ready. For
the shaft with brake, the brake is released when the signal is output,
and the brake is released when the signal is not output.
● Signal address
Chapter 2 Operation Preparation

2.1 Emergency stop


Press the emergency stop button on the machine tool operation panel,
and the machine tool will stop moving immediately.

red

Emergency stop button

The button is locked after being pressed, and the method of release
varies with the manufacturer of the bed. Normally the right rotation is
released.
Emergency stop signal ESP (G008.4)
● Signal type: PLC → NC
● Signal function: input emergency stop signal to stop the machine
tool immediately. When the emergency stop signal ESP changes to 1,
the CNC is reset and the machine tool is in the emergency stop state.
● Signal address

2.2 CNC overtravel signal


When the tool movement exceeds the end point of travel set by the
machine tool limit switch, the limit switch acts, the tool decelerates and
stops, and the over travel alarm is displayed.

Overtravel signal
+L1~+L4(G30.0~G30.3)
-L1~-L4(G31.0~G31.3)
● Signal type: PLC → NC
● Signal function: it indicates that the control shaft has reached the
limit of travel, and each direction of each control shaft has this signal.
The+and - of the signal name indicate the direction, and the number
corresponds to the control axis.

1 The X axis overtravel


2 The Z-axis overtravel
3 The Y-axis overtravel
4 The A-axis overtravel
+Overtravel in positive direction
-Negative direction overtravel
Function Chapter 3 Manual Operation

When the signal is "0", the control unit acts as follows:


During automatic operation, even if only one axis overtravel signal
becomes 1, all used axes will decelerate and stop, and an alarm will be
generated and the operation will be interrupted.
In manual operation, only the axis with movement signal 1 decelerates
and stops, and the stopped axis can move in the opposite direction.
Once the axis overtravel signal becomes 1, its direction of travel is
stored. Even if the signal becomes 0, the axis cannot move in this
direction until the alarm is cleared.

● Signal address

2.3 Alarm signal


When an alarm occurs in CNC, the alarm is displayed on the screen and
the alarm signal is set to 1.
Alarm signal AL (F001.0)
● Signal type: NC → PLC
● Signal function: the alarm signal indicates that the CNC is in the
alarm state, with the following alarm displays:
P/S alarm
Overtravel alarm
Servo alarm
The alarm signal is 1 under the following conditions:
------ CNC is in alarm state.
The alarm signal is 0 under the following conditions:
―― Clear the alarm through CNC reset.
● Signal address

2.4 Operation mode selection


Operation mode check signal (F003.0 ~ F003.7)
● Signal type: NC → PLC
● Signal function: indicating the currently selected operation mode.
● Signal address
2.5 Status output signal
Cutting feed signal CUT (F002.6)
● Signal type: NC → PLC
● Signal function: this signal indicates that automatic cutting feed is in
progress.
The signal is 1 under the following conditions:
When automatically running the cutting feed (linear interpolation,
circular interpolation, spiral interpolation, thread cutting, skip cutting
or cutting in a fixed cycle).
● Precautions:
This signal is not output when the feed is paused.
This signal can be output during interlocking or when the feed rate is 0.
● Signal address
Function Chapter 3 Manual Operation
Chapter 3 Manual Operation
3.1 JOG feed/incremental feed
JOG feed
In JOG mode, set the feed axis and direction selection signal on the
machine tool operation panel to 1, and the machine tool will move
continuously along the selected axis in the selected direction.
Incremental feed
In the incremental feed mode, set the feed axis and direction selection
signal on the machine tool operation panel to 1, then the machine tool
moves one step along the selected axis in the selected direction, the
minimum distance of the machine tool movement is the minimum input
increment, and each step has a minimum input increment value of 10,
100 or 1000 times. The only difference between JOG feed and
incremental feed is the way to select the feed distance. In JOG feeding,
when the+J1, - J1,+J2, - J2,+J3, - J3, etc. feed axis and direction
selection signals are 1, the machine tool can feed continuously. Under
incremental feeding, the machine tool is fed in single step. The JOG feed
speed can be adjusted by using the JOG feed speed multiplying disc.
Through the rapid feed selection switch, the machine tool moves at the
rapid feed speed, independent of the JOG feed speed multiplying signal.
Feed axis and direction selection
+J1~+J4(G27.0~G27.3)
-J1~-J4(G28.0~G28.3)
● Signal type: PLC → NC
● Signal function: select the required feed axis and direction under JOG
feed or incremental feed. The+and - in the signal name indicate the feed
direction, and the number corresponds to the control axis.

1 X axis feed
2 The Z-axis feed
3 The Y-axis feed
4 The A-axis feed
+Feed in positive direction
-Feed in negative direction
When No. is 1, the control unit acts as follows:
*When JOG feed or incremental feed is valid, the control unit moves the
specified axis in the specified direction. In JOG feeding, when the signal
is 1, the control unit makes the control axis move continuously.
*In incremental feeding, the control unit makes the specified axis feed
according to the defined step, and then the control unit stops moving.
When the axis is fed, the control unit will not stop feeding even if the
signal is 0. To move the axis again, set the signal to 0 and then to 1.
● Signal address
Manual rapid feed selection signal RT (G019.7)
● Signal type: PLC → NC
● Signal function: select the rapid feed speed of JOG feed or
incremental feed.
When the signal becomes 1, the control unit operates as follows:
The control unit performs JOG feed or incremental feed at rapid feed
rate. The rapid feed rate is valid.
During JOG feed or incremental feed, when the signal is switched from
1 to 0 or vice versa, the feed speed decreases until 0. Then it increases
to the defined value. During acceleration and deceleration, the feed
axis and direction selection signal can be kept at 1.
● Signal address

3.2 Handwheel/single step feed


Under the handwheel/single step feeding mode, the machine tool can
move slightly by rotating the handwheel pulse generator or by single
step operation. Select the machine tool moving axis through the
handwheel feeding axis selection signal or axis moving signal.
Single step feed selection signal (G018.0 ~ G018.3)
● Signal type: PLC → NC
● Signal function: the signal selects the travel distance of one pulse
generated by pressing the axis travel key once during the single step
feeding.
● Signal address
Function Chapter 5 Automatic Operation

Chapter 4 Return to Reference Position


4.1 Manual return to reference point position
In the manual return to the reference point mode, the machine tool
moves along the set direction and returns to the reference point by
setting the positioning parameters N0: 181 # 0~# 4. The axis selected
by pressing the button on the panel only represents the axis selected to
return to zero, regardless of the axis moving direction. The following
signals relate to manual return to the reference position:

Manual return to reference position


Reference position return deceleration signal

Reference position return end signal

Reference position return end signal ZP1 ~ ZP5 (F037.0 ~ F037.4)


● Signal type: NC → PLC
● Signal function: this signal informs that the machine tool is in the
reference position of the control axis. These signals correspond to the
axis one by one.

Return to reference point end signal ZP1


Return to reference point end signal ZP2
Return to reference point end signal ZP3
Return to reference point end signal ZP4
Return to reference point end signal Zp5

When the signal becomes 1:


A. The manual reference position return has ended and the current
position is in place.
B. The automatic reference position return (G28) ends and the current
position is in the in place area.
C. The reference position return detection is completed, and the
current position is in place.
When the signal becomes 0:
A. When the machine tool moves out of the reference position.
B. When emergency stop signal occurs.
C. When servo alarm occurs.
● Signal address
Return zero deceleration signal detection DECX (G017.0) DECY
(G017.1) DECZ (G017.2) DECA (G017.3)
● Signal type: PLC → NC
● Signal function: these signals reduce the movement speed of manual
return to the reference point, so as to approach the reference point at a
low speed.
● Signal address

4.2 Return to reference position detection signal


Return to the first reference point end signal ZP21 --- ZP24 (F041.0 ~
F041.3)
Return to the end signal of the second reference point ZP21 --- ZP24
(F057.0 ~ F057.3)
Return to the third reference point end signal ZP31 -- ZP34 (F058.0 ~
F058.3)
Return to the fourth reference point end signal ZP41 --- ZP44 (F059.0 ~
F059.3)
● Signal type: NC → PLC
● Signal function: this signal informs that the machine tool is at the
reference point of the control axis. These signals correspond to the axis
one by one.

X-axis reference position return end signal


Y-axis reference position return end signal
Z-axis reference position return end signal
4TH axis reference position return end signal
5TH axis reference position return end signal

The signal becomes 1 when the following states occur:


A. The manual reference position return has ended and the current
position is in place.
B. The automatic reference position return (G30) ends and the current
position is in the in place area.
C. The reference position return detection is completed, and the current
position is in place.
When the following states occur, the signal becomes 0,
A. When the machine tool moves out of the reference position.
B. When emergency stop signal occurs.
C. When servo alarm occurs.
● Signal address
Function Chapter 5 Automatic Operation

Chapter 5 Automatic Operation


5.1 Cycle start/feed pause
● Cycle start (start automatic operation):
1. In the automatic mode or the input mode, when the automatic
operation startup signal ST is valid, the program starts to run. The
signal ST is ignored in the following cases:
A: Other than automatic mode or input mode
B: When the feed pause signal (SP) is 0
C: When the emergency stop signal (ESP) is 1
D: When the external reset signal (ERS) is 1
E: Press the "reset key" on the panel F: CNC is in alarm state
G: Autorun started
2. During automatic operation, CNC feeding is suspended under the
following conditions:
A: When the feed pause signal (SP) is 0
C: End of one-way sequence segment instruction during single program
segment operation
3. During automatic operation, the CNC enters the reset state under the
following conditions, and the operation stops:
A: Set the emergency stop signal (ESP) to 1
B: When the external reset signal (ERS) is 1
C: Press the "reset key" on the panel
D: CNC alarm
E: Mode switching
● Feeding pause (automatic operation interruption):
When the feed pause signal SP is 0 during automatic operation, the
CNC enters the pause state and stops operation. At the same time, the
cycle start lamp signal STL is set to 0. The feed pause signal SPL is set
to 1. If the SP signal is set to 1 again, the automatic operation will not be
restarted. Set SP signal to 1 and make ST signal valid before restarting
automatic operation.

Cycle start signal ST (G007.2)


Feeding pause signal SP (G008.5)
● Signal type: PLC → NC
● Signal function: When the feed suspension signal SP is 0 during
automatic operation, the CNC enters the suspension state and stops
operation.
● Signal address

Cycle start lamp signal STL (F000.5)


● Signal type: NC → PLC
● Signal function: inform the PLC that it has entered automatic
operation startup. This signal is set to 1 or 0, depending on the CNC
status, as shown in Table 5.1.
● Signal address
Feed pause lamp signal SPL (F000.4)
● Signal type: NC → PLC
● Signal function: inform the PLC that it has entered the feed
suspension state. This signal is set to 1 or 0, depending on the CNC
status, as shown in Table 5.1.
● Signal address

Automatic operation signal OP (F000.7)


● Signal type: NC → PLC
● Signal function: inform PLC that automatic operation is in progress.
This signal is set to 1 or 0, depending on the CNC status, as shown in
Table 5.1.
● Signal address

Cycle start lamp Feed pause lamp Automatic operation


lamp

Cycle start status


Feed pause status
Automatic operation
stop status
Reset status

5.2 Reset
Under the following conditions, the CNC is reset and enters the reset
state.
1. Set the emergency stop signal (ESP) to 1
2. Press the<RESET>key on the MDI
When the CNC is reset, the reset signal RST is output to the PLC. After
the above conditions are removed, the reset signal RST is 0 after the
reset signal output time set by parameter 71.
RST=T reset (reset processing time)+parameter 71 setting value

During automatic operation, when the CNC is reset, the automatic


operation stops, and the operating shaft decelerates and stops.
The CNC is reset during the execution of M, S and T functions. Within
16ms, MF, SF and TF signals are set to 0.
Reset signal RST (F001.1)
Function Chapter 5 Automatic Operation

● Signal type: NC → PLC


● Signal function: inform PLC that CNC has been reset, and the signal
is used for PLC reset processing.
The signal is set to 1 under the following conditions:
1. Set the emergency stop signal (ESP) to 1.
2. Press the<RESET>key on the MDI.
The signal is set to 0 under the following conditions:
After the above conditions are removed and the CNC is reset, the number
of No 71 When the set reset signal output time has ended.
● Signal address

5.3 Program testing


Before the machining starts, the automatic operation test is carried out to
check whether the generated program is correct. Under the condition that
the machine tool is not running, detect by observing the change of
position display or by actually running the machine tool.

5.3.1 Machine tool locking


Do not move the machine tool to monitor the change of the position
display.
When the machine tool lock signal MMLK of all axes is 1, during manual
or automatic operation, the output pulse to the servo motor is stopped,
but the code distribution is still in progress, and the absolute and relative
coordinates are also updated, so the operator can check whether the
code is compiled correctly by monitoring the change of position.
All axis machine tool locking detection signal MMLK (F004.1)
● Signal type: NC → PLC
● Signal function: inform PLC of the status of locking signals of all axis
machine tools. When the signal is set to 1, the lock signal of all axis
machine tools is set to 1. When the signal is set to 0, the lock signal of all
axis machine tools is set to 0.
● Signal address

5.3.2 No load operation


Empty operation is only valid for automatic operation. The machine
moves at a constant feed rate without executing the feed rate defined in
the program. This function is used to check the movement of the machine
tool without workpiece.
DRN (G046.7)
● Signal type: PLC → NC
● Signal function: valid for empty operation. When the signal is set to 1,
the machine tool moves at the feed speed set for empty operation. When
the signal is set to 0, the machine tool moves normally.
● Precautions:
During the machine tool movement, the idle running signal changes
from 0 to 1, and the machine tool speed is accelerated or decelerated to
the idle running speed by the speed specified in the program; When the
idle running signal changes from 1 to 0, the machine tool speed slows
down or accelerates from the idle running speed to the speed specified
by the program.
● Signal address

5.3.3 One way sequence section


Segment operation is only valid for automatic operation.
During automatic operation, when the single program segment signal
(SBK) is set to 1, the CNC will enter the automatic operation stop state
after executing the current program segment. In the sequential
automatic operation, after executing each program segment in the
program, CNC enters the automatic operation stop state. When the
single program segment signal (SBK) is set to 0, automatic operation is
re executed.
Single block signal SBK (G046.1)
● Signal type: PLC → NC
● Signal function: one-way sequence section is valid. This signal is set
to 1 to execute one-way sequence segment operation. When the signal
is set to 0, normal operation is performed.
● Signal address

Single block detection signal MSBK (F004.3)


● Signal type: PLC → NC
● Signal function: inform PLC of the status of one-way sequence
section signal.
The signal is 1 under the following conditions:
―― When single program segment signal SBK is 1.
The signal is 0 under the following conditions:
―― When single program segment signal SBK is 0.
● Precautions:
1. Operation in thread cutting.
When the SBK signal becomes 1 during thread cutting, the
operation stops after executing the first non thread cutting program
segment after the thread cutting code.
2. Operation in fixed cycle.
During the fixed cycle, when the SBK signal is set to 1, it stops ever y
time the positioning approaches drilling and tool retraction, rather
than at the end of the program segment. When the STL signal is set
to 0, the SPL signal becomes 1, indicating that it has not reached the
end of the program segment. When the execution of a program
segment is completed, STL and SPL signals become 0 and the
operation stops.
● Signal address
Function Chapter 5 Automatic Operation

5.4 Skipping Optional Segments


In automatic operation, when a slash is specified at the beginning of a
program segment, and the signal BDT of skip optional program segment
is set to 1, the program segment is ignored.
Skip optional block signal BDT (G044.0)
● Signal type: PLC → NC
● Signal function: select whether the program segment containing "/" is
ignored. In automatic operation, the actual feed speed is obtained by
multiplying the specified cutting feed speed by the multiplying value
selected by these signals. In automatic operation, when BDT is 1, the
program segment containing "/" is ignored, and when BDT is 0, the
program executes normally.
● Signal address

Skip optional segment detection signal MBDT (F004.0)

● Signal type: NC → PLC


● Signal function: inform the PLC to skip the BDT status of any program
segment.
● Signal address
Chapter 6 Feed Speed Control
6.1 Fast moving magnification
The fourth gear magnification (F0, 25%, 50%, 100%) can be used for
fast moving speed.

tool tool
Fast moving
magnification 50%

Fast moving speed Fast moving speed


10m/min 5m/min

Whether the feed speed is in automatic or manual operation (including


manual return to the reference point and return to the program zero
point), the actual travel speed is obtained by multiplying the rapid travel
value set by the data parameter by the multiplying value.
F0 speed is set by data parameter NO.32.
Fast moving multiplying code detection signal (G14.0 ~ G14.1)
● Signal type: PLC → NC
● Signal function: code detection signal for fast moving speed
multiplication.

The coded signal corresponds to the following magnification:


Fast and fast moving
multiplying coded signal Multiplying value

● Signal address

6.2 Feed rate multiplying factor


Increase or decrease the programmed feed speed by selecting the
percentage with the multiplying disc. This feature is used for program
detection. For example, when the feed speed specified in the program is
100 mm/min, set the magnification to 50% to make the machine move at
the speed of 50 mm/min.
Function Chapter 6 Feed Speed Control

FV00~FV07 (G012)
● Signal type: PLC → NC
● Signal function: cutting feed rate multiplying signal. There are 16
gears from 0% to 150%. In automatic operation, the actual feed speed is
obtained by multiplying the specified cutting feed speed by the
multiplying value selected by these signals.
● Signal address

6.3 Multiplication cancellation


The rate cancellation signal fixes the feed rate multiplier to 100%.
OVC(G006.4)
● Signal type: PLC → NC
● Signal function: the feed rate multiplier is fixed at 100%.
When the signal is 1, the CNC operates as follows:
A. Regardless of the feed rate multiplying signal, the feed rate
multiplying is fixed at 100%.
B. The rapid movement magnification and spindle speed magnification
are not affected.
● Signal address
Chapter 7 Auxiliary Functions
When the maximum 8 digits behind the addresses M, S and T are
specified, the corresponding code signals and gating signals are sent to
the PLC, and the PLC performs relevant logic control according to the
status of these signals. Relevant signals are as follows:

Program End signal


function
address Distribution
Code signal Strobe signal
end signal
Auxiliary functions
Spindle speed
function
Tool function

The processing is as follows: (Change the M code to S, T code, that is, the
processing of spindle speed function and tool function)
A: Assume that M is specified in the program. If CNC is not specified, an
alarm will be generated.
B: After the code signals M00 ~ M31 are sent to the PLC, the strobe signal
MF is set to 1, and the code signal expresses the program instruction
value in binary form.
C: When the pass signal MF is 1, the PLC reads the code signal and
executes the corresponding operation.
D: At the end of the operation, the PLC sets the end signal FIN to 1. The
end signal is used for auxiliary functions, spindle speed and tool functions.
If these functions operate at the same time, the end signal FIN must not be
set to 1 until all functions are completed.
F: When the end signal FIN is 1 and must last for a period of time, CNC will
set the strobe signal to 0 and confirm that the end signal has been
received.
G: When the pass signal is 0, the FIN signal is set to 0 in PLC.
H: When FIN signal is 0, CNC sets all code signals to 0 and ends all
sequence operations of auxiliary functions. (When executing the spindle
speed function and tool function, the code signal remains until a
corresponding new code is assigned)
1: When the execution of instructions in the same program segment is
completed, CNC will execute the next program segment. In practical
application, PLC adopts the following timing sequence:
Function Chapter 7 Auxiliary Functions

7.1 Auxiliary function (M function)


7.1.1 Auxiliary function code signal and strobe signal
Auxiliary function code signal: M00 ~ M31 (F010), auxiliary function strobe signal: MF (F007.0)
● Signal type: NC → PLC
● Signal function: after the CNC executes the M code, the NC sends the M code to the PLC
through F10, and then sets the MF to 1, and sends it to the PLC for logical control. For output
conditions and execution process, please refer to the above description of execution process.
The corresponding relationship between M instruction and code signal code is as follows:

● Precautions: The following auxiliary function commands will not be


output even if they are given in the CNC program:
A:M98,M99
B: M code calling subprogram
C: M code calling user macro program
● Signal address

7.1.2 M decoding signal


DM00(F009.7)、DM01(F009.6)、DM02(F009.5)、DM30
(F009.4):
● Signal type: NC → PLC
● Signal function: When CNC executes M00, M01, M02 and M30
commands, NC sets the corresponding decoded signals DM00, DM01,
DM02 and DM30 to 1.
● Precautions:
1: Under the following conditions, the M decoding signal is 1: the
corresponding auxiliary function is specified.
2: Under the following conditions, M decoding signal is 0: FIN signal is 1
or reset.
3: When M00, M01, M02 and M30 are executing, code signals M00 ~ M31
and strobe signals MF are output while corresponding decoding signals
DM00, DM01, DM02 and DM30 are output.
● Signal address

7.2 Spindle speed function (S function)


Spindle speed code signal S00 ~ S31 (F022), spindle speed strobe
signal SF (F007.2)
● Signal type: NC → PLC
● Signal function: After the CNC executes the S code, the NC sends the
S code to the PLC through F22, and then sets the SF to 1, which is sent to
the PLC for logic control. For the output conditions and execution
process, please refer to the previous description. The binary code
correspondence between the S instruction and the code signal is shown
in the following table:

● Signal address
Function Chapter 7 Auxiliary Functions

7.3 Tool function (T function)


Tool function code signal T00 ~ T31 (F026), tool function strobe signal TF
(F007.3)
● Signal type: NC → PLC
● Signal function: After the CNC executes the T code, it sends the T code
to the PLC through F26, and then sets the TF to 1, and sends it to the PLC
for logic control. For the output conditions and execution process, refer to
the previous description. The binary code corresponding relationship
between the T instruction and the T code signal is shown in the following
table:

● Signal address

7.4 End of MST function


7.4.1 End signal
FIN(G004.3)
● Signal type: PLC → NC
● Signal function: When the auxiliary function, spindle speed function and
tool function are completed, PLC will set FIN to 1 and then transfer it to NC.
● Signal address
7.5 Auxiliary function locking
7.5.1 Auxiliary function locking signal

AFL(G0005.6):
● Signal type: PLC → NC
● Signal function: PLC sets G5.6 to 1, and then transfers it to NC,
prohibiting the execution of M, S, and T functions.
● Precautions:
When AFL signal is 1, CNC performs the following processing:
A: For automatic operation and operation in the input mode, the CNC does
not perform the specified M, S and T functions, that is, the code signal and
strobe signal are not output.
B: If AFL is set to 1 after the code signal is output, it will be executed in the
normal way until the execution ends (until the FIN signal is received and the
strobe signal is set to 0).
C: When AFL is 1, M00, M01, M02 and M30 commands can be executed,
and the corresponding code signal, strobe signal and decoding signal are
output in the normal way.
D: When AFL is 1, the auxiliary functions M98 and M99 are still executed in
the normal way, but the execution results are not output.
E: When AFL is 1, the spindle analog quantity can still be output.
● Signal address

7.5.2 Auxiliary function locking detection signal


MAFL(F004.4):
● Signal type: NC → PLC
● Signal function: When CNC is in the auxiliary function locking state, NC
will set F4.4 to 1 and then transmit it to PLC.
● Signal address
Function Chapter 7 Auxiliary Functions

Chapter 8 Spindle Speed Function


The CNC divides the spindle into gear spindle and analog spindle according to
the control mode of the spindle. Under the gear spindle, CNC controls the
speed of the spindle by changing the S code into a switching value and
outputting it to the spindle; Under the simulated spindle, CNC controls the
speed of the spindle by changing the S code into analog quantity and
outputting it to the spindle. CNC sends SIMSPL signal to inform PLC of the
current CNC control spindle mode.
Spindle mode signal SIMSPL (F044.4)
● Signal type: NC → PLC
● Signal function: NC sets the spindle speed control mode by setting SIMSPL
to 0 or 1, and then sends SIMSPL to PLC to inform PLC of the current spindle
speed control mode.
● Signal action: when SIMSPL is 1, it means that the control mode set by CNC
is analog spindle, and S code is sent in analog quantity; When SIMSPL is 0, it
means that the control mode of CNC setting is gear spindle, and the S code is
sent as switch value.
● Signal address

8.1 Shift spindle


Gear spindle means that the actual speed of the spindle is controlled by the
mechanical gear of the machine tool. CNC changes the S code into switch
output to control the mechanical gear of the machine tool, thus controlling the
speed of the spindle. See 7.2 for details.

8.2 Simulated spindle


8.2.1 Analog spindle speed control
S command for analog spindle control: The S command is input by the
machining program and specifies the analog spindle speed controlled by CNC.
For constant linear speed cutting (G96 mode), CNC converts the specified
surface linear speed to the spindle speed.
S code/SF signal output: the analog spindle control function in CNC outputs
the S command value to PLC in binary code. But SF is not output. Gear shift
processing: Although the S command specifies the spindle speed, the actual
control object is the spindle motor. Therefore, CNC must have a certain
correspondence between the speed and grade of the spindle motor. The
machine tool decides which gear gear to use, and the CNC outputs the spindle
speed corresponding to the gear gear. Gear shifting method: In order to
execute gear shifting, the maximum spindle speed corresponding to each gear
must be determined by the data parameter NO.037~NO 040. The gear
selection signal is a two position coded signal (GR1, GR2). The relationship
between the signal and the gear is as follows:
Data parameter NO.037~NO 040 sets the maximum speed of the spindle at
gears 1 to 4 respectively. The analog voltage 10V corresponds to the
maximum speed of the spindle motor. The analog voltage output of the same S
command at different gears has the following linear relationship:

Assume that the data parameter NO.037 = 1000; NO.038=2000;


NO.039=4000; NO.040=5000。 When the spindle speed S=800,
G48.0=0, G48.1=0, in gear 1

G48.0=1, G48.1=0, in gear 2:

G48.0=0, G48.1=1, in gear 3:

G48.0=1, G48.1=1, in gear 4:

Calculation formula of S command value


output voltage value:
Maximum speed
of the current gear

S12 bit code (R12O ~ R01O) output: NC calculates the spindle speed of each
gear through gear shift processing, that is, S12 bit code signal R12O ~ R01O
(0~4095) is output to the spindle motor and PLC. The relationship between
10V voltage and S12 bit code is shown in the figure below:
Function Chapter 7 Auxiliary Functions

Stop output condition: when S0 is commanded, the command output to the


spindle is reset to 0. M05, emergency stop or reset cannot make the NC
reset the command output to the spindle to 0.
Analog spindle interface: finally, through the analog spindle interface
circuit, the adjusted spindle speed output value is output to the spindle
motor in the form of analog voltage.
Spindle speed multiplying signal SOV0 ~ SOV7 (G21)
● Signal type: PLC → NC
● Signal function: PLC assigns a value to G21, and then transmits it to NC,
which determines different spindle speed multiples according to the value
of G21. The corresponding relationship between SOV0~SOV7 codes and
magnification values is as follows:

● Precautions: The spindle magnification function is invalid under tapping


cycle and thread cutting.
● Signal address

Gear selection signal GR1, GR2 (G48.0, G48.1)


● Signal type: PLC → CNC
● Signal function: this signal informs the CNC of the currently selected
gear, and the specific action is described above.
● Signal address

S12 bit code signal R02O~R12O (F030.0~F031.3)


● Signal type: NC → PLC
● Signal function: this signal converts the spindle speed command value
calculated by the NC spindle control function into 0~4095 data and outputs
the result to the PLC.
● Signal address
8.3 Spindle inching function
When the spindle inching function is valid, start the spindle, and the spindle
will rotate the time set by the data parameter NO.108 at the speed set by the
data parameter NO.109. This function is only used to control the analog
spindle, and is executed in manual, handwheel/single step, mechanical
zeroing, program zeroing, etc.
8.3.1 Spindle inching signal

SPHD(G036.0)
● Signal type: PLC → NC
● Signal function: When the analog spindle function is valid, the PLC sets
G036.0 to 1 and sends it to NC, and the designated spindle inching function
is valid. When the spindle rotates normally, G036.0 is 0.
● Signal address

8.3.2 Spindle inching detection signal

MSPHD(F043.0):
● Signal type: NC → PLC
● Signal function: when CNC is executing the spindle jogging, NC will set
F043.0 to 1, and then send it to PLC to inform PLC that the spindle jogging is
being executed; F043.0 is 0 in the non spindle jogging execution state.
● Signal address

8.5 Rigid tapping

Rigid tapping refers to synchronizing the tapping shaft with the main shaft in
the normal tapping fixed cycle. In rigid tapping, CNC needs to detect the
rotation direction signal of the spindle to determine the cutting feed direction
and processing process.
Execution process: spindle rotation → Z-axis feeding and tapping →
sending M05 stop command to the spindle → waiting for the spindle to stop
completely → sending reverse command → Z-axis tool retraction to the
starting point → spindle stop. Therefore, in order to achieve rigid tapping,
corresponding ladder diagram must be prepared to inform the rotation
direction of the CNC external spindle.
SRVB(G025.4)、SFRB(G025.5):
● Signal type: PLC → NC
● Signal function: During rigid tapping, the PLC sets G25.4 and G25.5, and
then sends them to the NC to inform the NC whether the spindle is rotating
forward or backward. Thus starting the cutting feed; SRVB=1 when the
spindle is in forward rotation; When the spindle reverses, SFRB=1; When
the spindle stops, SRVB and SFRB are set to 0.
● Precautions: When CNC starts rigid tapping, PLC must set SRVB and
SFRB to inform CNC of the current spindle rotation direction.
Function Chapter 7 Auxiliary Functions

● Signal address

Chapter 9 Tool Functions


When the T code or HDT signal is specified, the NC compares the required
tool number with the current tool number NT00 ~ NT07. If the tool number
is consistent, the NC will not change the tool; If not, code signal and strobe
signal of the required tool number will be generated, and the machine tool
will select the tool according to the generated signal.
The CNC can change tools by T command in automatic and input mode, or
by HDT signal in manual mode.
Current tool No. NT00 ~ NT07 (G37)
● Signal type: PLC → NC
● Signal function: After PLC detects the current tool position signal, it sets
the corresponding value of NT00 ~ NT07 (G37), and then sends it to NC to
notify NC of the current tool number. These signals represent the tool
number in binary code.
● Signal address

9.1 T command tool change


In the automatic mode and the input mode, the user can specify the T
command to change the tool. After the NC interprets the T command, it
sends the tool position number and strobe signal specified by the T
command, and then waits for the PLC to complete the tool change. See
Chapter 7 for the process.

9.2 Manual sequential tool change


When changing the tool manually in sequence, make the NC add 1 to the
current tool number as the tool number of the next required tool for tool
change. If the current tool number plus 1 is greater than the total tool
number set by the data parameter NO.084, then the tool number of the next
required tool is 1.
The execution process of CNC manual sequential tool change is the same
as that of T command tool change. NC sends out the tool position number
and strobe signal of the next tool, and then waits for the completion of PLC
tool change. The tool position number issued by CNC during manual
sequential tool change is the current tool number plus 1, while the tool
position number issued by CNC during T command tool change is the tool
number specified by T command.
Manual sequential tool change signal HDT (G44.7):
● Signal type: PLC → NC
● Signal function: PLC sets G44.7 to 1, and then sends it to NC, which
starts tool change according to the current tool number.
● Signal address
Function Chapter 9 Programming Code
Chapter 10 Programming Code
9.1 User macro program

Although the subprogram is very useful for repeating the same operation,
the user macro program function allows the use of variables, arithmetic
operations, logical operations and conditional branches, which is very
easy for developing general programs. The processing program can use
a simple code to call the user macro program just like the subroutine.

This means that programming a function with macro program can make it
a general function. That is, programs can be written with data variables
(variable data or unknown data). For example, user macro program can
be used for group process.

User macro program input signals UI000 ~ UI015 (G054, G055)


● Signal type: PLC → NC
● Signal function: no function is provided for the control unit. These
signals are read by the macro program as one of the system variables and
used as interface signals between the macro program and PLC.
The system variables corresponding to these signals are expressed as
follows:
Note: # 1032 is a 16 bit variable, which is composed as follows:
● Signal address

User macro program output signal UO000 ~ UO015 (F054 ~ F055)


● Signal type: NC → PLC
● Signal function: no function is provided for the control unit. These
signals are used to read or write system variables by the user macro
program and act as interface signals between the user macro program
and PLC.
The system variables corresponding to these signals are expressed as
follows:

Note: # 1132 is a 16 bit variable.

● Signal address
Function Chapter 10 Display/Setting

Chapter 11 Display/Setting
11.1 Soft operation panel
The function of the soft operation panel is to replace some control
switches of the machine tool operation panel with soft switches. Use the
key on the MDI panel to turn the soft switch on or off. The status of all
soft switches shall be informed to PLC by output signals. For example,
setting the single section soft switch SBKO to 1 does not enable the
CNC to select single section operation. Only when the PLC changes the
input signal SBK of single section operation to 1 can the CNC select
single section operation.
Step X1000 Soft key X1000 (F032.7)
Step X100 soft key X100 (F032.6)
Step X10 soft key X10 (F032.5)
Step X1 soft key X1 (F032.4)
X+soft key X+(F034.2)
X soft key X - (F034.3)
Z+soft key Z+(F034.4)
Z-soft key Z - (F034.5)
Spindle forward rotation soft key SCW (F034.6)
Spindle stop soft key SSTOP (F034.7)
Spindle counterclockwise soft key SCCW (F035.7)
Select the stop soft key MSTOP (F035.6)
Auxiliary function locking soft key AFLO (F035.5)
Program skip section soft key BDTO (F035.4)
Single program segment soft key SBKO (F035.3)
Machine lock soft key MLKO (F035.2)
DRNO (F035.1)
Fast moving soft key QFAST (F035.0)
Feed multiplying rate increase soft key FEED+(F036.0)
Feed multiplying rate decrease soft key FEED - (F036.1)
Fast multiplying soft key FAST+(F036.4)
Fast multiplying soft key FAST - (F036.5)
Spindle multiplying soft key S+(F036.6)
● Signal type: NC → PLC
● Signal function: NC sets the above F signal and then transmits it to
PLC; PLC sets the corresponding G signal according to the F signal
status, transmits it to NC, and selects the corresponding function.
● Signal address
Chapter 12 Measurement
12.1 Jump function
As with G01, the axis movement can be specified after the G31 code to
command linear interpolation. If an external jump signal is input during
the execution of this command, the execution of this command is
interrupted and the next program segment is executed. When the
measuring end point is not programmed, but the processing is
completed with the signal command from the machine tool, the jump
function is used. For example, when grinding. The jump function can
also be used to measure the workpiece size. The coordinate values
when the jump signal is turned on can be used in the user macro
program because they are stored in the system variables # 5061 to #
5068 of the user macro program, as follows:
#5011 Coordinate value of the first axis
#5012 Coordinate value of the second axis
#5013 Coordinate value of the third axis
Jump signal SKIPP (G006.6)
● Signal type: PLC → NC
● Signal function: this signal ends skip cutting. That is, in a block
containing G31, the position where the jump signal becomes "1" is
stored in the user macro variable. At the same time, the motion code of
the program segment is ended.
When the jump signal becomes "1", the controlled device works as
follows:
A. When the program segment includes the skip processing code G31,
the control device reads and stores the signal as the current position of
the code axis in era 1. The control unit stops the movement of the axis,
and then clears the remaining movement distance of the code axis in
this block.
B. The jump signal is monitored not for its rising edge, but for its state. In
this way, if the jump signal continues to be "1", when the next jump
cutting is instructed, it is considered that its jump condition is met
immediately.
● Precautions
Jump signal width shall be at least 10ms.
● Signal address
Operation Chapter 1 PLC Interface Display

Chapter III Operation


Operation Chapter 1 PLC Interface Display

Chapter 1 PLC Interface Display


1.1 Automatic operation when PLC is powered on
After the system is powered on, PLC starts to run: in the first cycle,
R510.0 will be used to conduct a cycle for the network line where it is
located, and then the value of R510.0 will be reset to "0". The user cannot
output it. The value of the holding relay is the last output value before the
PLC stops running.
Note: In the following description, the keys in<>are panel keys; The menu title on the right is
in []; Indicates that there is a sub menu in the menu; All operations of PLC shall be carried
out after obtaining the authority of the machine tool manufacturer or above in MDI mode,
and other authorities can only be viewed, searched and tracked.

1.2 PLC interface display


1.2.1 PLC information interface

1. Press the "Ladder Diagram" key on the panel to switch to the PLC
information page, as shown in Fig. 1-2-1-1.
2. Press the page turning key on the panel under the PLC information
interface to enter the next PLC information interface, as shown in the
following figure:

(1) When the system is powered on for initialization, the number of the
ladder file currently running is set by the data parameter. If the format is
incorrect, the file will be deleted and rebuilt. You need to carefully specify
the file number of the running ladder. The file name of all ladder drawing
files must be "ladderXX. grp" (XX means number), otherwise the files will
not be recognized by the system. The file format is specified by the
system, and users cannot modify it outside the system, otherwise it may
be deleted or unrecognized.
(2) Selection of ladder diagram file. Move the cursor or enter "LX"/"LXX"
(X/XX is a number) to specify the file name. When pressing the "Enter"
key, the system will detect whether "X"/"XX" is a known file number. If it is
not detected, the ladder file will be created according to the file name
"ladder0X. grp" or "ladderXX. grp". When creating a new file, the system
automatically generates two function blocks, "END1" and "END2", so
that users can continue to operate the ladder diagram file (if the file is
opened without conversion, the instruction list will always be empty).
After opening a ladder diagram for editing, the system will automatically
save the current file when opening another file without saving it. Before
saving, the system will first check the ladder diagram syntax. If an error is
detected, the system will give up saving.
(3) The file header contains the basic information of the file, such as the
number of lines and steps. The step information is updated only after the
conversion, otherwise it will always be the information when the file is
opened. To edit the currently running ladder diagram, you need to stop its
running state first. When the cursor stays at the position of editing file,
the user can open PLC information modification by pressing
the<Convert>key on the panel to modify the ladder diagram version
number, adaptive machine tool and ladder diagram maintainer of the file
being edited.

1.2.2 PLC ladder diagram interface


Press the "Ladder Diagram" key on the panel to switch the screen and
enter the PLC ladder diagram interface. As shown in Fig. 1-2-2-1:
Operation Chapter 1 PLC Interface Display

Contents and operations of PLC ladder diagram editing interface:


PLC ladder [ladder01]: the name of the currently running ladder.
1/1173: indicates the current position of the specified line of the cursor
in the ladder.
RUN: Operation status of ladder. Ladder diagram operation status
includes RUN/RUN, STOP/STOP, DEBUG/Commissioning
Graphic area: ladder program.
Data/SN: displays the input data. Press the<P>key on the panel to
change it into a serial number, which can be used for data query. Press
the<Cancel>key on the panel to return to the data display.
Info: Comment of cursor positioning node.
Entry Method: current working method. (Note: The ladder diagram can
only be modified in the input mode.)
You can use the page up/down key and the four direction keys on the
panel to search and locate, view or modify components.

1.2.3 PLC parameter interface


Press the "Ladder Diagram" key on the panel to switch the screen and
enter the PLC parameter interface.
As shown in Fig. 1-2-3-1:
PLC parameter interface content and operation:
RUN: ladder operation status.
Serial number: address of holding relay.
Data: Tag status of the address of the holding relay.
Entry Method: current working method. (Note: PLC parameters can only
be modified in the input mode.)

You can use the page up/down key and the four direction keys on the
panel to search and locate, and view or modify the corresponding
address.
1.2.4 PLC diagnosis interface
Press the key "Ladder Diagram" on the panel to switch the screen and
enter the PLC diagnosis interface.
(1) PLC signal diagnosis interface:
As shown in Fig. 1-2-4-1:

PLC diagnosis Interface content and operation:


Operation Chapter 1 PLC Interface Display

RUN: ladder operation status.


Serial number: diagnosis number address.
Data: The tag status of the diagnostic address. 1: Indicates that the
signal is on; 0: indicates that the signal is not connected.
Entry Method: current working method.
Use the page up/down key and the four direction keys on the panel to
locate and view the corresponding diagnostic number.
In general, this interface can only be used for searching. The user can
modify X and Y signals only after obtaining permission and setting K0.7
to 1.
(2) PLC tracking interface:
Press the [Follow up] soft key on the PLC diagnosis interface to enter the
PLC tracking interface. The PLCTRA interface consists of two parts:
"Setting" and "Tracking". The cursor can be switched by pressing
the<Convert>key on the panel.
The PLC tracking interface is shown in Figure 1-2-5-1:

PLC tracking interface content and operation


(1) Sampling settings:
pattern:
Periodic cycle: sample every time cycle.
Signal change: sample when the signal changes.
resolving power:
Enter the sampling resolution. The default value is the minimum
resolution (8ms), ranging from (8ms to 1000ms).
The input value is a multiple of 8ms.
Frame limit:
Enter the number of sampling frames. The range is displayed on the
right.
(2) Sampling conditions:
pattern:
Signal trigger: when the signal referred to by the trigger address set by
the sampling conditions changes in the specified mode, the signal is
collected.
Any change: When the signal referred to by the trigger address set by the
sampling conditions changes, the signal is collected.
Address: the input signal address is used as the trigger signal for
sampling.
Mode: input the trigger mode of the specified trigger signal.
Rising edge: The rising edge of the trigger signal is used to sample the
state of the specified signal.
Falling edge: sampling the state of the specified signal with the falling
edge of the trigger signal.
On: the state of sampling the specified signal when the trigger signal is
on.
Off: When the trigger signal is off, sample the state of the specified
signal.

(3) Stop condition:


pattern:
None: Do not stop tracing.
Buffer Full: Stop tracing when the buffer is full.
Signal triggering: stop tracking by signal triggering.
Address: Input signal address as stop trigger.
Mode: decide what trigger mode to use to stop tracking.
Rising edge: automatically stop tracking through the rising edge of
trigger signal.
Falling edge: automatically stop tracking by triggering the falling edge of
the signal.
On: When the trigger signal is on, the tracking will be stopped
automatically.
Disconnect: When the trigger signal is disconnected, the tracking will be
stopped automatically.

(4) Number of sampling frames:


The left is the sampling number at the right end of the current screen, the
middle is the sampling number when the tracking stops, and the right is
the maximum allowable sampling number.
(5) Setting address:

adopt and Move Cursor,Input the signal address to be tracked in

, 8 signals can be tracked at the same time. Any signal address


can be entered. For the R address, you can enter addresses before 256 in
the first three locations, and you can enter two addresses after 255 in the
fourth and fifth locations.
(6) Trace start/stop/clear:
(S) Start: After setting the tracking parameters correctly, press
the<S>key on the lower board to start signal tracking.
(50) Stop: Press the<L>key on the lower board to stop signal tracking.
(K) Clear: Press the<K>key on the lower panel to clear the value under
the cursor.
Operation Chapter 1 PLC Interface Display
Chapter 2 PLC Programming Operation
2.1 Overview
PLC operation is completed in the corresponding interface of the system.
All modifications to the ladder diagram must be made after obtaining the
authority of the machine tool manufacturer or above.

PLC operation is centralized in two interfaces:


1. On the PLC ladder diagram interface, the menu soft keys include: [Basic
command], [Function command], [Edit command], and [Stop stop]. Press
the "Ladder Diagram" key to switch the screen and enter the PLC ladder
diagram interface, as shown in Figure 2-1-1:

2. PLC parameter interface, menu soft keys include: [KEEP], [TMR],


[DATA], [CTR], [Download]. Press the "Ladder Diagram" key to switch the
screen and enter the PLC parameter interface, as shown in Figure 2-1-2.
Parameter modification can only be carried out after obtaining the
authority of the machine tool manufacturer or above.
Operation Chapter 2 PLC Programming Operation

2.2 Basic code


Press the [Basic Command] soft key in Figure 2-1-1 to enter the basic
command operation interface.
As shown in Fig. 2-2-1.

The basic code is divided into seven graphic displays:

Normally open contact

Normally closed contact

Output coil

Reverse output coil


Horizontal conductor

Vertical conductor

Delete the straight conductor

Auxiliary soft key:


Return: return to the parent menu

2.3 Operation description of ladder diagram


● Add component: position the cursor to the position where the
component needs to be added, then press the corresponding menu, and
then input the component name. After the data is displayed, press the
panel<Enter>key to add the corresponding component. If there is an
existing component in the current position, the added new component will
replace the existing component.
● Insert a component: position the cursor at the position where the
component needs to be inserted, press the<Insert>key on the panel,
insert a component vacancy at this position, and then add a new
component according to the steps of adding the component. The cursor
can be inserted backward in turn.
● Delete component: press the<Delete>key on the panel to delete the
current component.
● Add a vertical conducting line: press the [ ] soft key to add a vertical
conducting line at the lower right of the current cursor position.
● Delete the vertical conductive line: press the [ ] soft key to delete
the vertical conductive line at the lower right of the current cursor position.
● Add horizontal conducting line: press the [ ] soft key to add a
horizontal conducting line at the current cursor position. If there is an
element at the current position, the horizontal conducting line will replace
the existing element.
● Search: directly type the name of the component to be searched, which
is displayed in the screen data column, and press the panel key after input
Find Up, Look down.

Example of ladder programming:


1. Position the cursor at the beginning of the programmed position, press
the [ ] soft key, a symbol of normally open contact will appear at the
cursor location, input the component name X0.5 directly, press
the<Enter>key to confirm, and the component X000.5 will appear at the
current cursor position.
2. Move the cursor to the right one position, press the [ ] soft key, a
symbol of normally closed contact will appear at the cursor location, input
the component name F021.3 directly, press the<Enter>key to confirm, and
the component F021.3 will appear at the current cursor position.
Operation Chapter 2 PLC Programming Operation

3. Position the cursor at the beginning of the next line, press the [ ]
soft key, a symbol of normally open contact will appear at the cursor
location, input the component name G008.4 directly, press
the<Enter>key to confirm, and the component G008.4 will appear at the
current cursor position. Press the [ ] soft key, a symbol of normally
closed contact will appear at the cursor location, input the component
name F001.1 directly, press the<Enter>key to confirm, and the
component F001.1 will appear at the current cursor position.
4. Move the cursor one position to the right, press the [ ] soft key,
and draw a horizontal conducting line at the current cursor position;
5. Move the cursor up one position, press the [ ] soft key, and draw
a vertical conducting line at the lower right position of the current cursor;
6. Press the [ ] soft key, the system will automatically generate the
output coil, that is, the necessary horizontal conducting wire, and the
output coil will be generated on the right side of the ladder. Input the
component name G8.4 directly, press<Enter>, and press the key to
confirm. The component G008.4 appears at the current cursor position.

The ladder diagram is shown in Fig. 2-3-1:

Note: The green element in the ladder diagram, whether normally open, normally
closed or output coil, indicates that the element is in the on state, while the white
element indicates that it is in the off state. (Due to the printing problem, the dark
color in the figure is the off state, and the light color is the on state)

2.4 Function code


Press the [Function Order] soft key in Fig. 2-1-1 to enter the function
code operation interface. As shown in Fig. 2-4-1.

In the function code list, 35 PLC function codes are listed. For the format
and usage of the function code, please refer to Part II Programming. The
operation of the function code is written in accordance with the operation
instructions of 2.3 ladder diagram.
2.5 Editing Order
Press the [Edit Order] soft key in Fig. 2-1-1 to enter the editing order
operation interface. As shown in Fig. 2-5-1.

[ Insert Line]: Position the cursor to any line of the target line, and then
press the [Insert Line] soft key to insert a blank line above the line
specified by the cursor. The subsequent rows are moved down one row
in turn.
[Delete Line]: Position the cursor to the target line and press the [Delete
Line] soft key to delete the current line and move the subsequent lines
up one line in turn.
[Save]: press the [Save] soft key to save the modified ladder.
[Line Note]: Press the [Line Note] soft key to modify the current line
note of the ladder.
[Return]: return to the parent menu.

2.5 PLC operation/stop


[Stop]: PLC stops.
[Operation]: PLC operation.

2.7 PLC operation steps


PLC operation steps:
1. Press the<Set>key, and enter the password above the manufacturer
of the machine tool in the [Password] interface.
2. Press the [Ladder Diagram] key to switch the screen to enter the PLC
ladder diagram interface, and press the [Stop] soft key to stop the
currently running ladder diagram.
4. In the PLC ladder diagram interface, complete the preparation and
modification of the PLC program through [Basic Order], [Function
Order], [Edit Order] and other PLC operations. Press the [Save] soft key
to save the modified ladder. The data bar prompts: "Ladder diagram
saved successfully!" Indicates that saving is successful. If the PLC is
written incorrectly, the corresponding PLC alarm will be displayed when
saving. Please check the PLC program.
Operation Chapter 2 PLC Programming Operation

5. In the PLC ladder diagram interface, press the<Convert>key on the


panel, and the data bar will display: "Ladder diagram is being
converted...". After the conversion is successful, it will display:
"Conversion is successful!".
6. In the PLC ladder diagram interface, press the [Operation] soft key to
convert the ladder diagram into a command list and download it to CNC
for automatic operation.
Chapter 3 PLC Address and Parameter Setting
Counters, timers, data tables, holding relays and other addresses and
parameters will be used in PLC, and these addresses and parameters
need to be viewed and set in the corresponding interface. Press the
"Ladder Diagram" key to switch the screen and enter the PLC parameter
interface, as shown in Figure 3-1. Including holding relay, timer, data
sheet and counter. It is used to view and set these addresses,
parameters and data tables. (The user can set it only after entering the
debugging password and obtaining permission)

3.1 Holding relay


Press the [KEEP] soft key in Figure 33-1 to enter the viewing and setting
interface of the holding relay, as shown in Figure 3-1-1.

Interface content and operation of holding relay:


Operation Chapter 3 PLC Address and Parameter Setting
Serial number: address of holding relay.
Data: Tag status of the address of the holding relay.
1: Indicates that the address remains in the state before power failure
after power failure;
0: indicates that the address is reset to the default state after power
failure.
After modification, press the [Download] soft key to download the set
value to CNC for operation. After successful downloading, the system
displays: All parameters are successfully downloaded! When saving
error occurs, the system displays: Download failed, if the download
conditions are not met, the system displays: Illegal download
parameters! The address of the holding relay can be viewed or modified
through the page up/down key and the four direction keys on the panel.
3.2 Timer
Press the [TMR] soft key in Figure 33-1 to enter the timer viewing and
setting interface, as shown in Figure 3-2-1.

Contents and operations of timer interface:


Serial number: Timer address, cannot be changed.
Current value: the current value of the timer, which cannot be changed.
Preset value: the preset value of the timer, which can be changed.
After modification, press the [Download] soft key to download the set
value to CNC for operation. After successful downloading, the system
displays: All parameters are successfully downloaded! When saving
error occurs, the system displays: Download failed, if the download
conditions are not met, the system displays: Illegal download
parameters!
You can use the page up/down key and the four direction keys on the
panel to search and locate, view or modify the timer address.
3.3 Data sheet
Press the [DATA] soft key in Figure 3-1 to enter the data table viewing
and setting interface, as shown in Figure 3-3-1.
Content and operation of data table interface:
No.: Data sheet serial number, which cannot be changed.
Data: data table setting value, which can be changed.
After modification, press the [Download] soft key to download the set
value to CNC for operation. After successful downloading, the system
displays: All parameters are successfully downloaded! When saving error
occurs, the system displays: Download failed, if the download conditions
are not met, the system displays: Illegal download parameters! You can
use the page up/down key and the four direction keys on the panel to
search and locate, view or modify the address of the data table.
3.4 Counter
Press the [CTR] soft key in Figure 33-1 to enter the counter viewing and
setting interface, as shown in Figure 3-4-1.

Counter interface content and operation:


SN: counter address, which cannot be changed.
Operation Chapter 3 PLC Address and Parameter Setting

Current value: the current value of the counter, which cannot be


changed.
Preset value: the preset value of the counter, which can be changed.
After modification, press the [Download] soft key to download the set
value to CNC for operation. After successful downloading, the system
displays: All parameters are successfully downloaded! When saving
error occurs, the system displays: Download failed, if the download
conditions are not met, the system displays: Illegal download
parameters! You can view or modify the counter address by using the
page up/down key and the four direction keys on the panel.
Chapter 4 Instructions for Ladder Diagram Editing Software

4.1 General
At present, the system supports the supporting ladder diagram editing
software.
Ladder diagram editing software is a series of ladder diagram editors,
which mainly provides ladder diagram editing, conversion, error
checking and printing functions. This software can run on Windows 98,
Windows Me, Windows 2000, Windows XP and Windows 2003.
4.2 Software introduction
4.2.1 Start software
Ladder diagram editing software is a green software, which does not
need to be installed. Double click Lad Edit Exe to run the software.
4.2.2 Function introduction
□ File menu
The File menu includes functions such as creating, opening and saving
program files, generating executable ladder files or binary files, printing,
print preview and print settings, and listing recently opened files.
Note: In the dialog box "Edit ladder information", the columns "Ladder version number",
"Applicable machine tool" and "Last modified by" can only be expressed in English, not in
Chinese, otherwise an error will occur after transmission.

□ Edit menu
The edit menu includes the functions of cutting, copying, pasting,
searching, converting and editing ladder diagrams.
□ View menu
Controls the display and hiding of toolbars, status bars, output windows,
and command list windows.
□ Window menu
Controls the selection and layout of various window openings.
□ Help Menu
Version information of this software.

4.3 Software operation


4.3.1 Toolbar
The main view frame has two toolbars, both related to ladder editing.

4.3.1.1 Main toolbar


Installation and connection Chapter 4 Machine Tool Debugging

New ladder file

Open ladder file

Save ladder file

Cut the selection to the clipboard

Copy selection to clipboard

Paste content from clipboard

Convert ladder

Find Component

Print ladder diagram

About Dialog Boxes

4.3.1.2 Edit Toolbar

Add normally open contact

Add normally closed contact

Add horizontal conductor

Add a vertical conductive line (at the bottom right of the cursor)

Delete a single component or horizontal conductor

Delete the vertical conductive line at the lower right of the component

Add output coil

Add the output coil to reverse it

There are two methods for editing function codes:

1. Click the small arrow on the right of the button to pop up the drop-down
menu and select the function code.
2. Or click the button icon to pop up the function code selection dialog
Installation and connection Chapter 4 Machine Tool Debugging

4.3.2 Graphic selection


In the ladder diagram editing view, the cursor is represented by a black
rectangular shadow. Click the left mouse button in the graphic editing
area between the two buses, and select the location where the graphic
unit needs to be edited. As shown below:

When selecting a block, press the left mouse button at the beginning of
the block and drag it to the end line of the block. Before releasing the left
mouse button, the selected area is represented by a rectangle of dots
and lines.

After loosening, the whole ladder is inverted, which means that the
ladder within the range is selected and can be used for the next
operation, such as cutting, deleting, copying, etc.

4.3.3 Drawing Editing


4.3.3.1 Shear
After selecting the ladder area to edit, there are three ways to achieve
this operation:
1. Right click to pop up the environment menu, and then select Cut;
2. Select Edit [Alt+E] - Cut [T] in the main menu;
3. Direct shortcut key [Ctrl+X];
The cut contents are put into the clipboard. You can copy the contents on
the clipboard to the ladder by pasting.
4.3.3.2 Copy
After selecting the ladder area to be copied, there are three ways to
achieve this operation:
1. Right click to pop up the environment menu, and then select Copy;
2. Select Edit [Alt+E] --- Copy [C] in the main menu;
3. Direct shortcut key [Ctrl+C];
After the copy operation, the selected contents are put into the clipboard.
You can copy the contents on the clipboard to the ladder through the paste
operation.
4.3.3.3 Paste
After selecting the position where the ladder diagram needs to be pasted,
there are three ways to achieve this operation:
1. Click the right mouse button to pop up the environment menu, and then
select Paste;
2. Select Edit [Alt+E] --- Paste [P] in the main menu;
3. Direct shortcut key [Ctrl+V].
4.3.3.4 Delete
After selecting the ladder area to be deleted, there are three ways to
achieve this operation:
1. Right click the mouse to pop up the environment menu, and then select
the basic code [Alt+B] ---- Delete Node;
2. Click [Delete Node] on the edit bar;
3. Direct shortcut key [Delete];
4.3.3.5 Insert Row
Move the cursor to the position where you want to insert the ladder line.
There are three ways to achieve this operation:
1. Click the right mouse button to pop up the environment menu, and then
select Insert;
2. Select Edit [Alt+E] in the main menu --- Insert Row [I];
3. Direct shortcut key [Insert];
4.3.3.6 Delete Row
Move the cursor to the position where you want to delete the ladder line.
There are three ways to achieve this operation:
1. Right click to pop up the environment menu, and then select Delete
Row;
2. Select Edit [Alt+E] in the main menu --- Delete Line [D];
3. Direct shortcut key [Ctrl+Delete];
4.3.3.7 Conversion
Convert the ladder program of the current editing interface to the
instruction list program.
There are three ways to do this:
Installation and connection Chapter 4 Machine Tool Debugging

1. Select Edit [Alt+E] --- Convert [V] in the main menu;


2. Click the [Convert Ladder Diagram] button on the Edit Bar;
3. Direct shortcut key [F7];
4.3.4 Ladder notes
4.3.4.1 Ladder line notes
Double click the left mouse button outside the busbar area on the right
side of the ladder and enter comments in the edit box that appears.

4.3.4.2 Ladder element notes


Move the cursor to the position of the ladder element to be modified.
There are two ways to achieve this operation:
1. Right click the selected component and select Modify Note [Alt+M] in
the pop-up environment menu;

2. Select Edit [Alt+E] in the main menu ---- Modify Note [M].
Enter comments in the pop-up dialog box and click OK to save.

The saved comments will appear in the output window at the bottom
of the screen when selecting components, as shown below:

4.3.5 Export

After the ladder file is edited and saved, it needs to be converted.


The executable file can be generated only after the conversion is
successful. The system uses the U disk restore function to transmit it
to CNC, which is executed by the PLC of the CNC system.
Installation and connection Chapter 4 Machine Tool Debugging
appendix
Appendix 1 ES1000T Series Signal Definition

1.1 X address on CN61 input interface (standard ladder)

Pin number address function explain


Power interface Power supply 0V terminal

Overhang Overhang Overhang


Protective door detection signal
External suspension
Chuck control input
X-axis deceleration signal
Tailstock control input
Emergency stop signal
Overtravel release input message
Tool position signal T05
Tool position signal T06
Tool position signal T07
Tool position signal T08
Z-axis deceleration signal
External cycle start
Main shaft automatic shift 1st gear in place signal
Main shaft automatic shift gear 2 in position signal
Tool position signal T01
Tool position signal T02
Tool position signal T03
Tool position signal T04
Y-axis deceleration signal
4th axis deceleration signal
Fifth axis deceleration signal
Input interface Tool holder locking signal
External jump section
(Cn61)
X-axis overtravel input
Y-axis overtravel input
Z-axis overtravel input
Internal/external chuck unclamping/clamping in place signal
Internal/external chuck clamping/loosening in place signal
G31 jump signal
G36 jump signal
G37 jump signal

1.2 X address on MDI panel

The address is 6 bytes from X20 to X25. These X addresses correspond


to the key input on the MDI panel. You cannot change the signal
definition in it.
The corresponding relationship between them and keys is as follows:

Operation panel key input Operation panel key input


Edit mode key User1 key
Automatic mode key Z axis handwheel/direction selection key
Input method key Fast moving key
Machine tool zero point mode key Z axis negative direction selection key
Hand wheel mode key Spindle jogging key
Manual mode key Spindle stop key
Program zero point mode key Cooling key
Y-axis handwheel/direction selection key Lubrication key
X-axis handwheel/direction selection key User2 key
4th axis negative direction selection key X1 key
Spindle quasi stop button X10 key
Spindle clockwise rotation key X100 key
Spindle multiplying ratio+key X1000 key
Fast multiplying+key 4th axis handwheel/direction selection key
Feed rate+key X axis negative direction selection key
Cycle start key Y axis negative direction selection key
Single segment key Tool change key
Skip key Spindle counterclockwise rotation key
Machine lock key Spindle magnification - key
Auxiliary lock key Fast multiplying - key
Empty run key Feed rate - key
Select Stop key Feed holding key
1.3 Y address on CN62 output interface (standard ladder):

Pin number address function explain


Power interface Power supply 0V terminal

Power interface Power supply +24V terminal


Cooling output
Lubrication output
retain
Spindle rotates counterclockwise (forward)
Spindle rotates clockwise (reverses)
Spindle stop
Spindle clamping
Spindle brake
Spindle mechanical gear output 1
Spindle mechanical gear output 2
Spindle mechanical gear output 3
Spindle mechanical gear output 4
Chuck clamping output
Chuck release output
Tool holder forward rotation
Tool holder reversal
Output interface Cutterbed brake
(Cn62) Tool table pre indexing coil
Tricolor light yellow light
Three color light green light
Three color light - red light
Tailstock entrance
Tailstock retraction
retain
retain
retain
retain
retain
retain
retain
retain
retain
1.4 Y address on MDI panel

Keyboard indicator output PLC address Keyboard indicator output


Edit mode light User1 lamp
Automatic mode lamp Z-axis handwheel/direction selection light
Input mode lamp Fast moving lamp
Machine tool zero point mode lamp Spindle jog light
Handwheel mode lamp Spindle stop lamp
Manual mode lamp Cooling lamp
Program zero point mode lamp Lubrication lamp
Y-axis handwheel/direction light User2 lamp
X-axis handwheel/direction selection lamp X1 lamp
Spindle quasi stop lamp X10 lamp
Spindle clockwise rotation lamp X100 lamp
Cycle start lamp X1000 lamp
Single segment lamp 4th axis handwheel/direction selection light
Skip section lamp X axis negative direction selection lamp
Machine lock light Y-axis negative direction selection lamp
Auxiliary lock light Tool change lamp
Empty running lamp Spindle counterclockwise rotation lamp
Select stop light Feed holding lamp

1.5 F signal

OP: Automatic operation signal


SA: Servo ready signal
STL: cycle start lamp signal
SPL: Feed pause light signal

MA: CNC ready signal


TAP: tapping signal
ENB: Spindle enable signal
DEN: distribution end signal
RST: reset signal
AL: Alarm signal

MDRN: empty operation detection signal


CUT: cutting feed signal
MSTOP: Select stop detection signal
SRNMV: program start signal
THRD: thread cutting signal
RPDO: rapid feed signal

MEDT: memory edit selection detection signal


MMEM: Automatic operation selection detection signal
MRMT: DNC operation selection detection signal
MMDI: Manual data input selection detection signal
MJ: JOG feed selection detection signal
MH: Handwheel feed selection detection signal
MINC: incremental feed selection detection signal

MPST: return program starting point detection signal


MREF: Detection signal of manual return to reference point
MAFL: auxiliary function locking detection signal
MSBK: Single program segment detection signal
MABSM: Manual absolute value detection signal
MMLK: All axis machine tool locking detection signal
MBDT: skip detection signal of optional program segment

TF: Tool function strobe signal


SF: Spindle speed strobe signal
MF: auxiliary function strobe signal

Dm00: M00 decoding signal


DM01: M01 decoding signal
DM02: M02 decoding signal
DM30: M30 decoding signal

Mb07: Auxiliary function code MB07


MB06: Auxiliary function code MB06
MB05: Auxiliary function code MB05
MB04: Auxiliary function code MB04
MB03: Auxiliary function code MB03
MB02: Auxiliary function code MB02
MB01: Auxiliary function code MB01
MB00: Auxiliary function code Mb00
PDBG: PLC enters debugging mode
DRUN: switching mode inhibit signal

EN5T: 5th axis selection


EN4T: 4th axis selection
ENY: Y axis selection

Ar07: Actual speed of spindle AR07


AR06: actual speed of spindle AR06
AR05: actual speed of spindle AR05
AR04: actual speed of spindle AR04
AR03: Actual speed of spindle AR03
AR02: Actual speed of spindle AR02
AR01: Actual speed of spindle AR01
AR00: actual spindle speed Ar00

Ar15: actual speed of spindle AR15


AR14: Actual speed of spindle AR14
AR13: Actual speed of spindle AR13
AR12: Actual speed of spindle AR12
AR11: Actual spindle speed AR11
AR10: actual spindle speed AR10
AR09: actual spindle speed AR09
AR08: actual speed of spindle Ar08

BCLP: 4TH axis indexing table clamping signal


BUCLP: 4TH axis indexing table release signal

MST: Shielded external cycle start signal


MSP: Shielding external suspension signal
MESP: shield external emergency stop signal

Sb07: Spindle speed code signal SB07


SB06: Spindle speed code signal SB06
SB05: Spindle speed code signal SB05
SB04: Spindle speed code signal SB04
SB03: Spindle speed code signal SB03
SB02: Spindle speed code signal Sb02
Sb01: Spindle speed code signal SB01
SB00: spindle speed code signal Sb00

Tb07: Tool function code signal TB07


TB06: Tool function code signal TB06
TB05: Tool function code signal TB05
TB04: Tool function code signal TB04
TB03: Tool function code signal TB03
TB02: Tool function code signal TB02
TB01: Tool function code signal TB01
TB00: Tool function code signal Tb00

R08O: S12 bit code signal R08O


R07O: S12 bit code signal R07O
R06O: S12 bit code signal R06O
R05O: S12 bit code signal R05O
R04O: S12 bit code signal R04O
R03O: S12 bit code signal R03O
R02O: S12 bit code signal R02O
R01O: S12 bit code signal R01O

R12O: S12 bit code signal R12O


R11O: S12 bit code signal R11O
R10O: S12 bit code signal R10O
R09O: S12 bit code signal R09O

X1000: step X1000 soft key


X100: step X100 soft key
X10: step X10 soft key
X1: step X1 soft key
RGSPM: Spindle rotation in rigid tapping
RGSPP: Spindle forward rotation in rigid tapping

RTAP: rigid tapping mode signal

SSTOP: Spindle stop soft key


SCW: Spindle forward rotation soft key
Z -: Z-soft key
Z+: Z+soft key
X -: X - soft key
X+: X+soft key

SCCW: Spindle counterclockwise soft key


MSTOP: Select stop soft key
AFLO: Auxiliary function locking soft key
BDTO: program skip soft key
SBKO: single program segment soft key
MLKO: Machine lock soft key
DRNO: empty operation soft key
QFAST: Fast moving soft key

S -: Spindle magnification reduction soft key


S+: Spindle multiplying soft key
FAST -: Fast multiplying reduction soft key
FAST+: Fast multiplying soft key
FEED -: Feed rate decrease soft key
FEED+: feedrate increase soft key

Zp5: Return to reference point end signal ZP5


ZP4: Return to reference point end signal ZP4
ZP3: Return to reference point end signal ZP3
ZP2: Return to reference point end signal ZP2
ZP1: Return to reference point end signal Zp1

Mv5: axis movement signal MV5


MV4: axis movement signal MV4
MV3: axis movement signal MV3
MV2: axis movement signal MV2
MV1: axis movement signal Mv1

MVD5: shaft movement direction signal MVD5


MVD4: shaft movement direction signal MVD4
MVD3: shaft movement direction signal MVD3
MVD2: shaft movement direction signal MVD2
MVD1: shaft movement direction signal MVD1
ZRF5: Reference point establishment signal ZRF5
ZRF4: Reference point establishment signal ZRF4
ZRF3: Reference point establishment signal ZRF3
ZRF2: Reference point establishment signal ZRF2
ZRF1: Reference point establishment signal ZRF1

Zp15: 5TH axis returned to the first reference point end signal
ZP14: 4TH axis returned to the first reference point end signal
ZP13: End signal of Y-axis returning to the first reference point
ZP12: End signal of Z-axis returning to the first reference point
ZP11: End signal of X-axis returning to the first reference point

PRO5: return the program zero point end signal PRO5


PRO4: return the program zero point end signal PRO4
PRO3: return the program zero point end signal PRO3
PRO2: return the program zero point end signal PRO2
PRO1: return to program zero end signal PRO1

MSPHD: Spindle inching detection signal

SIMSPL: Simulated spindle is valid


FSCSL: Cs contour control switching end signal

MST: Shielded external cycle start signal


MSP: Shielding external suspension signal
MESP: shield external emergency stop signal

VAL5: 5 direction selection


VAL4: 4 direction selection
VALY: Y direction selection
VALZ: Z direction selection
VALX: X direction selection

Uo07: Macro output signal UO07


UO06: Macro output signal Uo06
Uo05: Macro output signal UO05
UO04: Macro output signal UO04
UO03: Macro output signal UO03
UO02: Macro output signal UO02
UO01: Macro output signal UO01
UO00: Macro output signal Uo00

Uo15: Macro output signal UO15


UO14: Macro output signal UO14
UO13: Macro output signal UO13
UO12: Macro output signal UO12
UO11: Macro output signal UO11
UO10: Macro output signal UO10
UO09: Macro output signal UO09
UO08: Macro output signal Uo08

Zp25: 5TH axis returns to the second reference point end signal
ZP24: 4TH axis returned to the second reference point end signal
ZP23: End signal of Y-axis returning to the second reference point
ZP22: End signal of Z-axis returning to the second reference point
ZP21: End signal of X-axis returning to the second reference point

Zp35: 5TH axis returned to the third reference point end signal
ZP34: 4TH axis returned to the third reference point end signal
ZP33: End signal of Y-axis returning to the third reference point
ZP32: End signal of Z-axis returning to the third reference point
ZP31: End signal of X-axis returning to the third reference point

Zp45: 5TH axis returns to the fourth reference point end signal
ZP44: 4TH axis returned to the fourth reference point end signal
ZP43: End signal of Y-axis returning to the fourth reference point
ZP42: End signal of Z-axis returning to the fourth reference point
ZP41: End signal of X-axis returning to the fourth reference point

TLIFE: The service life of all tools in the same group has reached

ESEND: signal of the number of required parts


1.6 G signal

FIN: Auxiliary function end signal

LEDT: edit lock signal


AFL: auxiliary function locking signal
LAXIS: All axes interlock signal

SKIPP: jump signal


OVC: feed rate cancellation signal
ABSM: manual absolute value signal
MSTOP: Select stop signal
SRN: program restart signal

ST: cycle start signal

ERS: external reset signal


RRW: reset and cursor return signal
SP: Feed holding signal
ESP: emergency stop signal

M12: Chuck clamping signal


M32: lubrication signal
COOL: cooling signal

Jv07: manual movement multiplying signal JV07


JV06: manual movement multiplying signal JV06
JV05: manual movement multiplying signal JV05
JV04: manual movement multiplying signal JV04
JV03: manual movement multiplying signal JV03
JV02: manual movement multiplying signal JV02
JV01: manual movement multiplying signal Jv01
Jv00: manual movement multiplying signal Jv00

Jv08: manual movement multiplying signal JV08


JV09: manual movement multiplying signal JV09
JV10: manual movement multiplying signal JV10
JV11: manual movement multiplying signal JV11
JV12: manual movement multiplying signal JV12
JV13: manual movement multiplying signal JV13
JV14: manual movement multiplying signal JV14
JV15: manual movement multiplying signal Jv15

Fv07: Feed rate multiplying signal FV07


FV06: Feed rate multiplying signal FV06
FV05: Feed rate multiplying signal FV05
FV04: Feed rate multiplying signal FV04
FV03: Feed rate multiplying signal FV03
FV02: Feed rate multiplying signal FV02
FV01: Feed rate multiplying signal FV01
FV00: Feed rate multiplying signal Fv00

Rv08: rapid feed rate signal RV08


RV07: Rapid feed override signal RV07
RV06: Rapid feed override signal RV06
RV05: rapid feed override signal RV05
RV04: Rapid feed override signal RV04
RV03: Rapid feed override signal RV03
RV02: rapid feed rate signal RV02
RV01: Rapid feed override signal Rv01

SAR: spindle speed arrival signal

DECA: 4TH axis zero return deceleration signal detection


DECY: Y-axis zero return deceleration signal detection
DECZ: Z-axis zero return deceleration signal detection
DECX: X-axis zero return deceleration signal detection

H4TH: 4TH axis handwheel feed selection signal


HY: Y-axis handwheel feed selection signal
HZ: Z-axis handwheel feed selection signal
HX: X-axis handwheel feed selection signal

RT: manual rapid feed selection signal


MP2: Handwheel multiplying signal MP2
MP1: Handwheel multiplying signal Mp1

SOV7: Spindle speed multiplying signal SOV7


SOV6: Spindle speed multiplying signal SOV6
SOV5: Spindle speed multiplying signal SOV5
SOV4: Spindle speed multiplying signal SOV4
SOV3: Spindle speed multiplying signal SOV3
SOV2: Spindle speed multiplying signal SOV2
SOV1: Spindle speed multiplying signal SOV1
SOV0: Spindle speed multiplying signal SOV0

R08I: Spindle motor speed code signal R08I


R07I: Spindle motor speed code signal R07I
R06I: Spindle motor speed code signal R06I
R05I: Spindle motor speed code signal R05I
R04I: Spindle motor speed code signal R04I
R03I: Spindle motor speed code signal R03I
R02I: Spindle motor speed code signal R02I
R01I: Spindle motor speed code signal R01I

SIND: spindle motor speed code selection signal


SGN: Spindle motor code polarity selection signal
R12I: Spindle motor speed code signal R12I
R11I: Spindle motor speed code signal R11I
R10I: Spindle motor speed code signal R10I
R09I: Spindle motor speed code signal R09I

MRDYA: Machine ready signal

SRVB: Spindle reverse signal


SFRB: spindle forward rotation signal
CON: switching signal of CS contour control

+ J4: feed axis and direction selection signal+J4


+J3: feed axis and direction selection signal+J3
+J2: feed axis and direction selection signal+J2
+J1: feed axis and direction selection signal+J1

- J4: Feed axis and direction selection signal - J4


-J3: Feed axis and direction selection signal - J3
-J2: Feed axis and direction selection signal - J2
-J1: Feed axis and direction selection signal - J1

+ L4: axis overtravel signal+L4


+L3: axis overtravel signal+L3
+L2: axis overtravel signal+L2
+L1: axis overtravel signal+L1

- L4: Shaft overtravel signal - L4


-L3: Shaft overtravel signal - L3
-L2: Shaft overtravel signal-L2
-L1: Shaft overtravel signal-L1

BEUCL: Indexing table release completion signal


BECLP: Indexing table clamping completion signal
SPD: Spindle inching function signal

Nt07: current tool No. NT07


NT06: current tool No. NT06
NT05: current tool No. NT05
NT04: current tool No. NT04
NT03: current tool No. NT03
NT02: current tool No. NT02
NT01: current tool No. NT01
NT00: current tool No. Nt00
ZRN: current working mode selection 4
DNC1: DNC operation selection signal
MD4: Current working mode selection 3
MD2: Select 2 as the current working mode
MD1: current working mode selection 1

HDT: Manual sequential tool change signal


MLK: Machine lock signal (PLC → CNC)
BDT: Program trip selection signal (PLC→ CNC)

DRN: empty running signal


KEY1: memory protection signal
SBK: Single program segment signal (PLC → CNC)

Gr2: gear selection signal


GR1: gear selection signal

CDZ: Chamfer signal


SMZ: error check signal

Ui07: Macro input signal UI07


UI06: Macro input signal UI06
UI05: macro input signal UI05
UI04: Macro input signal UI04
UI03: Macro input signal UI03
UI02: Macro input signal UI02
UI01: Macro input signal UI01
UI00: macro input signal Ui00
Appendix 2 ES1000M Series Signal Definition
2.1 X address on CN61 input interface (standard ladder)

Pin number Address Function explain


Power interface Power supply 0V terminal
Overhang Overhang Overhang
Protective door detection signal
External suspension
External manual tool clamping/loosening control
X-axis deceleration signal
retain
Emergency stop signal
Over travel release input signal
Pressure detection input signal
Spindle tool release in place signal
Spindle tool clamping in position signal
Tool magazine zero return key signal
Z-axis deceleration signal
External cycle start
Main shaft automatic shift 1st gear in place signal
Main shaft automatic shift gear 2 in position signal

Tool magazine advance to position signal


Tool magazine back to position signal
Magazine counting switch signal
Y-axis deceleration signal
4th axis deceleration signal
Tool magazine zero return to position signal
Input interface Current cutter head tool detection switch signal
(Cn61)
Spindle tool detection switch signal
X-axis overtravel input
Y-axis overtravel input
Z-axis overtravel input
Tool magazine reverse key signal
Tool magazine forward turning key signal
G31 jump signal
Tool magazine forward key signal
Tool magazine backward key signal

2.2 X address on MDI panel


The address is 6 bytes from X20 to X25. These X addresses
correspond to the key input on the MDI panel. You cannot change the
signal definition in it.
The corresponding relationship between them and keys is as follows:

Operation panel key input address Operation panel key input address
Edit mode key User1 key
Automatic mode key Z axis handwheel/direction selection key
Input method key Fast moving key
Machine tool zero point mode key Z axis negative direction selection key
Hand wheel mode key Spindle jogging key
Manual mode key Spindle stop key
DNC mode key Cooling key
4th axis handwheel/direction selection key Lubrication key
Z axis handwheel/direction selection key X1 key
Y axis negative direction selection key X10 key
Spindle quasi stop button X100 key
Spindle counterclockwise rotation key X1000 key
Spindle multiplying ratio+key 5th axis handwheel/direction selection key
Fast multiplying+key Z axis negative direction selection key
Feed rate+key 4th axis negative direction selection key
Cycle start key Tool change key
Single segment key Spindle clockwise rotation key
Skip key Spindle magnification - key
Machine lock key Fast multiplying - key
Auxiliary lock key Feed rate - key
Empty run key Feed holding key
Select Stop key
2.3 Y address on CN62 output interface (standard ladder):

Pin number Address Function explain


Power interface Power supply 0V terminal

Power interface Power supply+24V terminal


Cooling output
Lubrication output
1/0 tool unclamping/clamping
Spindle rotates counterclockwise (forward)
Spindle rotates clockwise (reverses)
Spindle stop
Spindle clamping
Spindle brake
Spindle mechanical gear output
Spindle mechanical gear output
Spindle mechanical gear output
Spindle mechanical gear output
retain
retain
retain
retain

Output interface Spindle tool release indicator


(Cn62) retain
Tricolor light yellow light
Three color light green light
Three color light - red light
retain
retain
retain
Spindle orientation output signal
Tool magazine forward rotation
MAGAZINE REVERSE
Magazine advance
Magazine retreat
Magazine backward indicator
retain
retain
2.4 Y address on MDI panel

Keyboard indicator output address Keyboard indicator output address


Edit mode light 5th axis handwheel/direction light
Automatic mode lamp X-axis handwheel/direction selection lamp
Input mode lamp Fast moving lamp
Machine tool zero point mode lamp Spindle jog light
Handwheel mode lamp Spindle stop lamp
Manual mode lamp Cooling lamp
DNC mode lamp Lubrication lamp
4th axis handwheel/direction light X1 lamp
Z-axis handwheel/direction selection light X10 lamp
Spindle quasi stop lamp X100 lamp
Spindle counterclockwise rotation lamp X1000 lamp
Cycle start lamp End lamp of the 5th axis return to zero
Single segment lamp Y-axis handwheel/direction selection light
Skip section lamp X axis negative direction selection lamp
Machine lock light Y-axis negative direction selection lamp
Auxiliary lock light Tool change lamp
Empty running lamp Spindle clockwise rotation lamp
Select stop light Feed holding lamp

2.5 F signal

OP: Automatic operation signal


SA: Servo ready signal
STL: cycle start lamp signal
SPL: Feed pause light signal

MA: CNC ready signal


TAP: tapping signal
ENB: Spindle enable signal
DEN: distribution end signal
RST: reset signal
AL: Alarm signal

MDRN: empty operation detection signal


CUT: cutting feed signal
MSTOP: Select stop detection signal
SRNMV: program start signal
THRD: thread cutting signal
RPDO: rapid feed signal

MEDT: memory edit selection detection signal


MMEM: Automatic operation selection detection signal
MRMT: DNC operation selection detection signal
MMDI: Manual data input selection detection signal
MJ: JOG feed selection detection signal
MH: Handwheel feed selection detection signal
MINC: single step feed selection detection signal

MPST: return program starting point detection signal


MREF: Detection signal of manual return to reference point
MAFL: auxiliary function locking detection signal
MSBK: Single program segment detection signal
MABSM: Manual absolute value detection signal
MMLK: All axis machine tool locking detection signal
MBDT: skip detection signal of optional program segment

TF: Tool function strobe signal


SF: Spindle speed strobe signal
MF: auxiliary function strobe signal

SCHK: syntax check execution signal

Dm00: M00 decoding signal


DM01: M01 decoding signal
DM02: M02 decoding signal
DM30: M30 decoding signal
RCT: tool change in progress

Mb07: Auxiliary function code MB07


MB06: Auxiliary function code MB06
MB05: Auxiliary function code MB05
MB04: Auxiliary function code MB04
MB03: Auxiliary function code MB03
MB02: Auxiliary function code Mb02
Mb01: Auxiliary function code MB01
MB00: Auxiliary function code Mb00

PDBG: PLC enters debugging mode


DRUN: switching mode inhibit signal

EN5T: 5th axis selection


EN4T: 4th axis selection
ENY: Z-axis selection

Zp1: X-axis return zero point end signal


ZP2: Y-axis return zero point end signal
ZP3: Z-axis return zero point end signal
ZP4: 4TH axis return zero point end signal

Ar07: Actual speed of spindle AR07


AR06: actual speed of spindle AR06
AR05: actual speed of spindle AR05
AR04: actual speed of spindle AR04
AR03: Actual speed of spindle AR03
AR02: Actual speed of spindle AR02
AR01: Actual speed of spindle AR01
AR00: actual spindle speed Ar00

Ar15: actual speed of spindle AR15


AR14: Actual speed of spindle AR14
AR13: Actual speed of spindle AR13
AR12: Actual speed of spindle AR12
AR11: Actual spindle speed AR11
AR10: actual spindle speed AR10
AR09: actual spindle speed AR09
AR08: actual speed of spindle Ar08

BCLP: 4TH axis indexing table clamping signal


BUCLP: 4TH axis indexing table release signal
MST: Shielded external cycle start signal
MSP: Shielding external suspension signal
MESP: shield external emergency stop signal

Sb07: Spindle speed code signal SB07


SB06: Spindle speed code signal SB06
SB05: Spindle speed code signal SB05
SB04: Spindle speed code signal SB04
SB03: Spindle speed code signal SB03
SB02: Spindle speed code signal SB02
SB01: Spindle speed code signal SB01
SB00: Spindle speed code signal Sb00

Tb07: Tool function code signal TB07


TB06: Tool function code signal TB06
TB05: Tool function code signal TB05
TB04: Tool function code signal TB04
TB03: Tool function code signal TB03
TB02: Tool function code signal TB02
TB01: Tool function code signal TB01
TB00: Tool function code signal Tb00

R08O: S12 bit code signal R08O


R07O: S12 bit code signal R07O
R06O: S12 bit code signal R06O
R05O: S12 bit code signal R05O
R04O: S12 bit code signal R04O
R03O: S12 bit code signal R03O
R02O: S12 bit code signal R02O
R01O: S12 bit code signal R01O

R12O: S12 bit code signal R12O


R11O: S12 bit code signal R11O
R10O: S12 bit code signal R10O
R09O: S12 bit code signal R09O

X1000: step X1000 soft key


X100: step X100 soft key
X10: step X10 soft key
X1: step X1 soft key
RGSPM: Spindle rotation in rigid tapping
RGSPP: Spindle forward rotation in rigid tapping

MTAP: G63 tapping mode signal


DTAP: signal during rigid tapping
RTAP: rigid tapping mode signal

SSTOP: Spindle stop soft key


SCW: Spindle forward rotation soft key
Z -: Z-soft key
Z+: Z+soft key
Y -: X - soft key
Y+: X+soft key
X -: X - soft key
X+: X+soft key

SCCW: Spindle counterclockwise soft key


MSTOP: Select stop soft key
AFLO: Auxiliary function locking soft key
BDTO: program skip soft key
SBKO: single program segment soft key
MLKO: Machine lock soft key
DRNO: empty operation soft key
QFAST: Fast moving soft key

S -: Spindle magnification reduction soft key


S+: Spindle multiplying soft key
FAST -: Fast multiplying reduction soft key
FAST+: Fast multiplying soft key
FEED -: Feed rate decrease soft key
FEED+: feedrate increase soft key

Zp5: Return to reference point end signal ZP5


ZP4: Return to reference point end signal ZP4
ZP3: Return to reference point end signal Zp3
Zp2: Return to reference point end signal ZP2
ZP1: Return to reference point end signal Zp1

Mv5: axis movement signal MV5


MV4: axis movement signal MV4
MV3: axis movement signal MV3
MV2: axis movement signal MV2
MV1: axis movement signal Mv1

MVD5: shaft movement direction signal MVD5


MVD4: shaft movement direction signal MVD4
MVD3: shaft movement direction signal MVD3
MVD2: shaft movement direction signal MVD2
MVD1: shaft movement direction signal MVD1

ZRF5: Reference point establishment signal ZRF5


ZRF4: Reference point establishment signal ZRF4
ZRF3: Reference point establishment signal ZRF3
ZRF2: Reference point establishment signal ZRF2
ZRF1: Reference point establishment signal ZRF1

Zp15: 5TH axis returned to the first reference point end signal
ZP14: 4TH axis returned to the first reference point end signal
ZP13: End signal of Z-axis returning to the first reference point
ZP12: End signal of Y-axis returning to the first reference point
ZP11: End signal of X-axis returning to the first reference point

PRO5: return the program zero point end signal PRO5


PRO4: return the program zero point end signal PRO4
PRO3: return the program zero point end signal PRO3
PRO2: return the program zero point end signal PRO2
PRO1: return to program zero end signal PRO1

MSPHD: Spindle inching detection signal

SIMSPL: Simulated spindle is valid


FSCSL: Cs contour control switching end signal

VAL5: 5 direction selection


VAL4: 4 direction selection
VALY: Z direction selection
VALZ: Y direction selection
VALX: X direction selection

Uo07: Macro output signal UO07


UO06: Macro output signal UO06
UO05: Macro output signal UO05
UO04: Macro output signal UO04
UO03: Macro output signal UO03
UO02: Macro output signal UO02
UO01: Macro output signal UO01
UO00: Macro output signal Uo00

Uo15: Macro output signal UO15


UO14: Macro output signal UO14
UO13: Macro output signal UO13
UO12: Macro output signal UO12
UO11: Macro output signal UO11
UO10: Macro output signal UO10
UO09: Macro output signal UO09
UO08: Macro output signal UO08

Zp25: 5TH axis returns to the second reference point end signal
ZP24: 4TH axis returned to the second reference point end signal
ZP23: End signal of Z-axis returning to the second reference point
ZP22: End signal of Y-axis returning to the second reference point
ZP21: End signal of X-axis returning to the second reference point

Zp35: 5TH axis returned to the third reference point end signal
ZP34: 4TH axis returned to the third reference point end signal
ZP33: End signal of Z-axis returning to the third reference point
ZP32: End signal of Y-axis returning to the third reference point
ZP31: End signal of X-axis returning to the third reference point
Zp45: 5TH axis returns to the fourth reference point end signal
ZP44: 4TH axis returned to the fourth reference point end signal
ZP43: End signal of Z-axis returning to the fourth reference point
ZP42: End signal of Y-axis returning to the fourth reference point
ZP41: End signal of X-axis returning to the fourth reference point

ESEND: signal of the number of required parts

2.6 G signal

FIN: Auxiliary function end signal

LEDT: edit lock signal


AFL: auxiliary function locking signal
LAXIS: All axes interlock signal

SKIPP: jump signal


OVC: feed rate cancellation signal
ABSM: manual absolute value signal
MSTOP: Select stop signal
SRN: program restart signal

ST: cycle start signal

SP: Feed holding signal


ESP: emergency stop signal

M12: 0/1: Spindle tool unclamping/clamping signal


M32: lubrication signal
COOL: cooling signal

Jv07: manual movement multiplying signal JV07


JV06: manual movement multiplying signal Jv06
Jv05: manual movement multiplying signal JV05
JV04: manual movement multiplying signal JV04
JV03: manual movement multiplying signal JV03
JV02: manual movement multiplying signal JV02
JV01: manual movement multiplying signal JV01
JV00: manual movement multiplying signal Jv00

Jv08: manual movement multiplying signal JV08


JV09: manual movement multiplying signal JV09
JV10: manual movement multiplying signal JV10
JV11: manual movement multiplying signal JV11
JV12: manual movement multiplying signal JV12
JV13: manual movement multiplying signal JV13
JV14: manual movement multiplying signal JV14
JV15: manual movement multiplying signal Jv15

Fv07: Feed rate multiplying signal FV07


FV06: Feed rate multiplying signal FV06
FV05: Feed rate multiplying signal FV05
FV04: Feed rate multiplying signal FV04
FV03: Feed rate multiplying signal FV03
FV02: Feed rate multiplying signal FV02
FV01: Feed rate multiplying signal FV01
FV00: Feed rate multiplying signal Fv00

Rv08: rapid feed rate signal RV08


RV07: Rapid feed override signal RV07
RV06: Rapid feed override signal RV06
RV05: rapid feed override signal RV05
RV04: Rapid feed override signal RV04
RV03: Rapid feed override signal RV03
RV02: rapid feed rate signal RV02
RV01: Rapid feed override signal Rv01

SAR: spindle speed arrival signal

DECA: 4TH axis zero return deceleration signal detection


DECY: Z-axis zero return deceleration signal detection
DECZ: Y-axis zero return deceleration signal detection
DECX: X-axis zero return deceleration signal detection

H4TH: 4TH axis handwheel feed selection signal


HY: Z-axis handwheel feed selection signal
HZ: Y-axis handwheel feed selection signal
HX: X-axis handwheel feed selection signal

RT: manual rapid feed selection signal


MP2: Handwheel multiplying signal MP2
MP1: Handwheel multiplying signal Mp1

SOV7: Spindle speed multiplying signal SOV7


SOV6: Spindle speed multiplying signal SOV6
SOV5: Spindle speed multiplying signal SOV5
SOV4: Spindle speed multiplying signal SOV4
SOV3: Spindle speed multiplying signal SOV3
SOV2: Spindle speed multiplying signal SOV2
SOV1: Spindle speed multiplying signal SOV1
SOV0: Spindle speed multiplying signal SOV0

R08I: Spindle motor speed code signal R08I


R07I: Spindle motor speed code signal R07I
R06I: Spindle motor speed code signal R06I
R05I: Spindle motor speed code signal R05I
R04I: Spindle motor speed code signal R04I
R03I: Spindle motor speed code signal R03I
R02I: Spindle motor speed code signal R02I
R01I: Spindle motor speed code signal R01I

SIND: spindle motor speed code selection signal


SGN: Spindle motor code polarity selection signal
R12I: Spindle motor speed code signal R12I
R11I: Spindle motor speed code signal R11I
R10I: Spindle motor speed code signal R10I
R09I: Spindle motor speed code signal R09I
MRDYA: Machine ready signal

SRVB: Spindle reverse signal


SFRB: spindle forward rotation signal

CON: switching signal of CS contour control

+ J4: feed axis and direction selection signal+J4


+J3: feed axis and direction selection signal+J3
+J2: feed axis and direction selection signal+J2
+J1: feed axis and direction selection signal+J1

- J4: Feed axis and direction selection signal - J4


-J3: Feed axis and direction selection signal - J3
-J2: Feed axis and direction selection signal - J2
-J1: Feed axis and direction selection signal - J1

+ L4: axis overtravel signal+L4


+L3: axis overtravel signal+L3
+L2: axis overtravel signal+L2
+L1: axis overtravel signal+L1

- L4: Shaft overtravel signal - L4


-L3: Shaft overtravel signal - L3
-L2: Shaft overtravel signal-L2
-L1: Shaft overtravel signal-L1

BEUCL: Indexing table release completion signal


BECLP: Indexing table clamping completion signal
SPD: Spindle inching function signal

Nt07: current tool No. NT07


NT06: current tool No. NT06
NT05: current tool No. NT05
NT04: current tool No. NT04
NT03: current tool No. Nt03
Nt02: current tool No. NT02
NT01: current tool No. NT01
NT00: current tool No. Nt00

ZRN: current working mode selection 4


DNC1: DNC operation selection signal
MD4: Current working mode selection 3
MD2: Select 2 as the current working mode
MD1: current working mode selection 1

HDT: Manual sequential tool change signal


MLK: Machine lock signal (PLC → CNC)
BDT: Program trip selection signal (PLC→ CNC)

DRN: empty running signal


KEY1: memory protection signal
SBK: Single program segment signal (PLC → CNC)
Gr2: gear selection signal
GR1: gear selection signal

CDZ: Chamfer signal


SMZ: error check signal

Ui07: Macro input signal UI07


UI06: Macro input signal UI06
UI05: macro input signal UI05
UI04: Macro input signal UI04
UI03: Macro input signal UI03
UI02: Macro input signal UI02
UI01: Macro input signal UI01
UI00: macro input signal Ui00
Appendix 3 Definition of Spindle Interface

Spindle pulse signal


Spindle direction signal
5th axis/spindle abnormal alarm signal
Spindle ready signal
Spindle zero point signal
Analog voltage output 1
Analog voltage output 2
Spindle setting signal
Spindle enable signal
PLC address, only this low level is valid
PLC address

Spindle interface CN15 (25 core DB hole)

You might also like