PLC User Manual (CNC System) V2.0
PLC User Manual (CNC System) V2.0
V2.0
Chapter 1 PROGRAMMING
1.1 PLC Specification
Specification SZGHTECH CNC System
Programming Language Ladder
Programming Software GHPLCS
Programming Grade 2
Executive Cycle of Program 8ms
Basis code average treatment time <1.5us
Max Step of Program 4700 steps
Programming Instruction Basic Instruction + Function Instruction
Internal Assistant Relay (R) R000~R511
PLC Alarm Detection (A) A000~A031
Timer(T) T000~T127
CUNTER (C) C000~C127
Data Base (D) D000~D255
Nonvolatile relay (K) K000~K063
Counter preset value data register (DC) DC000~DC127
Timer preset value data register (DT) DT000~DT127
Subprogram (P) P000~P099
Mark (L) L000~L099
Input signal of NC side (F) F000~F063
Signal outputs to the NC side (G) G000~G063
Input(X) X000~X063
Output(Y) Y000~Y047
1.2 Sequential program
The sequential program is defined to logically control refer to the
machine and relative devices.After converting the program into a certain
format, CPU can be decoded and arithmetic processing,and stored in
RAM. And CPU read the codes in high speed and executed by the
arithmetic operation.
Sequential program is compiled in the beginning of ladder.
1
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
The interface can be distributed after control target is defined and the
A: Emulator
B: Diagnosis of CNC
After finished well & restore into system, we could observe if the
C: Actual Run
2
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
The differences between the relay circuit and PLC programming operation are
shown below in the Fig. 2.1 (b) and Fig. 2.1 (c).
PLC on CNC system is separately performed in the PLC-ARM7 The 1ms of each
8ms is the communication time for reading the PLC data from the CNC The 5ms is
that the PLC gains the system control signal (F X). and uploads the control result data
(G. Y parameter) external port 10 PLC is always performed me ladder diagram
calculation Other than the interruption of hie response exchange data.
When the last partition value of the 2nd level program of the n is performed, the
program is then executed from the beginning of the program. In this case. when the
partition value is n, the performance time of one cycle is 8*n ms. The 1st level
program performs once each 8ms; the 2 level program performs once each 8.n ms. If
its steps of the 1st level program is increased, and therefore the steps of the 2nd level
4
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
program within 8ms should be reduced correspondingly; the partition value may be
increased, and the treatment time of the overall program will be longer. So, the
compiling of the 1g level program should be shorter.
Fig. 2-4-1
2) Nesting
One subprogram can be performed the task by calling another one.
Fig 2-4-2
3) Conditional branch The main program is performed circularly, and checks
whether its conditions are suitable. The corresponding subprograms are performed
under these conditions, vice versa.
Fig. 2-4-3
5
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 2-5-1
The treatment of the Output signals:
Fig. 2-5-2
6
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
2.5.1 Input Signal Treatment
(1) NC input register
The NC input signals from the NC are memorized into the NC input register,
which are transferred to PLC each 8ms. The 1st level program performs the
corresponding treatment using state of these signals.
(2)Machine tool input register
The machine tool Input register is scanned and memorized its input signal from
the machine each 8ms. The 1st level program is also performed the corresponding
treatment by using this signals directly.
(3)The 2nd level program input register
The 2nd level program input signal register is also called the 2no level program
synchronic input signal register. Wherein, the stored input signal is treated by the 2nd
level program. This signal state in the register is synchronic with the 2nd level one.
The signals both in the NC and machine tool input register can be locked to the
2nd level program input latch, as long as the 2nd level program performs. The signal
state in this latch keeps invariable during the performance of the 2m level program
2.5.2 The Treatment of the Output Signal
(1) NC output register
The output signal transfers to the NC output register from the PLC each 8ms.
(2) Machine tool output register
The signal memorized in the machine tool Output register conveys to the
machine tool each 8ms
Note: The signal states. such as the NC input register. NC output register. machine input
register and machine output register, which can be displayed by the self-diagnosis function. The
diagnosis number is the address number in the sequence programming.
2.5.3 The Distinguish of the Signal State between 1st level & 2nd level
As for the same input signal, their states may different between the 1st and 2nd
level programming, that is the reason that different registers are used between two
levels programming. Namely, the input signal used with the 2nd level program is the
one of the 1st level who is locked. And therefore, the signal in the 2nd level program
is later than the 1st level one. At the worst case, one 2nd level program performance
cycle can be lagged.
It is better to remember this point when programming the ladder diagram.
Fig. 2-5-3-1
7
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
A=1 performs the 1st level program when the 1st 8ms is performed, then B=1.
And therefore, the 2nd level program is performed, the A=1 is latched to the 2nd level
program, and then the first partition of the 2nd level program is completed.
A turns into 0 to perform the 1st level program when the 2nd 8ms is performed,
then B=0. And therefore, the 2nd partition of the 2nd level program is performed; in
this case, the state of the A is still latched as the one last time. So, C=1.
In this way, the state both B and C are different.
2.6 Interlocking
In the sequence control, the interlocking is very important from the safety issue.
It is necessary to use the interlocking in the sequence control programming.
Simultaneously, the hard interlocking is used in the relay control circuit of the strong
electric cabinet of the machine tool sides. This is the reason that the interlocking is
disabled when the hardware of the performance sequence programming malfunctions,
even if the interlocking is logically used in the sequence program (software). And
therefore, the interlocking can be ensured the safety for the user, and prevent the
machine tool from damaging in the strong electric cabinet of the machine sides.
8
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Chapter 3 ADDRESS
Addresses are used for distinguishing signals. Different addresses
separately correspond to input/output signal at machine side and CNC
side, internal relay, counter, timer, holding relay and data list. An address
number is consisted of address type, address number and bit number as
follows:
X 01
Bit Number
Address Type
Address type: X , Y , R ,F, G, K, A, D, C, & T
Bit Number: 0 ~ 999
Address number: Decimal number means one byte.
Bit number: Octonary number system, 0~7 are separately indicated the
Fig. 3-5-1
System program administration area:
R510
The signal of R510.0 address is set to 1 when PLC starts and restarts,which is
10
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
used the signal set by the initial user. The R510.0 is reset to 0 after the ladder diaram
is performed once.
R511 (System timer)
The following four signals can be used for system timer:
Note: When PLC enters the debugging mode. All of the external alarms are canceled, and
the machine interlocking signals are then canceled, the tool-change code can not be performed.
The parameter can be modified only when comprehending the parameter, so that the damage in
the machine tool or injury of the person may occur.
11
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
13
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
diagram. The ladder diagram consists of relay contact and function code. The logic
relationship in the ladder diagram composes of sequence program. There are two
methods of the sequence program input: one is that the input method uses the
mnemonic symbol language (The system is not temporarily supported the PLC
instruction code of the RD, AND and OR); the other one that is used the relay symbol.
The programming can be compiled using ladder diagram, and do not comprehend the
Actually, the sequence program inside the system can be converted into
The basis codes are commonly used codes when designing the sequence
The basis instruction codes of the GH CNC System are shown below:
RD Left shift one bit of the content of the register, the signal state specified
RD.NOT Left shift one bit of the content of the register, the signal state specified
WRT.NOT Output the logic calculation result after NOT to the specified address.
OR Logic OR
OR.STK Right shift one bit of the stacked memory after ST0 and ST1 logic OR
AND.STK Right shift one bit of the stacked memory after ST0 and ST1 logic AND
14
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
RD Left shift one bit of the content of the register, the signal
RD.NOT Left shift one bit of the content of the register, the signal
state specified
specified address.
Code explanation
WRT and WRT.NOT codes are the coil drive code of the output relay and
The parallel WRT instruction can be used multiply, but it cannot outputs with
multi-coil .
Programming Example
Program Explanation:
OR Logic OR
Instruction explanation
A: OR, OR.NOT can be connected to one contact in parallel. When more than two
contacts are connected in series and the serial loop is connected with other loop in
B: The system executes OR, OR.NOT from its current step with RD, RD.NOT in
parallel.
Programming Example
Fig. 4-3-1
16
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
OR.STK Right shift one bit of the stacked register after ST0
Instruction explanation
OR.STK code is the separate code without any address.
A: Serial loop block is defined to its loop combined by more than contacts in series.
When the serial loop is connected in parallel, starting point of branch uses RD and its
end point uses OR.STK.
B: ORB is sole instruction without address.
Programming Example
Program explanation:
There are three branches ①, ② and ③ from the left bus to the node N1.
The branches ① and ② are series connection circuit block. When the series
connection circuit block is performed between bus to node or among the nodes, other
than the first branch, use the RD code when the following branch is ended. The
branch ③ is not a series connection circuit block, which can be used by the OR
code.
OR. STK and AND. STK are the code without operation component, which
indicates the OR , AND relationships between circuit blocks.
4.5 AND.STK INSTRUCTION
Mnemonic code and function
Mnemonic code Function Ladder Symbol
AND.STK Right shift one bit of the stacked memory after ST0
and ST1 logic AND
Instruction explanation
Use the AND. STK coded when the branch circuit (parallel circuit block) is
connected with series connection with the front of the circuit. The start of the
branch is used RD, RD.NOT code. Use the AND. STK code is connected with
17
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
series connection with the front of the circuit after the series connection circuit
block is executed.
AND. STK code is the separate code without any address.
Programming Example
Program explanation:
As for the above mentioned ladder diagram and instruction table,(1)OR.STK
indicates parallel connection of the series connection circuit block in the block②,
(2)AND.STK expresses the series connection between circuit block ① and ②.
18
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
19
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Format:
Fig. 5-2-1
CALL has the following additional functions; The subprogram may be nested up to 18
levels by other subprograms, but if a dead cycle is made by the closed loop calling, an
alarm will be issued by system. Therefore to execute the data volume under the
control, the allowable subprogram calling times are 100, and the subprogram calling
in the 1st level is disabled. Alarm will be issued for the instructions or network
Format:
Fig. 5-3-1
Control Condition:
It has the following characteristics and Limits: The subprogram may be nested up to
18 levels by other subprograms, but if a dead cycle is made by the closed loop calling,
20
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
an alarm will be issued by system Therefore to execute the data volume under the
control. the allowable subprogram calling times are 100. and the subprogram calling
in the 1sE level is disabled. Alarm will be issued for the instructions or network
between SP and END2. after SPE and before SP which can't be executed by system.
Format:
Fig. 5-4-1
0-99.
5.5 SP(Subprogram)
Function: The SP functional instruction is used to create a subprogram. A
subprogram number is specified as a subprogram name. SP is used with the SPE
functional instruction to specify the subprogram range.
Note:
1. A subprogram must be written after END2.
2. Another subprogram cannot be nested into a subprogram.
Format:
Fig. 5-5-1
Parameter:
Subprogram number: specifies the called subprogram number. Range: 0~99.
Fig. 5-6-1
21
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Example:
Fig. 5-6-2
Format:
Fig. 5-7-1
Control condition:
ACT=0 , keep add.b invariably.
ACT = 1, set add.b to 1.
Parameter: Add.b: Reset element address bit can be the output coil, Add= Y, G, R, K,
A.
Control condition:
ACT=0, keep add.b invariably.
ACT=1, Set add.b to 1.
Parameter: Add.b: reset element address bit can M the output coil. Add=Y, G, R, K, A.
22
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Control conditions:
ACT=0 : The next instruction after the JMPB instruction is executed.
ACT=1 : Jump to the specified label and executes the next instruction behind the
label.
Parameter:Lx:Specifies the label of the jump destination.A value from 0 10 99 can be
specified.
Fig. 5-10-1
Parameter: xx: specifies the label of the jump destination. Label number range: 0~99.
Example:
Fig. 5-10-2
23
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig5-11-1
Control condition:
ACT=0: turns off the timer relay.
ACT=1: initiates the timer. i.e. timing from 0.
Detailed functions:
Fig. 5-11-2
Parameter:
TIMER: timer serial number is named with xxx which are numbers (0~127).
Output: W: output coil.
W=1 when the output reaches the preset value.
W=0 when the output does not reach the preset value.
Note:Timer is executed each 8ms,take ms as its setting unit, and 8ms is taken as execution base.
Those time less than 8ms are taken as 8ms. i.e. it is set for 54ms, 54=6*8+6, 2ms is
needed to be added, so the actual execution time is 56ms.
The time of the timer is set under the 【TMR】of 【PLCPAR】in PRG window.
The system will automatically detect the range of the sequence number of the timer,
alarm will be issued for those duplicate or beyond range sequence numbers.
Control condition:
ACT=0 : turns off the timer relay.
ACT=1 : initiates the timer.
Detailed functions:
24
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Parameter:
TIMER: timer serial number is named with xxx which are numbers(0~127)
Output:
W: coil output. W=1 when the counter reaches the preset value.
Note 1: The system automatically check the counter's sequence number range. An alarm occurs
when the serial number is repetitive or exceeds its range.
Note 2: After the ladder is upgraded. the current value of the counter is cleared.
To get reliable counter counting, reset the counter by the pulse signal before counting.
Fig. 5-15-1
Control condition:
ACT=0 : resets all the output data bit.
ACT=1 : decode data. Results of processing is set in the output data address.
Parameter:
Length : Set the size of code data to the 1st digit of the parameter.
0001 : code data is in binary format of 1 byte length.
0002 : code data is in binary format of 2 byte length. code data address.
S1 : Specifies an address at which code data is stored.
S2 : Number specification decode designation. Specifies the first of the 8 (1 byte) or
16 (2 bytes) continuous numbers to be decoded.
S3 : decode result address. Specifies an address where the decoded result shall be
output. A one-byte or two-byte area is necessary in the memory for the output.
Example:
Fig. 5-15-2
When ACT=1 and F10=8, R4=0000,0001 ;
When ACT=1 and F10=9, R4=0000,0010 ;
... ...
When ACT=1 and F10=15 , R4 =1000,0000 .
25
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig.5-16-1
Table 5-16-1
S1 0 1 2 ...... 9
S2 XXX YYY AAA ......
S1 10 11 12 ...... N-1
S2 ...... ...... ...... ...... UUU
Control conditions:
Reset (RST):
RST=0: do not reset.
RST=1: reset error output W.
Activate instruction (ACT):
ACT=0: do not execute COD.
ACT=1: execute COD. Take value of “Conversion input data address(S1)” as
the table number of conversion table, take out a corresponding one version data which
corresponds to the table number from the conversion table, output the output address
used for the conversion data (S2).
Conversion Table Conversion
Conversion Table No. Conversion data Output data
1 YYY
input data 0 XXX address(S2)
address 1 YYY
2 AAA
...... ......
N-1 UUU
Fig. 5-16-2
Parameter:
Length1 : designates binary numerical size in the conversion table.
1 : Numerical data is binary 1-byte data.
2 : Numerical data is binary 2-byte data.
26
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Length2 : Capacity of conversion table data. 100 data can be made. 100 bytes when
designating 1 byte format, and 100 words when 2 byte format. All number is at most
512 bytes in COD conversion table.
S1 : Data in the conversion data table can be taken out by specifying the table number.
The address specifying the table number is called conversion input data address, and
1-byte memory is required from the specified address.
S2 : S2:Conversion data output address. Memory of the byte length specified in the
format designation is necessary from the specified address.
Output: If t here are an y abnormality when executing the C ODB instruction, W=1
Note:Size of the conversion data table is maximum 100. This conversion data table is
programmed between the parameter conversion data output address of this instruction and the
error output (W).
Fig. 5-17-1
Control condition:
ACT=0: The specified number of coils or the coils within the region specified
are unconditionally turned off (WW=0).
ACT=1: it is thee same with COM which is not executed.
Note 1: In the range specified with a COM instruction, no additional COM instruction can be
specified.
Note 2: The coil for WRT.NOT in the range specified with a COM instruction is singly set to 1
when COM ACT=0.
Note 3: Do not use JMPB,END, END2, CALL, CALLU, LBL,SSP,SPE, COM, COM between
COM and COME, otherwise, an alarm occurs.
27
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig.5-18-1
Fig. 5-19-1
Control conditions:
Specify the starting number of the rotor(CN0):
CNO=0: begins the number of the position of the rotor with 0.
CNO=1: begins the number of the position of the rotor with 1.
Select the rotation direction via the shorter path or not: (DIR):
DIR=0: no direction is selected. The direction of rotation is only forward.
DIR=1: selected. The direction of rotation is forward/backward.
Specify the operating conditions (POS):
POS=0: calculate the goal position.
POS=1: calculates the position one position before the goal position.
28
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Specify the position or the number of steps(INC):
INC=0: calculates the number of the position. If the position one position before
the goal position is to be calculated, specify INC=0 and POS=1.
INC=1: calculates the number of steps. If the difference between the current
position and the goal position is to be calculated, specify INC=1 and POS=0.
Execution instruction (ACT):
ACT= 0: the ROT instruction is not executed. W does not change.
ACT=1:executed. Normally, set ACT=0. If the operation results are required,set
ACT=1.
Parameter:
S1: Specify the rotor indexing number.
S2: Specify the address storing the current position.
S3: Specify the address storing the goal position(or instruction value), for example the
address storing the CNC output T code.
S4: Calculate the number of steps for the rotor to rotate, the number of steps up to the
position one position before, or the position before the goal. When the calculating
result is to be used, always check that if ACT=1.
Output:
W: The direction of rotation for control of rotation via the shorter path is output to W.
When W=0, the direction is forward (FOR) when 1, reverse (REV). The definition of
FOR and REV is shown in the following figure. If the number given to the rotor is
ascending, the rotation is FOR; if descending, REV. The address of W can be
determined arbitrarily. When, however, the result of W is to be used, always check
that ACT=1.
Example: Rotor rotation direction:
Fig. 5-19-2
29
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-19-3
Perform the short path rotation, and calculate the position number of previous one
position of goal position.
Current position number S2=1, position number of rotation graduation S1 = 12,
CNO=1, DIR=1 POS=1, I NC=0:
When S3=10 goal position is A, and ACT=1, S4=11, W=1.
When S3=8 goal position is B, and ACT=1, S4=9, W=1.
When S3=5 goal position is C, and ACT=1, S4=4, W=0.
When S3= 3 goal position is D, and ACT=1, S4=2,W=0.
Fig. 5-20-1
Control conditions:
Shift direction specification (DIR)
DIR=0: Left shift
DIR=1: Right shift
Condition specification (CONT)
CONT=0: do not cycle shift
CONT=1: cycle shift
30
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Reset (RST)
The shifted out data(W=1) is reset (W=0).
RST=0: W is not reset.
RST=1: W is reset (W=0).
Actuation signal (ACT)
ACT=0: do not execute SFT instruction.
ACT=1:shifting processing is done when ACT=1. For shifting one bit only,
execute an
instruction when ACT=1, and then, set ACT to 0.
Parameter:
S1: set the big shift data address which consists of a storage area with one byte.
Length: a 4-digit number, its definition is shown below:
Fig. 5-20-2
L: range: 0~8.
A : bit parameter. A=0: When ACT=1 is shifting, the shift period is one bit.
A=1: ACT is taken as a pulse signal, it is 1 from 0, shift one bit.
Output:
W : W=0: “1” was not shifted out because of the shift operation.
W=1: “1” was shifted out because of the shift operation.
Fig. 5-21-1
Control condition:
Input signal: On a rising edge(0 -> 1)of the input signal, the output signal is set to 1.
Output signal: The output signal level remains at 1 for one scanning cycle of the
ladder level
where this functional instruction is operating.
Parameter: Rising edge number
Parameter: L : rising edge number, range 0~255. Another DIFU instruction or DIFD
31
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
instruction , in the ladder uses the same number, an alarm occurs.
Operation:
Fig. 5-21-2
The system will check the sequence number of the rising edge automatically, when
the number exceeds the range or the number is duplicated, an alarm occurs.
Fig. 5-22-1
Control conditions:
Input signal: on a falling edge(1 -> 0)of the input signal, the output signal is set to 1.
Output signal: the output signal level remains at 1 for one scanning period of the
ladder level where this functional instruction is operating.
Parameter:
L : rising edge number, range 0~255. Another DIFU instruction or DIFD instruction in
the ladder uses the same number, the system will alarm.
Operation
Fig. 5-22-2
The system checks the sequence number of the falling edge automatically, when the
number exceeds the range or the number is duplicated, alarm occurs.
Fig. 5-23-1
Control conditions:
ACT=0: The COMP instruction is not executed. W does not alter.
ACT=1: The COMP instruction is executed.
Parameter:
Length: specification format( constant or address) and data length(1 or 2 bytes) for the
input data.
Fig. 5-23-2
S1, S2: content of comparison source 1 and comparison source 2. It can be
constant and also be address number.
Address number: R, X, Y, F, G, K, A, D, T, C.
Output:
W=0: input data>comparison data
W=1: input data ≤comparison data
Fig. 5-24-1
Control conditions:
ACT=0 ,the COIN instruction is not executed. W does not change.
ACT=1 ,the COIN instruction is executed.
Parameter:
Length: specification format(constant or address) and data length(1 or 2 bytes)for
input data.
33
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-24-2
S1 : The input data can be specified as either a constant or an address storing it.
S2 : Address storing of comparison data.
Output:
W : W=0: input value ≠comparison value
W=1: input value=comparison value
Fig. 5-25-1
Control condition:
ACT=0: No data is transferred.
ACT=1: The byte of specified number is transferred.
Parameter:
Length : Transferred byte n umber.
S1 : Stating byte of address or constant of source data.
Selecting transfer format according to S1:
1.S1 is constant: if S2 is single byte address, S1 in byte unit is copied to address
corresponding to Length byte which takes S2 as the initial; if S2 is word unit, S2 in
word unit is copied to the address corresponding to Length word which takes S2 as
the initial.
2.S1 is address: S1 and S2 transmit the data in byte in spit if S1 and S2 address
classifications are matched.
S2 : Starting byte of destination address.
Example:
34
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-25-2
1.When S1 is the constant ,5 , and S2 is R60, R60=00000101,R61=00000101
2.When S1 is the constant ,5 , and S2 is D60, D60=5, D6 1=5.
3.When S1 is the address , D50 , and S2 is D60, D60=50
W=1, the specified number byte is delivered.
W=0, no data be delivered.
If it detects that it exceeds the range of parameter type in transferring , an alarm
occurs.
Fig. 5-26-1
Control conditions:
ACT=0, No data is transferred.
ACT=1, one-byte data is transferred.
Parameter:
S1: source address or constant.
when S2 is a single-byte address, S1 with byte value is copied to S2 address; when
S2 is a word address, S1 with byte value is copied to S2 lower-byte address.
S2:destination address.
Fig. 5-27-1
Control conditions:
35
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
ACT=0,no data is transferred.
ACT=1,two-byte is transferred.
Parameter:
S1 :source address or constant.
S2 :destination address.
Fig. 5-28-1
Control conditions:
Read, write designation(RW)
RW=0:read data from data table.
RW=1:write data to data table.
Reset(RST)
RST=0: reset release.
RST=1: reset W=0.
Activation code(ACT)
ACT=0 :do not execute XMOV,and there is no change in W.
ACT=1 :execute XMOV code.
Parameter:
Length : specifies the transferred data length.
1:1-byte long data.
2:2-byte long data
S1 : data capacity’s stored address of the data table. The address is used to store
the data
table’s data capacity. Its occupied byte quantity meets the length specified by Length,
and the valid range of data is determined by the byte length specified by Length1
format.
1-byte length:1 to 512.
2-byte length:1 to 256. namely 256×2=512 bytes,which is the PLC data table’s
capacity.
S2 :set head address in the data table. The memory area of data table (byte length)
36
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
X number
of data table. The table head address must be the value set in D data table.
S3 : Input/output data address. In case of reading, set the address of memory which
stores a reading result. In case of the writing, set the address of the memory which
stores a writing result, its occupied byte number meets the setting of Length format.
Limit the address to D register.
S4 : Index storage address. It is used to read or write store an index value. Its
occupied byte number meets the designation. When the set index address is m ore
than the data stored in S1, error output W=1.
Actual transmission address=head address +index value , index value is 0 ~
(S1-1),the actual transmission address cannot exceed the data table.
Output:
In the case where the index value exceeds the value set in S1, W=1,the reading or
writing of the data table isn’t executed.
W=0,no error.
W=1,error found.
Fig. 5-29-1
Control conditions:
Check repetition(REP)
REP=0:Execute the DSCH instruction, search begins from the head address, and the
repetition will be omitted, the search stops when the target data is found in the first
time, and output its address. If the searched data is not found, W=1.
REP=1:Execute the DSCH instruction, if the searched data is not found or is two (or
more than two), W=1.
Reset(RST)RST=0:Release reset. RST=1:Reset. W=0.
Activation instruction (ACT):
ACT=0 : Do not execute DSCH instruction, W does not change.
37
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
ACT = 1 : Execute DSCH instruction. If the search data is found, table number
where the data is stored will be output. If the search data is not found, W be comes 1.
Parameter:
Length :Specifies data length 1:1-byte long data.
2:2-byte long data.
S1 :Storage address of number of data in data table. This address requires memory
of number of byte according to the format designation. Number of data in the table is
n+1(head number in the table is 0 and the last number is n).
S2 : Data table head address.
S3 : Search data input address.
S4 : Search result output address. Actual transmission address=head address
+index value,index value is 0~(S1-1),the actual transmission address cannot exceed
the data table.
After searching, if search data is found, the table number where the data is stored
will be output. The searched table number is output in this search result output
address. This address requires memory of number of byte according to the format
designation.
Output:
W=0,Search data found.
W=1,Search data not found.
Fig. 5-30-1
Control conditions:
Reset (RST):
RST=0: Release reset.
RST=1: Reset. W=0.
Activation instruction (ACT):
ACT=0 :Do not execute ADD. W does not changed.
ACT=1 :Execute ADD.
Parameter:
Length: Specifies data length(1 or 2 bytes) and the format for the addend(constant
or address).
38
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-30-2
S1 : Address containing the augend
S2 : Length specification determines the format of the addend.
S3 : Specify the address to contain the result of output operation.
Output:
W=0: Operation correct.
W=1: Operation incorrect.
When W=1, the result of addition exceeds the specified data length.
Fig. 5-31-1
Control conditions:
Reset (RST):
RST= 0:Release reset.
RST= 1: Reset. W=0. Activation instruction (ACT):
ACT=0 : Do not execute SUB. W does not change.
ACT= 1 : Execute SUB.
Parameter:
Length :Specifies data length(1 or 2 bytes) and the format for the
subtrahend(constant or address).
39
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-31-2
S1 : Address containing the minuend.
S2 : Specification determines the Length.
S3 : Specifies the a ddress to contain the result of operation.
Output:
W=0 : Operation correct.
W=1 : Operation incorrect.
When W =1, the result of subtraction exceeds the specified data length.
Fig. 5-32-1
Control conditions:
ACT=0 : The ANDF instruction is not executed.
ACT=1 : The AND F instruction is execute d.
Parameter:
Length :Specify a data length (1 or 2 bytes), and an input data format (constant or
address
specification).
Fig. 5-32-2
S1 :Input data to be ANDed. The data that is held starting at this address and
has the data
length specified in Length format specification is treated as input data.
40
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
S2 : Input data to be ANDed with. When address specification is selected in
format
specification, the data that is held starting at this address and has the data length
specified in Length format specification is treated as input data.
S3 : Address used to store the result of an ANDF operation. The result of and
ANDF operation is stored starting at this address, and has the data length specified in
Length format specification.
Example:
When address A and address B hold the following data:
Addres 1 1 1 0 0 0 1 1
sA
Addres 0 1 0 1 0 1 0 1
sB
Fig. 5-33-1
Control conditions:
ACT=0 : The ORF instruction is not executed.
ACT=1 : The ORF instruction is executed.
Fig. 5-33-2
Parameter:
Length: Specify a data length(1 or 2 bytes), and an input data format(constant
or address specification).
S1 : Specify the input data t o ORed. The data that is held starting at this
41
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
address and has the data length specified in Length format specification is treated as
input data.
S2 : Input data to be OR ed with. When address specification is selected in
format
specification, the data that is held starting at t his address and has the data
length
specified in Length for mat specification is treated as input data.
S3: Ad dress used to store the result of an ORF operation. Result of an ORF
operation is stored star ting at this address, and has the data length specified in format
specification.
Example:
When address A and address B hold the following data:
Address A 1 1 1 0 0 0 1 1
Addres 0 1 0 1 0 1 0 1
sB
Fig. 5-34-1
Control condition:
ACT=0: The NOT instruction is not executed.
ACT=1: The NOT instruction is executed.
Parameter:
Length :Specifies a data length (1 or 2 bytes).
42
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-34-2
S1 :Input data to be inverted bit by bit. The data that is held starting at this
address an d has the data length specified in Length format specification is treated as
input data.
S2 : Address used to output the result of a NOT operation. The result of a
NOT operation is stored starting at this address. An d has the data length specified in
Length format specification.
Example:
When address A holds the following data:
Address A 1 1 1 0 0 0 1 1
43
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 5-35-1
Control conditions:
ACT=0 : The EOR instruction is not executed.
ACT=1 : The EOR instruction is executed.
Parameter:
Length :Specify a data length (1 or 2 bytes) and an input data format(constant
or address specification).
Fig. 5-35-2
S1: Input data to be exclusive-ORed. The data that is held starting at this address
and has the data length specified in Length format specification is treated as input
data.
S2: Input data to be exclusive-ORed with. When address specification is selected
report that specification, the data that is held starting at this address and has the data
length specified in Length format specification is treated as input data.
S3: Address used to store the result of an exclusive EOR operation. The result of
an exclusive EOR operation is stored starting at this address, and has the data length
specified in Length format specification.
Example:
When address A and address B hold the following data:
Address A 1 1 1 0 0 0 1 1
Addres 0 1 0 1 0 1 0 1
sB
44
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 6-1
45
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 7-2-1
2.Press “Page Down” on PLC info window, it will show as following:
Fig. 7-2-2
46
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
(1) When the system is turned on, current running plc ladder is set by parameter.
After the system determines to load some ladder which is running ( the operation
maybe appear the danger, it is enabled after the system restarts). If the format is
incorrect, the ladder is deleted to recreated, and the user needs to specify the running
ladder No. carefully. Names of all ladder files must be with “ladderXX.grp” (XX is
the serial number) , otherwise, the system does not identify the files. The file format is
determined by the system, and the user cannot modify the file outside of the system,
otherwise, the file maybe be deleted or cannot be identified
(2) Selecting ladder. Move the cursor or input “LX” /
“LXX” (X/XX is number)
to specify the file name, the system checks whether “X”/“XX”is the known file
number after “Enter” is pressed, if the system has not checked it, it creates an ladder
with the name “ladder0X.grp” or “ladderXX.grp” . The system automatically
creates “END 1” and “END2” when the file is created, which can make the user
continuously operate the ladder file (it cannot be switched after the file is opened , and
the instruction list is always empty). To get safety, after one ladder is opened to
executed edit and when it is saved and an other file is opened, the system
automatically saves the current file. Before the system saves the file, it executes the
ladder syntax check. When the system finds the syntax errors, it does not save the
ladder diagram.
(3)The file head includes the basic information of file, such as row number, step
number. The step information is the new one when it is converted. The user can delete
the ladder which is not opened and is not running, which must be executed orderly.
After the user opens the ladder which is not running, the system stops refreshing the
ladder network in formation to avoid the mistake. The running ladder can execute
only the two operations including save and copy, in order that when the user copies
the file to other ladder files , and edits the currently running ladder, the user firstly
interrupts its running state. When the cursor stops in the background edit file the user
can press “Change” key to open Info to modify the file ground (including ladder
version number, adaptive machine tool, ladder maintain personnel).
7.2.2 PLCGRA Window
Press PLC/F2 Rapid Function key on PLC info window, it will show as
following:
47
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 7-2-2-1
Contents and operations on PLCGRA window :
PLCGRA[l adder01]: current ladder name.
1/1173:current line position specified by the cursor during the ladder the cursor.
RUN: operation state o f ladder, including RUN /run, STOP/stop, DEB
UG/debug. Diagram: ladder program.
DATA: Display input data. Press <P>key, it will shift to sequence number.
Input:display the input data. Press key in the panel to view the input data.
MEA:Commentaries of element positioned by the cursor.
MDI mode: current ope ration mode
Press the Page Up/Page Down, four Direction keys to search, view and modify
the elements .
7.2.3 PLCPAR Window
Press PLC/F3 Rapid Function key on PLC info window, it can enter PLC
Parameter screen, as following shown:
Fig. 7-2-3-1
48
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Contents and operations on PLCPAR window:
RUN : operation state of ladder
ADDR: keep relay address
Bit0~Bit7 : bit status of keep relay address
1:the address maintains the state before power OFF
0:the address resets to default state after power OFF
Input: display the input data.
MDI mode: current operation mode(note: the relative parameter of PLCPAR
can be modified only in MDI mode).
Press the Page Up/Page Down, four Direction keys to search, view and modify
the elements.
7.2.4 PLCDGN Window
Press PLC/F4 Rapid Function key on PLC info window, it can enter PLC
Diagnosis screen, as following shown:
Fig. 7-2-4-1
Contents and operations on PLCDGN window :
RUN:operation state of ladder.
ADDR:address of diagnosis number.
Bit0~Bit7:bit number state of diagnosis address.
1:the signal is connected;0:the signal is not connected. Input: display the input
data.
MDI mode: current operation mode.
Press the Page Up/Page Down, four Direction keys to search the corresponding
diagnosis number. Generally, only the searching can be operated in the window, the
I/O window of P LC enters t he signal debug mode only when the user gets the
authority to set K0.1 to 1. At the moment, the user can modify the X, Y signal.
7.2.5 PLC Trace Window
Press F4 Rapid Function key,and then press Right key on PLCDGN window,
and then press F3 rapid function key ,which can enter PLC Trace screen, as following
49
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
shown:
Fig. 7-2-5-1
The content and operation of the P LCTRA “SETTING” window
(1)Mode:
-- Periodic cycle: periodic sampling for each time.
-- Signal change: sampling for the change of current signal.
(2)Resolution:
Input the sampling resolution, the default value is the least resolution (8ms) , its
range is (8ms --1000ms).
The input value uses t he multiple of the 8ms.
(3) Time limit:
When the sampling mode is set to“periodic cycle ”, then display this parameter.
Input the performance time of the trace. The numerical range of the “periodic cycle”
is determined by the value of the “ resolution ” or the specified signal address
quantity, and its range is displayed at the right side.
(4) Frame limit:
When the sample m ode is set to “signal change”, then display this parameter.
Input the sampling quantity, and its range is displayed a t the right side.
(5) Stop condition:
- - without: Do not stop tracing.
- - Buffer area full: It stops tracing when the buffer area is full.
- - Signal trigger: It stops tracing by the signal trigger.
Trigger setting: This parameter is enabled when the “stop condition” is selected
to the “signal trigger”.
1. Address: The input signal address is regarded as trigger stopping. (R address
can not be
used for trigger stopping)
2. Mode; It determines that what kind trigger mode is used to stop tracing.
Rising edge: The tracing is automatically stopped by the rising edge of the trigger
signal.
50
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Falling edge: The tracing is automatically stopped by the falling edge of the trigger
signal.
Any change: The tracing is automatically stopped by the rising or falling edge of
the trigger signal.
(6) Sampling condition: This parameter is enabled when the sampling mode is set
to “signal change”,which is determined the sampling condition.
- - Signal trigger: The specified mode changes when the signal specified by the
trigger address which is set by the sampling condition, collect the signal.
- - Any change: Any change occurs when the signal specified by the trigger address
which is set by the sampling condition.
Trigger setting: When the sampling mode is set to “signal change”, and then the
sampling condition is set to “signal trigger”, this parameter is enabled.
1. Address: The input signal address, instead of using the R address, is treated as
the sampling of the trigger signal.
2. Mode: The trigger mode inputs the specified trigger signal.
Rising edge: The rising edge sampling of the trigger signal specifies the signal
state.
Falling edge: The falling edge sampling of the trigger signal specifies the signal
state.
Any change: Specify the signal state by the rising or falling edge sampling of the
trigger signal.
Switch on: Sample the specified signal state when the trigger signal is switched on.
Switch off: Sample the specified signal state when the trigger signal is switched off.
(1)Sampling mode: Display the current sampling mode of the system.
(2)Period: Display the current sampling period of the system, that is, resolution
(3)Time: This parameter displays when the “ sampling mode ” selects the
“periodic cycle”.
-- Format display when tracing: the current timing is at the left side, and the max.
allowance timing is at the right side.
-- Format display when stopping: the most right side timing is placed at the right
side; the timing of trace stopping is placed at the middle side, and the max. allowance
timing is placed at the right side.
(4) Setting address: Move the cursor by the and , the signal
address that will be traced is inputted inside the , it can be trace d 15 signals at the
same time. Any address can be inputted. As for the R address, the previous 3 positions
can be inputted the address before 256; the 4t h and 5gh position can be inputted 2
addresses after 255.
(5) (S) start: The signal trace can be performed pressing <S> key on the panel
after the trace parameter is set correctly.
(T) Stop: Stop the signal trace after controlling the <T> key on the panel.
(K) Clear: the value under the cursor pressing the <K> key on the panel.
51
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 8-1-1
2)PLC Ladder Parameter Window: Press the soft key [PLC] or [F3] to enter
PLCPAR window as Fig8-1-2, PLCPAR window includes: KPAR, TMR, DATA, CTR,
MDEC.Modifying the parameter, PLC running control, entering I/O debug mode can
be executed after getting the authority above the system debugging level.
52
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 8-1-2
Fig. 8-2-1
Basic codes are divided into 7 kinds of graph to display:
【 】 :norm ally open contact
【 】 : norm ally-closed contact
【 -( )- 】 : output coil
【—o( ) 】:output coil reverse
【—— 】: level conduct line
【 ......| 】: vertical conduct line
【 】: delete vertical conduct line
Auxiliary soft key:
【 】 : Page up page
3.Position the cursor to the initial position of next line, press【 -| |- 】soft key,
there is there is norm ally-open contact symbol at the cursor position, directly input
the element name G008.4 and press <EOB> and G008.4 appears at the current
cursor position.Press【 -|/|- 】, and there is there is normally-open contact symbol at
the cursor position, directly input the element name F001.1 and press < EOB> and
F001.1 appears at the current cursor position.
4.Right move the cursor, press 【——】, and draw a horizontal conductive line at
the current cursor position.
5.Move up the cursor, press 【 】,and draw a vertical conductive line at
right-down position of current cursor.
6.Press 【 — ( ) 】 an the system automatic create the output coil, namely the
necessary horizontal conductive line. Directly input the element name G8.4, press
<EOB>and G008.4 appears at the current cursor position.
The programmed ladder is as Fig. 2-3-1:
Fig. 8-4-1
There are 35 PLC function instructions in the function instruction list. For the
format and use of function instruction, see Programming, and the operation compiling
of functional codes are consistent with those of Section 2.3 Ladder Operation.
Fig. 8-5-1
Inserting a line: position the cursor to the any line of target line, press <Insert>,
55
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
insert the blank line at the place above of the specified line by cursor, and the
sequence line will orderly move down one line.
Deleting a line: position the cursor to the target line, press <Delete> , and then
press to delete the current line, and the sequence line will orderly move up one line.
56
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 9-1
Fig. 9-1-1
The content and operation of the nonvolatile replay window:
57
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
ADDR: Nonvolatile relay address.
Bit0~Bit7: Bit number state of the nonvolatile replay address.
1: This address remain s the state before pow er off after t he power is turned off;
0: This address resets on default state after the power is turned off.
After modification, press <Download> key on the panel to download the set
value to the CNC run. After the save is successful, the system displays “ KPAR
downloading successful”; the system displays: “downloading fail” when the save
is incorrect; the “ illegal downloading parameter ” displays without downloading
conditions.
The search and positioning can be performed by Page-Up, Page-Down and four
direction keys on the panel; checking and modifying of the nonvolatile relay address
can be performed.
9.2 Timer
Press the [ TMR] soft key in the Fig. 9-1, the n enter the checking and setting
windows of the timer, refer to the Fig. 9-2-1.
Fig. 9-2-1
NO: Timer serial number; Do not change.
ADDR.: Timer address; Do not change.
CURT: Current value of the timer; Do not change.
SET: Presetting value of the timer; it can be changed after K000.0 (PLC
parameter modification permission) is set to 1.
After modification, press <Download> key on the panel to download the set
value to the C NC run. After the save is successful, the system displays “ TMR
downloading successful”; the system displays: “downloading fail” when the save
is incorrect; the “illegal downloading parameter” display s without downloading
conditions.
The search and positioning can be performed by Page-Up, Page-Down and four
direction keys on the panel; checking and modifying of the nonvolatile relay address
can be performed.
58
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 9-3-1
The content and operation of the nonvolatile replay window:
ADDR: Data address,cannot alter.
DATA: Setting value of data table, can alter.
After modification, press <Download> key on the panel to download the set
value to the C NC run. After the save is successful, the system displays “ TMR
downloading successful”; the system displays: “downloading fail” when the save
is incorrect; the “illegal downloading parameter” display s without downloading
conditions.
The search and positioning can be performed by Page-Up, Page-Down and four
direction keys on the panel; checking and modifying of the nonvolatile relay address
can be performed.
9.4 Counter
Press the [CTR] soft key in the Fig. 9-1, then enter the checking and setting
window of the counter, refer to the Fig. 9-4-1.
59
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 9-4-1
ADDR.: Counter address; Do not change.
CURT: Current value of the timer; Do not change.
SET: Presetting value of the timer; it can be changed after K000.0 (PLC
parameter modification permission) is set to 1.
After modification, press <Download> key on the panel to download the set
value to the C NC run. After the save is successful, the system displays “ TMR
downloading successful”; the system displays: “downloading fail” when the save
is incorrect; the “illegal downloading parameter” display s without downloading
conditions.
The search and positioning can be performed by Page-Up, Page-Down and four
direction keys on the panel; checking and modifying of the nonvolatile relay address
can be performed.
60
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
User
Editing
Area
Function
Fig. 10-2-1
10.2.2 Function Introduction
File menu
The file menu includes some program files, namely, the new, open and save,
which can be produced some functions, such as the performed ladder diagram file or
binary system file, printing, printing preview and printing setup and the recently
opened file list.
Note: In the“ladder diagram editing”dialog box, each volume of the“ladder diagram
61
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
version number”, “suitable machine” and “ultimate modifier”, can be indicated by English,
instead of Chinese, otherwise, the error may occur after transferring.
Edit menu
The edit menu includes some functions such as the cutting, copy, pasting,
searching, conversion and editing etc.
View menu
Control the display and concealing of the tool bar, state bar, output and
instruction list windows.
Window menu
Control the selection and layout of each window.
Component search
Insert the vertical break-over line (place at lower right corner of cursor)
Function code button: There are two methods in Edit function code:
1. Pop up the drawing menu by click the small arrow at the right, and then select
the function codes.
Fig. 10-3-1-2-1
2. Or click the button icon, set the function code in the function code selection
dialog.
63
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Fig. 10-3-2-1-2
10.3.2 Selecting a Figure
In the editing view of the ladder diagram, the black rectangle shadow means
cursor, click the left key of the mouse in the figure editing area between two bus
cables, and select the position where the figure unit needs to be edited. Refer to the
following figure:
Fig.10-3-2-1
When the b lock is selected, press the mouse left key at the beginning position of
the block, then drag to the end. The selected area indicates by the rectangle with
dotted line before re leasing the left key.
Fig. 10-3-2-2
The inverted color of t he whole ladder diagram after releasing, that is, the ladder
diagram within this rage is selected, and the next operation can be perform ed. For
example, cutting, deletion and copy etc..
Fig. 10-3-2-3
64
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
10.3.3 Editing Figure
10.3.3.1 Cutting
There are three ways for carrying out this operation after the ladder diagram area
to be edited is selected:
1. Select the cutting after springing the environment menu by clicking the right
key of the mouse;
2.Select the Edit [Alt+E]--- Cutting [T] of the main menu;
3.Shortcut key [Ctrl+X].
The cut content is placed to the clipboard, which is copied to the ladder diagram
by t he paste operation.
10.3.3.2 Copy
There are three ways for carrying out this operation aft er the ladder diagram area
to be copied is selected:
1. Select the copy after springing out the environment menu by clicking the right
key of the mouse;
2.Select the Edit [Alt+E]--- Copy [C] of the ma in menu;
3.Shortcut key [Ctrl+C ].
The select ed content after copying is put to the clipboard, which is copied to the
ladder diagram by the paste operation.
10.3.3.3 Pasting
There are three ways for carrying out this operation after the ladder diagram area
to be pasted is selected:
1.Select the pasting after springing out the environment menu by clicking the
right key of the mouse;
2.Select the Edit [Alt+E]--- Pasting [P] of the main menu;
3.Shortcut key [Ctrl+V].
10.3.3.4 Deletion
There are three ways for carrying out this operation after the ladder diagram area
to be deleted is selected:
1.Select the basis code ---- Deletion node after springing out the environment
menu by clicking the right key of the mouse once;
2.Click the [Deletion node] button on the editing bar;
3.Shortcut key [Delete];
10.3.3.5 Insertion Line
There are three ways for carrying out this operation after moving the cursor to
the position to be inserted the ladder diagram line:
1.Select the insert after springing out the environment menu by clicking the right
key of the mouse;
2.Select the Edit [Alt+E]---Insertion line [I] of the main menu;
3.Shortcut key [Insert];
10.3.3.6 Deletion Line
There are three ways for carrying out this operation after moving the cursor to
the position to be deleted the ladder diagram line:
65
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
1.Select the insert after springing out the environment menu by clicking the right
key of the mouse;
2.Select the Edit [Alt+E]--- Deletion line [D] of the main menu;
3.Shortcut key [Ctrl+Delete];
10.3.3.7 Conversion
There are three ways for carrying out this operation after the ladder diagram of
the current editing window is converted into the instruction list program:
1.Select the Edit [Alt+E]--- Conversion [V] of the main menu;
2.Click once the [Ladder diagram conversion button on the editing bar;
3.Shortcut key [F7];
10.3.4 Ladder Diagram Note
10.3.4.1 The Line Note of the Ladder Diagram
Click the left key of the mouse twice out of the bus area at the ladder diagram
right; input the notes in the editing frame.
Fig. 10-3-4-1-1
10.3.4.2 Notes of the Ladder Diagram’s Component
There are two ways for carrying out this operation after moving the cursor to the
position to be modified the ladder diagram component:
1. Click the right key of the mouse after the component is selected; select the
modified notes [M] in the springing environment menu;
Fig. 10-3-4-2-1
66
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
2. Select the edit [Alt+ E]----Note modification [ M] of the main menu.
Fig. 10-3-4-2-2
3. Shortcut key [Ctrl+T].
Input the notes in the springing dialog box; save it by clicking the OK button.
Fig.10-3-4-2-3
The notes saved will be display ed the output window under the screen when the
component is selected each time, refer to the following figure:
Fig. 10-3-4-2-4
10.3.5 Export
The ladder diagram file should be converted w hen it is edited and saved, which
can be generated the performed file after converting, and then transfer to the CNC
using the serial -port communication
software or U disk that it is performed by the PLC from the CNC system.
67
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
68
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
69
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
70
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
71
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
1.5 F Signal
F0000 OP SA STL SPL *** *** *** ***
F0008 Auto run
F0007 Servo ready
F0006 Cycle start alarm
F0005 Dwell alarm
F0004 System Run Remark
72
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
F0070 *** *** *** *** TF SF *** MF
F0074 tool function strobe signal
F0073 spindle speed strobe signal
F0071 MST strobe signal
74
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
F0260 TB07 TB06 TB05 TB04 TB03 TB02 TB01 TB00
F0268 tool function code signal TB07
F0267 tool function code signal TB06
F0266 tool function code signal TB05
F0265 tool function code signal TB04
F0264 tool function code signal TB03
F0263 tool function code signal TB02
F0262 tool function code signal TB01
F0261 tool function code signal TB00
77
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
F0490 *** *** *** *** *** *** *** ***
F0500 *** *** *** *** SYS4 SYS3 SYS2 SYS1
F0501 1000T system panel selection
F0502 1000T-V system panel selection
F0503 580T system panel selection
F0504 828T system panel selection
78
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
F0580 *** *** *** ZP35 ZP34 ZP33 ZP32 ZP31
F0581 X third ref. return end signal
F0582 Z third ref. return end signal
F0583 Y third ref. return end signal
F0584 4TH third ref. return end
F0585 5TH third ref. return end
79
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
1.6 G Signal
G0040 *** *** *** *** FIN *** *** ***
G0044 MST end signal
82
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
G0320 *** *** *** *** *** *** *** LIMG
G0321 Axis overtravel relieve signal
84
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
85
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
86
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
87
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
88
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
89
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
97
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
2.6 G Signal_GH-1000MC
G0040 *** *** *** *** FIN *** *** ***
G0044 MST end
104
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
105
-Shenzhen Guanhong Technology Co.,Ltd.- PLC of CNC Lathe System
Appendix III IO Defines of Spindle
106