3.3 Data List ....................................................................................................................................129H113
1. M Code M00—Meaning of F Signal in M99..........................................................................
2. “%” in a Single Line Meaning Saving M Code Information End ............................................196H263
3. X signal X0.0---The Code and Meaning of X6.7 ...................................................................
4. Y Signal Y0.0—The Code and Meaning of Y5.7...................................................................198H263
5. K signal K6.0---The Code and Meaning of K63.7 .................................................................
6. A signal A0.0---The Code and Meaning of A31.7..................................................................200H264
7. End// End Symbol.................................................................................................................201H264
195H263
197H263
199H264
XIII
Installation and Connection Manual of GSK218MC CNC System
XIV
Chapter One The Compilation Schedule of the Sequence Programming
Volume I Programming
VOlUME Ⅰ PROGRAMMING
1
Installation and Connection Manual of GSK218MC CNC System
Volume I Programming
VolumI Programming
2
Chapter One The Compilation Schedule of the Sequence Programming
CHAPTER ONE THE COMPILATION SCHEDULE OF SEQUENCE
PROGRAMMING
1.1 GSK218MC Series PLC Specification
GSK218MC series PLC specification is shown below:
Table 1-1-1
Specification GSK218MC Series PLC
Programming language Ladder
Program level 2
The 1st level program execution cycle 8ms
Basis code average treatment time 5μs
Programming capacity 4700 steps
Code Basis code + function code
Internal relay (R)
PLC alarm detection (A)
Nonvolatile memory area
Timer (T)
Counter (C)
Data base (D)
Nonvolatile relay (K)
Counter prevalue data register (DC)
Timer prevalue data register (DT)
Subprogram (P)
Mark (L)
Input signal of NC side (F)
Signal outputs to the NC side (G)
Volume I Programming
0~511 (byte)
0~31 (byte)
0~127 (word)
0~127 (word)
0~255 (word)
0~63 (byte)
0~127 (word)
0~127 (word)
0~99
0~99
0~63 (byte)
0~63 (byte)
I/O module (X)
(Y)
0~63 (byte)
0~47 (byte)
1.2 The Concept of the Sequence Programming
The programming is performed a logic control to the machine tool and its relative equipments, which
is called sequence programming.
After the programming is converted into some kind of format, CPU can be performed the code and
calculation treatment for it, and its fruits can be memorized to RAM. CPU can be rapidly read each
code stored in the memory, which can be performed the programming according to the calculation
operation.
The compiling of the sequence programming starts with developing of the ladder diagram
3
Installation and Connection Manual of GSK218MC CNC System
1.3 Distribution Interface (Step one)
The interface can be distributed after confirming the controlled object and calculating the points of the
Volume I Programming
corresponding input/output signal.
Refer to the Chapter Four Input/output interface signal table in the part of the Installation and
Connection when distributing the interface.
VolumI Programming
1.4 Ladder Diagram Programming (Step two)
The control operation required by the machine tool can be expressed by the ladder diagram with the
on-line compiling of the GSK218MC. The functions, such as the timer and counter, can not be
expressed by relay symbols, which can be indicated by the specified function code symbols.
The compiled ladder diagram should be stored and converted into the corresponding PLC codes
before operating, namely, the so-called instruction list.
1.5 Sequence Programming Debugging (Step 3)
The sequence programming can be debugged using the following methods:
1) Debugging with emulator
The machine tool can be replaced by an emulator (it composes of the lights and switches). The
input signal state of the machine tool can be expressed by the ON or OFF of the switches; and
the output signal state can be indicated by the ON or OFF of the light.
2) Debugging with actual operation
Debug on the actual machine tool. It is better to prepare the precautions before debugging, due
to an unexpected behavior may occur.
4
Chapter Two Sequence Programming
CHAPTER TWO SEQUENCE PROGRAMMING
The operating principle is different with the common relay, because the PLC sequence controlling is
carried out by compiling the on-line diagram. And therefore, it is better to thoroughly understand the
sequence controlling principle when designing the PLC sequence programming.
2.1 Performance Process of Sequence Programming
In the general relay controlling circuits, each of them can be simultaneously operated. When the relay
A is operated in the following figure, the replay D and E can be operated (when the contactor A and B
are closed) at the same. Each replay in the PLC sequence control is operated in turn. The relay D is
operated before relay A, and then the relay E operates (refer to the following figure). Namely, each
relay is operated based upon the sequence of the ladder diagram (compiling sequence).
A
A
Fig. 2.1 (a) Circuit illustration
B
D
C
E
Volume I Programming
The differences between the relay circuit and PLC programming operation are shown below in the Fig.
2.1 (b) and Fig. 2.1 (c).
A
A
C
B
C
Fig. 2.1 (b)
A
C
A
C
B
Fig. 2.1 (c)
(1) Relay circuit
Both Fig. 2.1 (b) and Fig. 2.1 (c) are shared a same operation. B and C are switched on after A is
turned on. B is cut off after C is ON.
5
Installation and Connection Manual of GSK218MC CNC System
(2) PLC program
A same relay is shared a same circuit, refer to the Fig. 2.1 (b); B and C are switched on after A is
turned on. B is cut off after one cycle of the PLC program is performed. In the Fig. 2.1 (c), C is ON
instead of B, after C is turned on.
Volume I Programming
2.2 The Performance of the Cycle
VolumI Programming
PLC performs from the beginning to the end of the ladder diagram. It performs again from the
beginning of the ladder diagram after this diagram is performed, which is called cycle performance.
The performance time from the beginning to the end of the ladder diagram is abbreviated as a period
of a cycle treatment. The shorter of the treatment period is, the stronger of the response capacity of
the signal is.
2.3 The Priority Sequence of the Performance (the 1st Level, the 2nd
level)
GSK218MC PLC program are composed of two parts: the 1st level program and the 2nd level program,
which are inconsistent with the performance period.
st
The 1
level program performs once each 8ms, which can be treated some fast corresponding and
short pulse.
nd
The 2
may divide the 2
program performs once each 8*nms. N is the partition value of the 2nd level program. PLC
nd
level program into N parts when the 2nd level program is executed. It is performed
one part for each 8ms.
Fig. 2-3-1
PLC in the GSK218MC is separately performed in the PLC-AVR SCM. 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 I/O.
PLC is always performed the ladder diagram calculation other than the interruption of the response
exchange data.
6
Chapter Two Sequence Programming
Fig. 2-3-2
nd
When the last partition value of the 2
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 1
program performs once each 8*n ms. If its steps of the 1
the steps of the 2
nd
level 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
st
level program should be shorter.
the 1
level program of the n is performed, the program is then
st
level program performs once each 8ms; the 2nd level
st
level program is increased, and therefore
Volume I Programming
2.4 Sequence Programming Structure
The ladder diagram is compiled with sequence in the traditional PLC. It owns the following
advantages in the ladder diagram language allowing the structured programming:
1. The program is easy to comprehend and compile.
2. It is more convenient to find the faults during the programming.
3. It is easy to find some reasons when the operation malfunction occurs.
The methods of the main structure programming are shown below:
1) Sub-program
The subprogram is regarded as a treatment unit based on the ladder diagram.
C
A
Task A
Task B
A
.
.
.
.
Fig. 2-4-1
2) Nesting
One subprogram can be performed the task by calling another one.
B
C
Main program
Task A
Task B
Subprogram 1Subprogram 2
Task A1
Task An
Task A11
Task A12
Fig. 2-4-2
7
Installation and Connection Manual of GSK218MC CNC System
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.
Volume I Programming
VolumI Programming
Fig. 2-4-3
2.5 The Treatment of the Input/output Signal
The treatment of the input signal:
CNC
CNC—PLC
Shared register
Latched at the
beginning of the
nd
level
2
nd
The 2
program input
signal latch
Machine tool
input register
8ms
IO terminal
Fig. 2-5-1
The 1stlevel
program
The 2ndlevel
program
The treatment of the output signal:
8
Fig. 2-5-2
Chapter Two Sequence Programming
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
st
PLC each 8ms. The 1
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.
nd
(3) The 2
level program input register
The 2nd level program input signal register is also called the 2nd 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 2
The signals both in the NC and machine tool input register can be locked to the 2
input latch, as long as the 2nd level program performs. The signal state in this latch keeps invariable
during the performance of the 2
level program performs the corresponding treatment using state of these
nd
level one.
nd
level program
nd
level program.
Volume I Programming
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 the 1st Level and the
2nd Level Program
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
nd
signal used with the 2
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.
level program is the one of the 1st level who is locked. And therefore, the
A
A
.
.
.
.
END1
.
.
.
.
B
C
It belongs to the 2nd partition
of the 2
nd
level program
Fig. 2-5-3-1
9
Installation and Connection Manual of GSK218MC CNC System
A=1 performs the 1st level program when the 1st 8ms is performed, then B=1. And therefore, the 2nd
nd
level program is performed, the A=1 is latched to the 2
level program, and then the first partition of
the 2nd level program is completed.
Volume I Programming
A turns into 0 to perform the 1
nd
therefore, the 2
partition of the 2nd level program is performed; in this case, the state of the A is still
st
level program when the 2nd 8ms is performed, then B=0. And
latched as the one last time. So, C=1.
VolumI Programming
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.
10
Chapter Three PLC Address
CHAPTER THREE PLC ADDRESS
Address distinguishes signal. Different address is separately corresponding to the I/O signal at the
side of the machine tool, the I/O signal at the side of the CNC, the internal relay, the counter, the timer,
the keep relay and the data list. Each address is composed of the address number and bit number,
and its number is as shown below:
Address number rules:
Address number consists of address type, address number and bit number.
Type Address number Bit number
Address type: X, Y, R, F, G, K, A, D, C and T
Address number: Decimal number means one byte.
Bit number: Octonary number system, 0~7 are separately indicated the bytes (0~7 bits) in the front
of the address number.
The address type of the GSK218MC PLC is shown below:
Address Address explanation Length
X Machine →PLC (64 bytes) INT8U
Y PLC → machine tool (48 bytes) INT8U
F CNC → PLC (64 bytes) INT8U
G PLC → CNC (64 bytes) INT8U
R Intermediate relay (512 bytes) INT8U
D
DC
C
A PLC alarm detection INT8U
T
DT
K Keep relay (64 types) INT8U
Data register (0~255)
The data register of the counter
preset value
Counter (0~127)
Timer (0~127)
The data register of the timer preset
value
X 000 . 6
Table 3-1
INT16U
INT16U
INT16U
INT16U
INT16U
Volume I Programming
INT8U data type is 8-bit character type without symbol, INT16U data type is 16-bit integral type
without symbol.
3.1 Machine → PLC address (X)
The X address of the GSK218MC PLC composes of two types:
1. The X address is assorted with the three I/O input terminals, namely, XS40, XS41 and XS42.
2. The X address is assorted with the input button on the MDI panel of the system.
3.1.1 X Address on the I/O Input
The addresses (48 addresses) are defined as INT8U from X0 to X5, which are distributed on the
three I/O input terminals, for example, XS40, XS41 and XS42.
11
Installation and Connection Manual of GSK218MC CNC System
Users can define the signal significance of the X address of the I/O ports based upon the actual cases,
which can be connected the machine tool and compiled the corresponding ladder diagram. Refer to
the appendix one (GSK218MC CNC system PLC I/O address) and the configuration and definition of
the internal software components for the initial definition of the input address.
Volume I Programming
3.1.2 X Address on the MDI Panel
There are 11 types from the addresses X20 ~ X30 of which these addresses are corresponding with
the button input on the MDI panel one by one. User can not modify its signal definition. The buttons
VolumI Programming
on the MDI panel should be firstly responded by CNC, and then conveys the X signal to PLC.
Feed hold X23.7 Spindle override cancellation X31.1
PLC
address
Spindle positive override
(218MC-H/-V is N axis +)
Spindle negative override
(218MC-H/-V is N axis -)
Spindle blowing (218MC 一
integration)
X22.3 Spindle orientation X29.0
X22.4 Tool magazine zero return X29.1
X22.5 Tool clamping/releasing X29.2
X22.7 Tool magazine CCW X29.4
Spindle negative override
(218MC-H/-V is the spindle override
SOV1)
Button input
PLC
address
X27.4
X28.4
X28.7
X31.0
12
Chapter Three PLC Address
(218 MC-H/-V is spindle override SOV2)
User 1 X24.0
User 2 X24.1
User 3 X24.2
User 4 X24.3
User 5 X24.4
Rapid switch X24.7
Spindle positive override
(218MC-H/-V is spindle override SOV4)
Feed negative override
(218MC-H/-V is the feed override FOV1)
Feed override cancellation
(218MC-H/-V is the feed override FOV2)
Feed positive override
(218MC-H/-V is the feed override FOV4)
Feed override FOV8
(218MC-H/-V)
Feed override FOV16
(218MC-H/-V)
X31.2
X31.3
X31.4
X31.5
X31.6
X31.7
3.2 PLC → Address of the Machine Tool Side (Y)
The Y address of the GSK218MC PLC composes of two types:
1. The Y address is assorted with the three I/O input terminals, namely, XS43, XS44 and XS45.
2. The Y address is assorted with the indicator on the MDI panel of the system.
3.2.1 Y Address on the I/O Output Port
Volume I Programming
The addresses (48 addresses) are defined as INT8U from Y0 to Y5, which are distributed on the
three I/O input terminals, for example, XS43, XS44 and XS45.
Users can define the signal significance of the Y address of the I/O ports based upon the actual cases,
which can be connected the machine tool and compiled the corresponding ladder diagram. Refer to
the appendix one (GSK218MC CNC system PLC I/O address) and the configuration and definition of
the internal software components for the initial definition of the input address.
3.2.2 Y Address on the MDI Panel
There are 8 types from the addresses Y12 ~ Y19 of which these addresses are corresponding with
the button input on the MDI panel one by one. User can not modify its signal definition. PLC system
reports to the CNC system keyboard module after calculating, and it is used for displaying the
indicator signal.
The corresponding relationships of each prompt light:
Table 3-2-2-1
Key-board indicator
output
Edit key indicator Y12.0 Spindle orientation indicator Y15.7
Auto key indicator Y12.1 Tool magazine zero return indicator Y16.0
MDI key indicator Y12.2 Tool magazine CW indicator Y16.1
Zero return key
indicator
Single step key
indicator
Manual key indicator
The signal of G63 bytes are used inside the system, the G63.0, G63.1 and G63.2 are the answer
signal inside the system separately performed by M, S and T.
3.4 CNC →PLC Address (F)
The addresses from F0 to F63 are defined as: INT9U, totally 64 bytes.
Refer to the Chapter Two Function for details.
3.5 Internal Replay Address (R)
The address area is reset when the system is turned on. R510 and R511 are used by the system.
Its definition type is: INT8U, totally 512 bytes.
Address
number
R0
6
7
3
45
012
R511
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 used the signal set by
the initial user. The R510.0 is reset to 0 after the ladder diagram is performed once.
15
Loading...
+ 249 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.