61992e PDF
61992e PDF
61992e PDF
GE Fanuc CNC
DNC2
Descriptions Manual
www.cnccenter.com
GE Fanuc Automation
Computer Numerical Control Products
DNC 2
Descriptions Manual
GFZ-61992E/02
October 1997
GFL-001
Caution
Caution notices are used where equipment might be damaged if care is not taken.
Note
Notes merely call attention to information that is especially significant to understanding and
operating the equipment.
This document is based on information available at the time of its publication. While efforts
have been made to be accurate, the information contained herein does not purport to cover all
details or variations in hardware or software, nor to provide for every possible contingency in
connection with installation, operation, or maintenance. Features may be described herein
which are not present in all hardware and software systems. GE Fanuc Automation assumes
no obligation of notice to holders of this document with respect to changes subsequently made.
GE Fanuc Automation makes no representation or warranty, expressed, implied, or statutory
with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or
usefulness of the information contained herein. No warranties of merchantability or fitness for
purpose shall apply.
Table of Contents
B61992E/02
I. GENERAL
1. GENERAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1
OUTLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
om
II. PROTOCOL
1. LAYERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2. PHYSICAL LAYER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
PHYSICAL INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.2
SYNCHRONOUS METHOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.3
COMMUNICATION MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.4
COMMUNICATION SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
2.5
13
2.6
RS232C INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2.7
RS422 INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
18
ce
nt
e
r.c
2.1
3.1
19
3.2
MESSAGE FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.3
TRANSMISSION CHARACTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.4
21
nc
.c
3.4.1
3.4.2
3.4.3
3.4.4
4. APPLICATION LAYER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
21
22
22
23
FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
4.2
DATAGRAM SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.1
4.2.1
4.2.2
4.2.3
4.2.4
26
27
29
29
4.2.3.2
Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.2.3.3
Data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.2.3.4
30
4.2.3.5
Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
4.2.3.6 Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Details of the Data Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.4.1 Downloading a part program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
31
31
4.2.4.2
32
4.2.4.3
33
4.2.4.4
34
c1
Table of Contents
B61992E/02
34
4.2.4.6
35
4.2.4.7
Servo delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
4.2.4.8
Acceleration/deceleration delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
4.2.4.9
38
38
39
40
41
om
4.2.4.5
42
43
45
45
46
47
r.c
48
49
49
ce
nt
e
50
51
53
54
55
57
57
4.2.4.30 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
nc
DATAGRAM PROTOCOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1
4.3.2
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1.1 Negative acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.c
4.3
58
59
59
59
59
60
60
1. OUTLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
2. CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
3. INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
3.1
SUPPLIED PROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66
3.2
INSTALLATION PROCEDURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.3
68
c2
B61992E/02
4. FUNCTION SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
4.1
USE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
4.2
NOTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
71
4.3
FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72
4.4
DETAILS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
om
103
6.2
103
r.c
105
7.2
107
ce
nt
e
APPENDIX
112
A.2
113
A.3
114
B. PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
FANUC Series 0 (UPPER ROW: Series 0TC, LOWER ROW: Series 0MC) . . . . . . . . . . . . . . . . .
B.2
Series 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
120
B.3
123
nc
B.1
117
.c
E.1
E.2
Series 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
130
130
134
134
135
G.2
136
G.3
137
G.4
138
c3
Table of Contents
G.5
B61992E/02
TROUBLESHOOTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
G.5.1
G.5.2
139
139
139
139
140
om
K.3
146
147
Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compiling and Linking Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Setting the Communication Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
147
147
148
OVERVIEW OF OPERATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
150
K.3.1
K.3.2
K.3.3
K.3.4
K.4
r.c
K.2
OUTLINE OF FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ce
nt
e
K.1
150
150
151
152
MENU LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
K.4.1
K.4.2
K.4.3
153
154
158
nc
L. PMC ADDRESS
(Series 15A AND ADDRESS SPECIFICATION TYPE OF Series 15B) . . . . . 159
.c
161
M.2
162
M.1
EXAMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
M.4
PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
164
M.5
CONNECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
165
M.3
167
N.2
168
c4
r.c
ce
nt
e
nc
.c
om
I. GENERAL
GENERAL
.c
nc
ce
nt
e
r.c
om
1. GENERAL
I. GENERAL
B61992E/02
1. GENERAL
I. GENERAL
1.1
B61992E/02
OUTLINE
om
Personal computer
Application layer
Application layer
ce
nt
e
User
application program
r.c
Physical layer
Physical layer
nc
RS-232-C/RS-422
.c
NOTE
The FANUC DNC2 provides compatibility with the LSV2
protocol for the physical and data link layers. The following
table shows the compatibility of the application layer.
1.1 Compatibility of Application Layer between DNC2 and LSV2
Service function
Compatibility
Compatible
1. GENERAL
I. GENERAL
B61992E/02
(3) This protocol provides the various service functions listed in the
following table. These functions enable automatic machining with
data communication between the FANUC CNC and personal
computer.
Service function
Service function
Writing CNC
d t
data
CNC parameter
Pitch error compensation
Tool offset
Reading
Machine position
d t
CNC data
Absolute position
om
Skip position
Servo delay
Selecting a program
Start
Reset
Alarm notification
ce
nt
e
r.c
Acceleration/deceleration
delay
CNC parameter
nc
Actual speed
.c
Status information
1. GENERAL
I. GENERAL
B61992E/02
0TC
15MA
15TA
15TTA
15MB
15TB
15TTB
16MA
16TA
16GSA
16GCA
16MB
16TB
16MC
16TC
16iMA
16iTA
18MA
18TA
18GSA
18GCA
18MB
18TB
Series 0
0C
C
Series 15
Series 15B
Series 16
16A
A
Series 16
16B
B
18TC
18iMA
18iTA
21iMA
21iTA
Series 16i
16 A
A
Series 18
18A
A
Series 18
18B
B
Series 18
Series 18
18C
C
Series 18i
18 A
A
Series 21i
21 A
A
Series 21
Series 16
Series 16
16C
C
ce
nt
e
nc
18MC
.c
Series 0
Series 15A
r.c
om
Model
2. CONFIGURATION
I. GENERAL
B61992E/02
CONFIGURATION
Option
r.c
om
Series 15
Series
16/18/21
Read/write of custom
macro variables
Background editing
nc
ce
nt
e
DNC2
Application
:
n:
:
:
Required
Optional
Not required
Standard
CNC
.c
PMC
DNC2 ROM
Host computer
DNC2
communication
program library
r.c
ce
nt
e
nc
.c
om
II. PROTOCOL
1. LAYERS
II. PROTOCOL
B61992E/02
LAYERS
FANUC CNC
Application program
ce
nt
e
Application program
Host computer
or
personal computer
r.c
om
Application layer
Physical layer
Physical layer
.c
nc
Application layer
RS-232-C/RS-422
11
2. PHYSICAL LAYER
B61992E/02
PHYSICAL LAYER
.c
nc
ce
nt
e
r.c
om
II. PROTOCOL
12
2. PHYSICAL LAYER
II. PROTOCOL
B61992E/02
2.1
PHYSICAL
INTERFACE
2.2
Asynchronous transmission
SYNCHRONOUS
METHOD
LSB
b1
b2
b3
b4
b5
2.3
:
:
:
:
b8
Half-duplex transmission
COMMUNICATION
MODE
2.4
nc
COMMUNICATION
SPEED
(2) RS-422
: 86400 bps max.
When the communication speed to be used is 38400 bps or more,
synchronization with a receive clock is required. Prepare the TT
(*TT) and RT (*RT) signals.
.c
w
2.5
SP
ce
nt
e
ST
b1 to b8
P
SP
b7
r.c
b6
om
ST
MSB
MAXIMUM CABLE
LENGTH
13
2. PHYSICAL LAYER
II. PROTOCOL
2.6
B61992E/02
RS232C
INTERFACE
CNC unit
Host computer
SD
RD
RD
RS
RS
ER
DR
CD
ER
DR
ce
nt
e
SG
CS
r.c
CS
om
SD
FG
CD
SG
FG
.c
nc
NOTE
When using IBM PCAT, connect RS and CS in the CNC.
(IBM PCAT is a registered trademark of IBM Corporation.)
14
2. PHYSICAL LAYER
II. PROTOCOL
B61992E/02
(2) Signals
Name
RS-232-C
circuit No.
Input/
output
Description
SD
103
Output
RD
104
Input
Send data
RS
105
Output
Request to send
This signal is used to report whether the CNC is
ready to receive data. When the ER signal and
this signal are on, the remote buffer is ready to
receive data.
CS
106
Input
Clear to send
This signal is used to check whether the host
computer is busy. When the DR signal and this
signal are on, the host computer is assumed to
be ready to receive data.
DR
107
Input
ER
108.2
Output
r.c
om
Receive data
ce
nt
e
CNC ready
When this signal is on, the CNC is assumed to
be ready to operate.
The signal is generally connected to the DR
signal at the host computer. When it is off during data transmission, an alarm is issued. If
this signal is not used, be sure to connect it with
the DR signal at the CNC unit.
109
Input
SG
102
Signal ground
FG
101
Protective ground
nc
CD
Function
Signal condition
.c
NOTE
The on and off states of each signal conform to the
following:
15
Less than 3V
+3V or more
Off
On
Marking
Spacing
2. PHYSICAL LAYER
II. PROTOCOL
2.7
RS422 INTERFACE
B61992E/02
Host computer
SD
*SD
*SD
RD
RD
*RD
*RD
RS
RS
CS
*CS
TR
*TR
RR
CS
*CS
TR
.c
nc
ce
nt
e
*RR
*RS
r.c
*RS
om
SD
16
*TR
RR
*RR
TT
TT
*TT
*TT
RT
RT
*RT
*RT
SG
SG
FG
FG
2. PHYSICAL LAYER
II. PROTOCOL
B61992E/02
(2) Signals
Name
RS-422
circuit No.
Input/
output
Description
SD
103
Output
RD
104
Input
Send data
RS
105
Output
Request to send
This signal is used to report whether the CNC is
ready to receive data. When the TR signal and
this signal are on, the remote buffer is ready to
receive data.
CS
106
Input
Clear to send
This signal is used to check whether the host
computer is busy. When the RR signal and this
signal are on, the host computer is assumed to
be ready to receive data.
TR
108.2
Output
Terminal ready
When this signal is on, the CNC is assumed to
be ready to operate.
The signal is generally connected to the RR
signal at the host computer. When it is off during data transmission, an alarm is issued. If
this signal is not used, be sure to connect it with
the RR signal at the CNC unit.
DM
109
Input
r.c
om
Receive data
ce
nt
e
Receiver ready
When this signal is on, the host computer is
assumed to be ready.
The signal generally indicates that the host
computer is ready to send data to the CNC unit.
If this signal is not used, be sure to connect it
with the TR signal at the CNC unit.
113
Output
Transmission timing
Send clock output terminal at the CNC unit.
When a baud rate of 38400 or more is used, be
sure to connect the terminal with the RT signal
at the host computer.
RT
115
Input
Reception timing
Send clock input terminal at the CNC unit.
When a baud rate of 38400 or more is used, be
sure to connect the terminal with the TT signal
at the host computer.
nc
TT
102
Signal ground
FG
101
Protective ground
.c
SG
NOTE
The on and off states of each signal conform to the
following:
Function
Signal condition
A<B
A>B
Off
On
Marking
Spacing
A
Sending terminal
B
A
Receiving terminal
B
17
II. PROTOCOL
B61992E/02
.c
nc
ce
nt
e
r.c
om
The CNC unit and the host computer can operate on equal terms with each
other under this protocol. If a contention occurs, however, the CNC is
given priority over the host computer in data transmission.
18
II. PROTOCOL
B61992E/02
3.1
TRANSMISSION
CONTROL
CHARACTERS
Tcc
Meaning
ISO
ENQ
05H
05H
Request to send
NAK
15H
95H
Negative acknowledgment
DLE 0
10H 30H
90H 30H
Acknowledgment
Acknowledgment
10H 31H
90H B1H
10H 02H
90H 82H
DLE ETX
10H 03H
90H 03H
EOT
04H
84H
Datagram start
Datagram end
End of transmission
.c
nc
ce
nt
e
r.c
DLE 1
DLE STX
om
ASCII
19
II. PROTOCOL
B61992E/02
3.2
MESSAGE FORMAT
DLE
STX
Datagram
DLE
ETX
BCC
r.c
om
(1) Datagram
The datagram consists of command and data sections.
The length of the command section is four characters.
The length of the data section is variable and can contain up to 256
characters.
The maximum length is fixed to 80 characters.
The datagram does not contain the communication control characters.
The datagram must contain the command section. However, the data
section can be omitted.
ce
nt
e
3.3
These characters are usually ASCII code but can also be ISO code.
.c
nc
TRANSMISSION
CHARACTERS
20
II. PROTOCOL
B61992E/02
3.4
DATA LINK
PROTOCOL
Establishing a Data
Link
(A)
Datagram transmission
DLE0
Termination
(A)
EOT
EOT
(A)
ce
nt
e
DLE1
Timeout
ENQ
NAK
Other
r.c
Initial
state
The master device that needs to send the datagram establishes the data
link.
om
3.4.1
Error
(Note) The underlined characters indicate the response from the receiving (slave) device.
nc
3.4.2
Data
link
.c
Sending a Datagram
Termination
DLE]STX]Datagram]DLE]ETX]BCC
DLE1
EOT
NAK/DLE0
Other
Timeout
ENQ
Error
(Note) The underlined characters indicate the response from the receiving (slave) device.
Fig.3.4.2 Sending a Datagram
21
II. PROTOCOL
B61992E/02
3.4.3
Receiving a Datagram
Datagram reception
Data link
establishment
Termination
ENQ
Other
Timeout
Other
(A)
ENQ
DLE0
om
Initial
state
DLE1
NAK
(A)
Error
r.c
ENQ
Timeout
Other
EOT
ce
nt
e
Error
(Note) The underlined characters indicate the response from the sending (master) device.
Fig.3.4.3 Receiving a Datagram
3.4.4
nc
.c
Termination
22
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
APPLICATION LAYER
.c
nc
ce
nt
e
r.c
om
This chapter outlines the application layer. For more details, see the
description given later.
23
4. APPLICATION LAYER
II. PROTOCOL
4.1
B61992E/02
FUNCTIONS
Function
Description
Remarks
H$C
H$C
H!C
H!C
Reading
CNC
data
Machine position
H!C
Absolute position
H!C
Skip position
H!C
Servo delay
H!C
Acceleration/deceleration delay
H!C
Diagnosis
H!C
Reads the states of the DI/DO signals with the specified numbers.
H!C
H!C
H!C
Reads the value of the CNC parameter with the specified number.
H!C
H!C
H!C
H!C
Reads tool life management data with the specified tool group
number.
H!C
CNC parameter
Pitch error compensation data
Tool offset
Custom macro variable
Tool life management data
r.c
H!C
H!C
H!C
H!C
CNC parameter
H!C
H!C
Tool offset
H!C
Writes the specified data to the tool offset parameter with the
specified number.
Actual speed
nc
ce
nt
e
om
H!C
Writes the specified data to the custom macro variable with the
specified number.
H!C
PMC data
H!C
H!C
H!C
Reset
H!C
Alarm notification
HzC
Status notification
HzC
System ID
H!C
.c
Status information
Operator message
24
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2
.c
nc
ce
nt
e
r.c
om
DATAGRAM SYNTAX
The datagram consists of the command section and the omissible data
section. The command section contains four characters. The data section
contains variable-length data. The maximum length of the data section
is specified by the CNC parameter. Subsections 4.2.1 and 4.2.2 list and
explain the datagram commands. Subsection 4.2.4 describes the data
section.
25
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.1
Configuration of
Datagram Commands
Table 4.2.1 Configuration of datagram commands
Listing catalog
DI
Catalog request
LI
Clear
MC
Operation mode
Receive
Transmit
Prepare to send
PT
Prepare to receive
PR
A
Second entry
r.c
om
Fist entry
h/c
h/c
h/c
h/c
AD
h/c
Acc./Dec error
AE
h/c
Actual feedrate
AF
h/c
Alarm status
AL
h/c
BD
h/c
CC
h/c
NC Start
CS
h/c
Operator message
DI
h/c
Command error
ER
10
End of message
FD
h/c
ce
nt
e
h/c
11
Free memory
FR
h/c
h/c
12
System Identifier
ID
h/c
h/c
13
Modal data
MD
h/c
h/c
14
MI
h/c
h/c
15
Machine position
MP
h/c
h/c
16
Macro variable
MV
h/c
17
Next block
18
Not position
19
Incorrect number
20
Function ready
21
Parameter
22
PMC data
23
Pitch error
24
Part program
25
PN
26
Ready to receive
RR
27
Ready to transmit
RT
28
SE
29
SL
30
Sequence number
SN
h/c
h/c
31
Skip position
SP
h/c
h/c
h/c
h/c
nc
h/c
NB
h/c
NP
h/c
h/c
NR
h/c
OK
h/c
h/c
PD
h/
h/c
h/c
PE
h/c
h/c
h/c
PM
h/c
h/c
h/c
.c
h/c
h/c
PA
w
w
h/c
h/c
h/c
h/c
Status
ST
33
TL
34
Tool offset
TO
35
Absolute position
WP
h/c
h/c
h/c
h/c
h/c
h/c
32
h/c
h/c
NOTE
h/
/c
Blank
h/c
h/c
h/c
h/c
h/c
h/c
h/c
:
:
:
:
26
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.2
(1) Commands from the host
Service function
Datagram command
Downloading
<PR><PM><nn>
Uploading
<PT><PM><nn>
Deleting a program
<MC><PM><nn>
Directory information
<LI><PM> [<nn>]
<T ><FR>
<T ><MI><nn>[<:><mm> ]
10
Reading a program or
sequence number
11
<PT><PA><nn> [<,><0Xmm> ]
12
<PR><PA>
13
<PT><PE><mm> [<:><nn> ]
r.c
om
ce
nt
e
Service Functions
Specified with
Datagram Commands
<PR><PE>
15
16
<PR><TO>
17
<PT><MV><mm> [<:><nn> ]
18
<PR><MV>
19
<PT><TL><mm> [<:><nn> ]
20
<T ><MD><mm>
21
<T ><AF><0Xmm>
22
23
<T ><AL>
24
25
Displaying an operator
message
26
<PT><PD><0Xaa | mm><,><nn>
27
<PR><PD>
28
Selecting a program
<M ><SL><nn>
29
Executing a program
30
<M ><CC>
31
Reading a system ID
<T ><ID>
.c
nc
14
NOTE
With the Series 15TTA/TTB, nineteen functions are
supported; none of these are related to the head. These
functions are functions 1 to 9, 11 to 14, 22, 25 to 27, 30, and
31.
27
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
Datagram command
Downloading
<PT><PM><nn>
Uploading
<PR><PM><nn>
Deleting a program
Directory information
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
r.c
om
nc
ce
nt
e
Selecting a program
29
Executing a program
30
31
Reading a system ID
.c
28
NOTE
The service functions marked with an asterisk (*) are not
supported.
28
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.3
Notation of the
Datagram
4.2.3.1
<>
[]
: Datagram entry
: Brackets for a datagram entry (A datagram entry enclosed in
these brackets can be omitted.)
{}
: Braces for a datagram entry (A datagram entry enclosed in these
braces must not be omitted.)
|
: Delimiter for datagram entries
0X
: Prefix of hexadecimal data
Blank : Space character in ASCII or ISO code
4.2.3.2
Format
Data section
ce
nt
e
Command section
r.c
om
Symbols
2 bytes
2 bytes
Variable length
1st entry
2nd entry
nc
4.2.3.3
.c
Data type
29
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
12345
123.4567895
0XFF1234
ABCDEFGHI
om
SI:4
SR:9
HX:4
CH:8
4.2.3.4
Delimiter in the data
section
4.2.3.5
ce
nt
e
r.c
Only a comma (,) and colon (:) can be used as a delimiter. A space is
ignored except when it is used for charactertype data.
The end of the data section is assumed to be a delimiter.
nc
Code
4.2.3.6
.c
Continuation
The data section can be continued only for the datagram of the response
to the <PR> or <PT> command.
If the length of the data section exceeds the maximum length, the data is
divided into more than one datagram when it is transmitted.
Continuation in the data section is not limited except for group data that
consists of multiple data items. (The group data cannot be divided when
it is transmitted.)
Example)
Correct)
<R ><PM><G01X100.Y1>
<R ><PM><23.4Z50.0F200;>
G01X100.Y123.4Z50.0F200;
Incorrect)
<R ><TO><N10D15H5N11D16>
<R ><TO><H6N12D17H7>
30
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4
Details of the Data
Section
4.2.4.1
(1) Function
1) This command transfers a part program to the CNC according to
the commands issued by the host computer.
2) This command transfers a part program to the CNC according to
the commands issued by the CNC.
om
Downloading a part
program
Host
<PR><PM><nn>
r.c
CNC
<M ><RR>
<R ><PM><program>
ce
nt
e
<T ><NB>
<R ><PM><program>
<T ><NB>
<T ><FD>
<M ><OK>
CNC
<PT><PM><nn>
nc
<M ><RT>
<T ><NB>
<R ><PM><program>
<T ><NB>
.c
<R ><PM><program>
<T ><NB>
<T ><FD>
<M ><OK>
(3) Parameters
1) nn
Part program
; M30; %
NOTE
The above program number nn must be the same as nn in
command <PT | PR> <PM> <nn>. The semicolon (;)
functions as end of block. Actually, the semicolon is a EOB
code defined in the CNC such as an LF code (0AH).
31
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
om
4.2.4.2
r.c
(1) Function
1) This command transfers a part program from the CNC according
to the commands issued by the host computer.
2) This command transfers a part program from the CNC according
to the commands issued by the CNC.
ce
nt
e
Uploading a part
program
CNC
<PT><PM><nn>
<M ><RT>
<T ><NB>
<R ><PM><program>
nc
<T ><NB>
<R ><PM><program>
<T ><NB>
<T ><FD>
.c
<M ><OK>
CNC
<PR><PM><nn>
<M ><RR>
<R ><PM><program>
<T ><NB>
<R ><PM><program>
<T ><NB>
<T ><FD>
<M ><OK>
<M ><OK>
(3) Parameters
1) nn : Program number (UI: 4)
Only a program can be downloaded using this parameter.
2) program: Program statement (CH: 256)
This statement is in the tape output format.
See 2) in (3) of Subsection 4.2.4.1.
32
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
No program is found.
An alarm occurred in the CNC.
(For Series 0 only)
4.2.4.3
(1) Function
This command deletes a part program from memory.
(2) Datagram transmission
Host
<MC><PM><nn>
CNC
r.c
om
(5) Note
Release background edit mode and simultaneous edit mode (Series
15 only) in advance.
<M ><OK>
ce
nt
e
(3) Parameter
nn : Program number (SI: 4)
If nn is 9999, all programs are deleted.
(5) Notes
1) In Series 15, the currently selected program cannot be deleted if
the command for deleting all programs is issued in the memory
mode.
2) Release background edit mode and simultaneous edit mode
(Series 15 only) in advance.
.c
nc
33
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.4
Reading the directory of
part programs
(1) Function
This command reads the directory of part programs in memory.
(2) Datagram transmission
Host
CNC
<LI><PM> [<nn>]
<M ><RT>
<T ><NB>
<T ><FD>
<M ><OK>
om
<DI><PM><nn> [<<,><nn>>. . .]
<T ><NB>
ce
nt
e
r.c
(3) Parameter
nn: Program number (UI: 4)
If the program number is omitted, all program numbers are
reported.
If the program number is specified, the host computer checks
whether the program is found in program memory.
nc
4.2.4.5
(1) Function
This command issues a request from the host computer to the CNC
for sending data on the size of the free area in program memory in
bytes.
.c
CNC
<T ><FR>
<R ><FR><nn>
<M ><OK>
(3) Parameter
nn : Size of the free area in program memory (UI: 9)
(4) Negative acknowledgment
None
34
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.6
Reading a tool position
(1) Function
This command reads the current tool position.
1) Absolute coordinate position
2) Machine coordinate position
3) Skip position
(2) Datagram transmission
CNC
om
Host
<T ><WP | MP | SP>
[<0Xmm>]
ce
nt
e
NOTE
<T><WP> :
<T><MP> :
<T><SP> :
r.c
<M ><OK>
(3) Parameters
1) mm: Axis request flag (HX: 4)
If mm is omitted, all axis positions are transferred.
0X indicates that mm must be specified in hexadecimal.
15 14 13 12
11 10 9
.c
nc
Bit
0
1st axis
2nd axis
15th axis
Not used
35
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.7
(1) Function
This command reads the current servo delay.
Servo delay
CNC
om
<M ><OK>
15 14 13 12
11 10 9
ce
nt
e
Bit
r.c
(3) Parameters
1) mm: Axis request flag (HX: 4)
If mm is omitted, all axis positions are transferred.
0X indicates that mm must be specified in hexadecimal.
3
0
1st axis
2nd axis
15th axis
Not used
.c
nc
36
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.8
(1) Function
This command reads the current acceleration/deceleration delay.
Acceleration/
deceleration delay
CNC
om
<M ><OK>
15 14 13 12
11 10 9
ce
nt
e
Bit
r.c
(3) Parameters
1) mm: Axis request flag (HX: 4)
If mm is omitted, all axis positions are transferred.
0X indicates that mm must be specified in hexadecimal.
3
0
1st axis
2nd axis
15th axis
Not used
.c
nc
37
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.9
(1) Function
This command reads the machine interface signals (DI/DO) specified
with diagnosis numbers.
Machine interface
signals
(For Series 15 only)
CNC
om
<T ><MI><mm>
[<:><nn> ]
<R ><MI><0Xdd> [<,><0Xdd>]..
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) mm: First diagnosis number to be read (UI: 3)
2) nn : Last diagnosis number to be read (UI: 3/mm < nn)
The DI/DO signal data items from mm to nn are
transmitted.
If nn is omitted, one signal data item is transmitted.
3) dd : DI/DO signal data (HX: 2)
The data is transmitted in hexadecimal.
(4) Negative acknowledgment
M_NR [0XFFCA]: The diagnosis number is incorrect.
nc
(5) Note
The maximum number of DI/DO data items are limited to L/5 by the
length of the datagram.
(L is the length of the datagram.)
4.2.4.10
(1) Function
This command reads the current program number and sequence
number.
.c
CNC
NOTE
<M><PN>: Reads the program number.
<M><SN>: Reads the sequence number.
(3) Parameter
nn : Current program number (UI: 4) or the latest sequence number
specified in the program (UI: 4 for Series 0/16/18/21 or UI: 5
for Series 15)
(4) Negative acknowledgment
None
38
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.11
(1) Function
This command reads a CNC parameter.
Reading a CNC
parameter
CNC
<PT><PA><nn> [<,><OXmm>]
<M ><RT>
<T ><NB>
om
<T ><FD>
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) nn : Number of the parameter to be read (UI: 4)
2) mm : Axis request flag (HX: 4)
mm must be specified when the parameter is of axis type.
3) Nnn : nn is the parameter number. (UI:4)
4) Pvv : vv is the parameter value. (SI:10)
5) Ax : x is the axis exponent. (UI: 2/1 to 15)
If nn is of axis type, Ax is transmitted.
.c
nc
39
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.12
Writing a CNC parameter
(1) Function
This command writes a CNC parameter.
(2) Datagram transmission
Host
CNC
<PR><PA>
<M ><PR>
<R ><PA><Nnn> <Pvv> |<Ax><Pvv> [<Ax><Pvv> ]..>
om
<T ><NB>
<T ><NB>
<T ><FD>
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) Nnn : nn is the parameter number. (UI: 4)
2) Pvv : nn is the parameter value. (SI: 10)
3) Ax : x is the axis exponent. (UI: 2/1 to 15)
If nn is of axis type, Ax is transmitted.
.c
nc
40
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.13
(1) Function
This command reads pitch error compensation data.
CNC
<PT><PE><mm> [<:><nn> ]
<M ><RT>
<T ><NB>
om
<R ><PE><Nnn><Pvv>
[<Nnn><Pvv> ]..
<T ><NB>
<T ><FD>
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) mm : First pitch error compensation number to be read (UI: 4)
With the Series 15/16/18/21, the number starts with 0.
With the Series 0, the number starts with 1000. (This
number is the same as the parameter number.)
2) nn : Last pitch error compensation number to be read
(UI: 4 / 1mm < nn9999)
3) Nnn : nn is the pitch error compensation number. (UI: 4)
4) Pvv : vv is the compensation corresponding to the specified
pitch error compensation number. (SI: 1 / 7vv7)
nc
.c
(5) Note
This command can read only the pitch error compensation from the
CNC. To read other parameters, use the <PT><PA> command.
41
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.14
(1) Function
This command writes pitch error compensation.
CNC
<PR><PE>
<M ><RR>
<R ><PE><Nnn><Pvv>[<Nnn><Pvv>]..
om
<T ><NB>
<R ><PE><Nnn><Pvv>[<Nnn><Pvv>]..
<T ><NB>
<T ><FD>
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) Nnn : nn is the pitch error compensation number. (UI: 4)
2) Pvv : Compensation corresponding to the specified pitch error
compensation number (SI: 1 / 7vv7)
(4) Negative acknowledgment
1) M_NR [0XFBA5]:
The parameter is invalid. (For Series 0/16/18/21)
2) M_NR [0XFBA4]:
The parameter is invalid. (For Series 15)
3) M_NP [0XFB9E]:
No option is found. (For Series 0/16/18/21)
.c
nc
(5) Note
This command can write only the pitch error compensation into the
CNC. To write other parameters, use the <PR> <PA> command.
42
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.15
Reading a tool offset
(1) Function
This command reads a tool offset.
(2) Datagram transmission
Host
CNC
<PT><TO><mm> [<:><nn> ]
<M ><RT>
<T ><NB>
om
<T ><FD>
r.c
ce
nt
e
(3) Parameters
1) mm: First tool offset number to be read (UI: 4)
2) nn : Last tool offset number to be read
(UI: 4 / 1mm <nn9999)
3) kk : Offset request flag (HX: 4)
bit
:Wear offset
:Geometry offset
:Wear offset
:Wear offset
:Wear offset
:Wear offset
:Virtual tool tip direction
:Not used
:Wear offset
:Geometry offset
:Geometry offset
:Geometry offset
:Geometry offset
:Geometry offset
:Not used
:Not used
.c
nc
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
D:
K:
X:
Z:
R:
Y:
:
Cutter compensation
Cutter compensation
Offset along the X axis
Offset along the Z axis
Tool tip radius compensation
Offset along the Y axis
Q
H:
L:
U:
W:
P:
V:
NOTE
(D, K, H, L) : Offsets for the milling machine
(X, Z, R, Y, Q, U, W, P, V) : Offsets for the lathe
Both the offset request flags must be mutually exclusive
when they are set.
Example) 0X3F00 : Incorrect
0X3C7C: Correct
43
4. APPLICATION LAYER
II. PROTOCOL
om
4) Nnn :
5) Dvv :
Kvv :
Hvv :
Lvv :
Xvv :
Zvv :
Rvv :
Yvv :
Qvv :
Uvv :
Wvv :
Pvv :
Vvv :
B61992E/02
r.c
ce
nt
e
(5) Note
Table 4.2.4.15 describes how the tool compensation memory type
and request flag are specified.
Table 4.2.4.15 Relationships between Tool Compensation Memory Type and Request Flag
15
14
12
Memory
type
T
Series0
M
T
Series15
Series
16/18/21
10
: Ignored
: Specifiable
: Not specifiable
44
0
M
11
.c
Model
12
nc
Request flag
b : Standard
o : Option
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.16
(1) Function
This command writes a tool offset.
CNC
<PR><TO>
om
<M ><RR>
<R ><TO>{<Nnn><Dvv>[<Kvv>
[<Hnn><Lvv>]] |
<Xvv><Zvv><Rvv><Yvv><Qvv>
[<Uvv><Wvv><Pvv><Vvv>]>}..
<T ><NB>
<T ><FD>
r.c
<M ><OK>
(3) Parameters
See 3) and 4) in item (3) of Subsection 4.2.4.15.
4.2.4.17
Reading custom macro
variables
ce
nt
e
(1) Function
This command reads custom macro variables.
nc
CNC
<PT><MV><mm> [<:><nn>]
<M ><RT>
.c
<T ><NB>
<R ><MV><Nnn><Pvv>
[<Nnn><Pvv>] ..
<T ><NB>
<T ><FD>
<M ><OK>
(3) Parameters
1) mm : First custom macro variable number to be read (UI:5)
2) nn : Last custom macro variable number to be read
(UI:5 / mm < nn)
3) Nnn : nn is the custom macro variable number. (UI:5)
4) Pvv : Value of custom macro variable nn (SR:9)
(4) Negative acknowledgment
M_NR[0XFFCA] :
The custom macro variable number is incorrect, or no option is
found.
45
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.18
Writing a custom macro
variable
(1) Function
This command writes a value in the specified custom macro variable.
(2) Datagram transmission
Host
CNC
<PR><MV>
om
<M ><RR>
<R ><MV><Nnn><Pvv>
[<Nnn><Pvv>] ..
<T ><NB>
<R ><MV><Nnn><Pvv>
[<Nnn><Pvv>] ..
<T ><NB>
<T ><FD>
<M ><OK>
r.c
<M ><OK>
ce
nt
e
(3) Parameters
1) Nnn : nn is the custom macro variable number. (UI:5)
2) Pvv : Value of custom macro variable nn (SR:9)
nc
.c
(5) Note
With the Series 0, the custom macro variables in which data can be
written are #100 to #149 and #500 to #531 of custom macro A (integer
data). Data cannot be written into the extended area.
46
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.19
(1) Function
This command reads tool life management data with the specified
group number.
CNC
<PT><TL><mm> [<:><nn>]
om
<M ><RT>
<T ><NB>
<T ><FD>
r.c
<M ><OK>
ce
nt
e
(3) Parameters
1) mm :
2) nn :
3) Pnn :
4) Lnn :
5) Qnn :
Ttt
Hhh
Ddd
Ccc
:
:
:
:
.c
nc
6)
7)
8)
9)
.
.
47
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.20
Reading modal
information for
automatic operation
(1) Function
This command reads the previous, current, or next modal data.
(2) Datagram transmission
Host
CNC
<T ><MD><mm>
om
ce
nt
e
r.c
(3) Parameters
1) mm
: Block selection (UI:1, any of 0, 1, and 2)
0 : Previous block
1 : Current block
2 : Next block
2) Ggg.vv : Modal data of G code
gg : G code group number (UI:2)
vv : Internal G code (UI:2)
VV must be specified using two digits.
3) Ddd to Fff : Modal data required in the selected block
Ddd | Hhh | Lll :
Mmm
:
Nnn
:
Ooo | Sss | Ttt :
Eee | Fff
:
UI:4
UI:3
UI:5
UI:4
UR:9
nc
.c
(5) Note
If no modal data is specified, only the <R ><MD > command is
transmitted, and the data section is omitted.
For internal G code values, see the table in Appendix H.
48
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.21
(1) Function
This command reads the feedrate of each axis or the composite
feedrate of all axes.
(2) Datagram transmission
Reading an actual
feedrate
Host
CNC
om
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) mm: Axis request flag (hexadecimal) (HX:4)
This parameter is available for Series 15 only.
For the function of the parameter, see item (3) in
Subsection 4.2.4.8.
If mm is omitted, the composite feedrate of all axes is
transmitted.
2) vv : Feedrate of each axis (UR:9)
vv is transmitted in ascending order of axis numbers.
(1_>2_>3_>...)
(4) Negative acknowledgment
M_NR [0XFFCC] : The axis parameter is invalid.
4.2.4.22
Reading A/D conversion
data
(1) Function
This command reads A/D conversion data.
(2) Datagram transmission
nc
Host
CNC
.c
<M ><OK>
(3) Parameters
1) nn : A/D conversion data selection (UI:3)
0 to 1 : General-purpose analog input (Series 15)
0 to 3 : General-purpose analog input (Series 0)
100 : Voltage to which the analog input value of the load
current for the 1st spindle is onverted
101 : Voltage to which the analog input value of the load
current for the 2nd spindle is converted
200 : Voltage to which the load current for an NC control
axis is converted.
The 2nd parameter, 0Xmm, is required for this case.
2) mm: Axis request flag (HX:4)
For the function of this parameter, see item (3) in
Subsection 4.2.4.8.
3) vv : Read voltage obtained by conversion (SI:10)
10 * (voltage ] 128)/128 volts
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.23
(1) Function
This command reads alarm information.
Reading alarm
information
CNC
<T ><AL>
<R ><AL><0Xaa> [<,><cc>] ..
om
<M ><OK>
ce
nt
e
r.c
(3) Parameters
aa : Alarm information (HX:4)
Bit
0 : Background PS alarm
(PS alarm stands for program setting alarm.)
1 : Foreground PS alarm
2 : Overheat alarm
3 : Not determined
4 : Not determined
5 : SW alarm (parameter input enable)
6 : OT alarm (overheat label/spindle alarm)
7 : PMC error
8 : External alarm
9 : Not determined
10 : Fatal PS alarm
11 : Not determined
12 : Servo alarm
13 : I/O alarm
14 : PW alarm (Power off request)
15 : Not determined
.c
nc
50
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.24
(1) Function
This command reads status information.
Reading status
information
CNC
<T ><ST>
om
CNC
r.c
<M ><OK>
<R ><ST><0Xss>
ce
nt
e
<M ><OK>
<M ><OK>
.c
nc
(3) Parameters
1) mm: Mask bit for information to be transmitted (HX:4)
Each bit corresponds to the ss bit.
1 : Masked (not transmitted)
0 : Not masked (transmitted)
The initial value is 0XFFFF.
If mm is omitted, all the bits are enabled (transmitted).
2) ss : CNC status (HX:4)
Bit
0 : Rewind (RWD)
1 : Alarm (AL)
2 : Rest (RST)
3 : Automatic operation currently stopped (SPL)
4 : Automatic operation currently started (STL)
5 : Automatic operation in process (OP)
6 : Servo ready (SA)
7 : CNC ready (MA)
8 : Not used
9 : Not used
10 : Not used
11 : Not used
12 : M00 output (M00)
13 : M01 output (M01)
14 : M02 output (M02)
15 : M30 output (M30)
3) aa : Alarm information (HX:4)
For the alarm information, see the parameter described in
Subsection 4.2.4.23.
When AL of code ss is 1, alarm status code aa is transmitted
after the code ss.
51
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
r.c
om
ce
nt
e
.c
nc
(5) Notes
1) In automatic notification mode, <R ><ST> or <R ><AL> is
automatically transmitted from the CNC.
<R ><AL> is transmitted only when an alarm is issued.
2) In automatic notification mode, no commands other than
<M><ST> can be transmitted from the host.
3) When the status is updated while the host is issuing another
request (such as a request to download a program), information
about the first status change is posted to the host by automatic
notification from the CNC after the termination of the preceding
request.
This is because the DNC2 protocol cannot handle more than one
request at any one time. So, automatic notification processing is
held during processing of the preceding request.
Example
Start
End
Download
Automatic
notification
Information of this
status change is
not posted.
Status
change
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.25
(1) Function
This command displays the operator messages on the Screen of the
CNC.
Operator messages
CNC
<M ><DI><nn><,><message>
om
<M ><OK>
ce
nt
e
r.c
(3) Parameters
1) nn
: Message number (SI:1 / 1 to 5 or 1 to 5)
Five different messages can be displayed at a time
because the CNC has five message areas.
If nn is negative, the old message on the Screen is
cleared, and a new message stored in the first area is
displayed first. If nn is positive, a new message is
added and displayed after the old message on the
Screen.
Each message area can contain up to 128 characters.
2) message : Message in ASCII code to be displayed on the
Screen (CH:32)
Up to 32 characters of the message can be displayed
at a time.
.c
nc
53
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.26
(1) Function
Data in the PMC area is read.
CNC
om
<PT><PD><0Xaa |mm|ammmm>
<, ><nn>
<M ><RT>
<T ><NB>
r.c
<T ><FD>
<N ><OK>
ce
nt
e
b) Type B
Host
CNC
<T ><PD><0Xaa|mm|ammmm>
<R ><PD>
<N0Xaa|Nmm|Nammmm><P0Xvv>
<M ><OK>
(3) Parameters
1) aa
.c
nc
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
NOTE
The PMC data number must consist of five numeric
characters if address <a> is a nonzero value.
om
2) nn
: Number of bytes to be read from address aa (UI:2/1 nn 32)
3) NOXaa : Starting address of read data (POXvv) (HX: 8)
4) POXvv : PMC data value (HX: 2)
The value is posted for each byte.
r.c
4.2.4.27
(1) Function
Data is written into the PMC area.
The host computer communicates with the PMC application
software.
FANUC does not define the meanings of the addresses in RAM.
These depend on the settings made between the host computer and
CNC.
ce
nt
e
CNC
nc
<PR><PD>
<M ><RR>
.c
<T ><FD>
<M ><OK>
b) Type B
Host
CNC
(3) Parameters
1) aa
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
r.c
om
mm
ce
nt
e
NOTE
The PMC data number must consist of five numeric
characters if address <a> is a nonzero value.
2) POXvv: Byte written in the PMC RAM (HX: 2)
nc
.c
(5) Note
It is recommended that the data access direction for each PMC RAM
be determined explicitly between the host computer and PMC.
Otherwise, when the host computer and PMC attempt to write data
to the same RAM address at the same time, a contention occurs (if two
units attempt to write the same address at the same time, the write
processing being performed by one of the two units will fail).
56
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.28
Selecting a part program
(1) Function
This command selects a part program on tape storage.
(2) Datagram transmission
Host
CNC
<M ><SL><nn>
(3) Parameter
nn : Part program number (UI:4)
om
<M ><OK>
ce
nt
e
r.c
4.2.4.29
(1) Function
This command selects and executes a program.
nc
Executing a program
CNC
.c
(3) Parameter
nn : Part program number (UI:4)
If this parameter is specified, the CNC selects part program nn
and executes it. If it is omitted, the CNC executes the currently
selected part program.
(4) Negative acknowledgment
1) M_NR [0XFC0C] :
Program nn is not found.
2) M_NR [0XFC09] :
The mode is incorrect. (Neither AUTO mode nor MEM mode)
3) M_NR [0XFC0A] :
Program nn is already being executed, or the CNC is in the
alarm status.
4) M_NR [0XFC08] :
Selecting the program was rejected.
The command for selecting program nn is issued again
during automatic operation.
57
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.30
(1) Function
This command resets the CNC. It functions in the same way as the
external reset (ERS) signal of the machine interface.
Reset
CNC
<M ><CC>
(3) Parameters
None
r.c
4.2.4.31
(1) Function
This command reads information on the system ID.
ce
nt
e
Reading a system ID
om
<M ><OK>
CNC
<T ><ID>
<M ><OK>
.c
nc
(3) Parameters
1) model name : CNC model name
F15M9A/F15M14/F15T9A/F15T14
(Series 15)
FS0MC/FS0TC (Series 0)
F16MA/F16TA/F18MA/F18TA
(Series 16/18A)
F16MB/F16TB/F18MB/F18TB
(Series 16/18B)
F16MC/F16TC/F18MC/F18TC
(Series 16/18C)
F16iMA/F16iTA/F18iMA/F18iTA/
F21iMA/F21iTA (Series 16i/18i/21iA)
2) revision
: CNC DNC2 software revision
1.0 (Series 15)
1.1 (Series 0/16/18/21)
58
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.3
This section describes the datagram protocol between the FANUC CNC
and the host computer.
DATAGRAM
PROTOCOL
4.3.1
Error Handling
om
4.3.1.1
(1) Syntax
Negative
acknowledgment
ce
nt
e
r.c
(2) Functions
T_BD: Sent if the datagram protocol is incorrect. See Appendix D.
M_ER: Sent if a syntax error is detected in the datagram.
M_NR: Sent if the number given in the data section of the preceding
datagram is incorrect.
M_NP: Sent if executing commands in the preceding datagram is
rejected.
T_NP: Sent if the CNC cannot access the requested data.
M_IL: Sent if errors other than the above occur.
(3) Error code
eeee : This four-digit hexadecimal code indicates the cause of the
error. The parameter specifies whether the code is output.
See Appendixes B and F.
4.3.1.2
.c
nc
(4) Protocol
The receiving device sends a negative acknowledgment to the
sending device. The negative acknowledgment indicates that an error
occurred in the receiving terminal.
The device that sent the negative acknowledgment and the device that
received it must interrupt transmission immediately and return to the
initial state.
Interrupt command
(1) Syntax
<T_BD>
(2) Function
The interrupt command forcibly terminates processing currently
being transmitted. Either the CNC unit or the host computer can send
this command at any time.
(3) Protocol
As soon as the terminal receives the interrupt command, it interrupts
transmission and returns to the initial state. When the terminal is in
the initial state, it ignores the interrupt command. This command is
used to forcibly return the application layer to the initial state.
59
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.3.2
Interrupt Procedure
4.3.2.1
Interrupt
Sending device
CASE : A
Command A11
om
r.c
Response A11
Command B11
Response B11
Command B12
Interrupt by the
sending device
Response B12
ce
nt
e
Command A12
Response A12
CASE : B
Command A21
Response A21
Response B21
Command B21
Response B22
Command B22
Command A22
.c
nc
Response A22
60
om
.c
nc
ce
nt
e
r.c
B61992E/02
1. OUTLINE
OUTLINE
om
r.c
.c
nc
ce
nt
e
63
2. CONFIGURATION
B61992E/02
CONFIGURATION
IBM PC series
r.c
Others
om
Model :
OS
:
Compiler:
Memory :
ce
nt
e
FMR50/60/70
MSDOS Ver. 3.1 or later
MSC compiler Ver. 5.0 or later
The communication package library alone uses 134K
bytes of memory.
: The demonstration program is designed for high
resolution
Others
NOTE
Memory requirements vary somewhat depending on
whether the config.sys file contains the specifications of
files and buffers. Memory requirements are also increased
by the size of device drivers such as print.sys, if included.
.c
nc
Model :
OS
:
Compiler:
Memory :
64
B61992E/02
INSTALLATION
.c
nc
ce
nt
e
r.c
om
3.
65
3.
3.1
SUPPLIED
PROGRAMS
LIB
DNC2DFF.H
Header file
DNC2NECL.LIB
DNC2IBML.LIB
DNC2FMRL.LIB
om
B61992E/02
DEMO
SRC
D2_DEMO.H
r.c
D2_GLB.H
D2_PRT.H
D2DTEXT.H
D2DTGLB.C
D2_UTNEC.C
D2_UTIBM.C
D2_UTFMR. C
IBM_DEMO.MAK
98_DEMO.MAK
FMR_DEMO.MAK
DEMOIBM. EXE
nc
DNC2SYS.CFG
ce
nt
e
DEMO_MAN.C
D2_DEMO.C
LOG
LOG.EXE
.c
SRC
Executable file of DNC2 communication program library error log inspection program
LOG.C
66
B61992E/02
3.
3.2
INSTALLATION
PROCEDURE
Copy the header file and the library for the model to be used to the
directory (the directory to be compiled) in which application files exist.
The following shows the method for copying files from the floppy disk
in drive A to the DNC2 directory in the hard disk in drive C.
om
C>CD \DNC2
C>COPY A: \LIB \DNC2DEF. H C:
C>COPY A: \LIB \DNC2IBML. LIB C:
.c
nc
ce
nt
e
r.c
NOTE
For IBM PC/AT, replace the yen signs with backslashes.
67
3.
3.3
COMPILATION AND
LINKING
B61992E/02
(1) Compiler
The object compiler is version 5.0 or a later version of the MSC
compiler produced by Microsoft.
#include dnc2def. h
om
r.c
ce
nt
e
BINR \
LIB \
INCLUDE \
:
:
:
Compiler
Standard library
Include file
.c
nc
C:\
68
B61992E/02
FUNCTION SPECIFICATIONS
.c
nc
ce
nt
e
r.c
om
4. FUNCTION SPECIFICATIONS
69
4. FUNCTION SPECIFICATIONS
4.1
B61992E/02
Call functions in the calling format shown in Section 4.4. If the types of
arguments agree, it does not matter whether the variable names differ.
USE
The return values of functions are always of the short type. As required,
convert them to a proper type (cast) for use.
Example) test( )
.c
nc
ce
nt
e
r.c
om
{
short ans;
char ch;
short ax;
bouble dt [15];
:
:
ch = 0;
bit = 0x01;
:
:
if (( ans = D_servo (ch, bit, &dt [0])) << 0) {
/* Error handling */
if (ans == 1) {
:
} else if (ans == 2) {
:
:
}
}
:
:
}
70
B61992E/02
4.2
4. FUNCTION SPECIFICATIONS
(1) These functions do not return until communication with the NC unit
terminates completely.
Note that downloading/uploading or other timeconsuming processes
disable other processes.
NOTES
om
r.c
(5) Before calling functions that output results to memory, allocate a free
space large enough to store results. The functions assume that an area
for storing results is allocated.
ce
nt
e
.c
nc
71
4. FUNCTION SPECIFICATIONS
4.3
Function
Description
Part program download
PRPM
D_download_wait
PTPM
wait
D_upload
PTPM
4
5
D_delete
MCPM
LIPM
D_alldir
LIPM
D_alldir_mem
LIPM
8
9
D_freemem
T FR
T MP
T WP
T SP
D_fdir
D_tool_pos
10
11
12
D_servo
13
D_exec_num
om
D_download
D_AccDec
T SE
T AE
T MI
T PN
T SN
ce
nt
e
D_diagnose
14
15
16
D_parameter_r
17
18
D_pitch_r
19
20
21
D_pitch_w
22
23
D_offset_r_mem
24
25
26
D_offset_w_mem
27
28
D_variable_w
D_parameter_w
D_parameter_w_mem
D_pitch_r_mem
D_pitch_w_mem
D_offset_r
PTPA
PRPA
PRPA
PTPE
PTPE
PRPE
PRPE
PTTO
PTTO
PRTO
PRTO
PTMV
PTMV
PRMV
PRMV
PTTL
PTTL
29
30
D_toollife
31
D_modal
T MD
32
D_modal_mem
T MD
33
34
35
D_actualspeed
T AF
T AD
T AL
36
37
38
D_status
D_PMCdata_r
T ST
T DI
PTPD
T PD
39
D_PMCdata_w
PRPD
R PD
40
D_select
M SL
41
42
43
D_start
D_systemID
Cycle start
Reset
Reads system ID.
M CS
M CC
T ID
44
D_initial
.c
nc
D_offset_w
w
w
w
Send
command
r.c
FUNCTIONS
B61992E/02
D_variable_r
D_variable_r_mem
D_variable_w_mem
D_toollife_mem
D_ADconcert
D_alarm
D_message
D_reset
72
B61992E/02
4. FUNCTION SPECIFICATIONS
4.4
DETAILS
: char ch_no
Cannel number (0 to 3) <numeric value>
om
Arguments
uchar *file_name
ce
nt
e
r.c
: D_download_wait
Waits for download request and starts download
of part program.
Calling format : short D_download_wait (char ch_no)
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
Normal
Return value : = 0
= FFFF Communication error
= FFFE File open error
= FFFD File read error
= FFF0 Sequence error
Others See Appendix F.
Outline
: Waits for a download request from the CNC.
On receiving a download request, determines the
file name as <0xxxx.PRG> from the requesting
program number and starts download. (For
example, if the program number is 1, the file name
is <O0001.PRG>.)
This function terminates after downloading one
file.
This function is used to start downloading when a
CNC cycle is started as in DNC operation.
.c
nc
2) Function
4. FUNCTION SPECIFICATIONS
B61992E/02
r.c
om
ce
nt
e
Arguments
uchar *file_name
char *prg_no
4) Function
: D_delete Deletes part programs.
Calling format : short D_delete
(char ch_no, char *prg_no)
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
char *prg_no
.c
nc
Return value
Outline
74
B61992E/02
4. FUNCTION SPECIFICATIONS
5) Function
: D_fdir
om
Note
: char ch_no
Channel number (0 to 3) <numeric value>
r.c
Arguments
char *prg_no
ce
nt
e
Return value
Outline
6) Function
: D_alldir
.c
nc
Arguments
uchar *file_name
Number of programs
w
w
: char ch_no
Channel number (0 to 3) <numeric value>
long
<numeric value>
Program number
Program number
char [6]
Program number
char [6]
Return value
: =0
Outline
75
FFFF
FFFE
FFFC
FFF0
4. FUNCTION SPECIFICATIONS
7) Function
B61992E/02
: D_alldir_mem
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
long size
Buffer size <numeric value>
char *data Directory storage buffer
Number of programs
<numeric value>
long
Program number
char [6]
Program number
char [6]
: =0
r.c
Return value
om
Program number
Program exists.
Communication error
Sequence error
Others See Appendix F.
Outline
: Reads all part programs from the CNC and stores
the program numbers in the buffer.
8) Function
: D_freemem
Reads the size of the free area.
Calling format : short D_freemem
ce
nt
e
= FFFF
= FFF0
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
long *size
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
.c
nc
char mode
1 [WORK_POS]
<numeric value>
Reading of absolute position
2 [MACHINE_POS] Reading of machine
position
3 [SKIP_POS] Reading of skip position
short axis
Axis specification
<numeric value>
(Turns on the bits corresponding to axes. Bits 0
to 14.)
Bit
14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
76
B61992E/02
4. FUNCTION SPECIFICATIONS
double *data
Second-axis data
double
15th-axis data
double
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Reads either the absolute position, machine
position, or skip position, and stores the data for
the specified axes in the corresponding positions.
Data of axes that are not specified is undefined.
om
Return value
First-axis data
= FFFF
= FFF0
r.c
Outline
10)Function
: D_servo Reads the servo delay.
Calling format : short D_servo (char ch_no,
short
ce
nt
e
Arguments
short axis
Axis specification
<numeric value>
(Turns on the bits corresponding to axes. Bits 0
to 14.)
14 13 12
.c
nc
Bit
Return value
11 10 9
77
double *data
0
2nd axis
15th axis
Second-axis data
double
15th-axis data
double
: =0
1st axis
First-axis data
Normal
Communication error
Sequence error
Others See Appendix F.
: Reads the servo delay and stores the data of the
specified axes in the corresponding positions.
Data of axes that are not specified is undefined.
= FFFF
= FFF0
Outline
4. FUNCTION SPECIFICATIONS
11)Function
B61992E/02
: D_AccDec
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
short axis
Axis specification
<numeric value>
(Turns on the bits corresponding to axes. Bits 0
to 14.)
14 13 12
11 10 9
om
Bit
1st axis
2nd axis
15th axis
double *data
double
r.c
First-axis data
ce
nt
e
Second-axis data
15th-axis data
Return value
double
double
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
Outline
: Reads the acceleration/deceleration delay and
stores the data of the specified axes in the
corresponding positions. Data of axes that are not
specified is undefined.
12)Function
: D_diagnose Reads machine interface signal.
Calling format : short D_diagnose
Arguments
w
w
Channel number (0 to 3)
<numeric value>
short start_no
.c
nc
= FFFF
= FFF0
short stop_no
DI/DO data
uchar
DI/DO data
Return value
: =0
= FFFF
= FFFB
= FFF0
Others
78
Normal
Communication error
Diagnose number error (M_NR)
Sequence error
See Appendix F.
B61992E/02
4. FUNCTION SPECIFICATIONS
Outline
Arguments
<numeric value>
om
Channel number (0 to 3)
char type
ce
nt
e
r.c
Channel number (0 to 3)
Parameter number
14 13 12
<numeric value>
short axis
0
1st axis
Bit
<numeric value>
short p_no
.c
nc
Arguments
2nd axis
15th axis
long *data
With axis specification
First-axis data
long
Second-axis data
long
15th-axis data
long
79
Parameter value
long
4. FUNCTION SPECIFICATIONS
Return value
B61992E/02
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Directs the CNC to read CNC parameters and
returns the parameter or the parameters
corresponding to the specified axes. Data of axes
that are not specified is undefined.
= FFFF
= FFF0
Outline
15)Function
: D_parameter_w Writes CNC parameters.
Calling format : short D_parameter_w
om
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
uchar *file_name
Data
Parameter No.
short
Data
Axis specification
short
r.c
ce
nt
e
Data
CNCPARAM
Data
First-axis data
long
Parameter value
long
Second-axis data
15th-axis data
Bit 14 13 12 11 10 9
Return value
Outline
Note
80
8 7
0
1st axis
2nd axis
15th axis
typedef struct {
short no;
short axis;
long dt [15]
} CNCPARAM;
: =0
Normal
Communication error
File open error
File read error
Sequence error
Others See Appendix F.
: Writes the parameters stored in the file or the
parameters corresponding to the specified axes to
the CNC. Data of axes not specified is ignored.
: For the effective timing of updating parameters,
refer to the CNC operators manual.
=
=
=
=
.c
nc
Axis specification
Free
long_14
FFFF
FFFE
FFFD
FFF0
B61992E/02
4. FUNCTION SPECIFICATIONS
16)Function
: D_parameter_w_mem Writes CNC parameters.
Calling format : short D_parameter_w_mem (char ch_no,
short cout, CNCPARAM *data)
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
short count
<numeric value>
CNCPARAM *data
Data
Parameter No.
short
Data
Axis specification
short
Data
CNCPARAM
Data
om
Parameter value
long
r.c
First-axis data
Second-axis data
Free
long_14
ce
nt
e
15th-axis data
Axis specification
Bit 14 13 12 11 10 9
8 7
0
1st axis
2nd axis
15th axis
nc
typedef struct {
short no;
short axis;
long dt [15]
} CNCPARAM;
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
Outline
: Writes the parameter stored in the buffer or the
parameters corresponding to axes to the CNC.
Data of axes not specified is ignored.
Note
: For the effective timing of updating parameters,
refer to the CNC operators manual.
17)Function
: D_pitch_r
Reads pitch error data
Calling format : short D_pitch_r
= FFFF
= FFF0
.c
Return value
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
B61992E/02
char
Return value
: =0
Normal
Communication error
File open error
File wite error
Sequence error
Others See Appendix F.
: Directs the CNC to read pitch error data and sends
the data from the start number to the stop number
stored in the file. If the stop correction position
number is omitted, only the data corresponding to
the start correction position number is returned.
=
=
=
=
r.c
Outline
FFFF
FFFE
FFFC
FFF0
om
4. FUNCTION SPECIFICATIONS
ce
nt
e
18)Function
: D_pitch_r_mem Reads pitch error data.
Calling format : short D_pitch_r_mem
(char ch_no, short start_no, short
stop_no, long size, char *data)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
.c
nc
short stop_no
char
Return value
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Directs the CNC to read pitch error data and stores
the data from the start number to the stop number
in the buffer. If the stop correction position
number is omitted, only the data corresponding to
the start correction position number is returned.
= FFFF
= FFF0
Outline
82
B61992E/02
4. FUNCTION SPECIFICATIONS
19)Function
: D_pitch_w
Writes pitch error data
Calling format : short D_pitch_w
(char ch_no, short start_no, short
stop_no, uchar *file_name)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
short stop_no
om
r.c
ce
nt
e
char
Return value
: =0
Normal
Communication error
File open error
File read error
Sequence error
Others See Appendix F.
: Writes the pitch error data stored in the file from
the start number to stop number to the CNC.
=
=
=
=
nc
Outline
FFFF
FFFE
FFFD
FFF0
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
.c
20)Function
: D_pitch_w_mem Writes pitch error data.
Calling format : short D_pitch_w_mem
char
83
4. FUNCTION SPECIFICATIONS
Return value
B61992E/02
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Writes the pitch error data stored in the buffer from
the start number to stop number to the CNC.
= FFFF
= FFF0
Outline
21)Function
: D_offset_r Reads tool offset.
Calling format : short D_offset_r (char ch_no, short
Arguments
ushort
om
start_no,
short
stop_no,
type, uchar *file_name)
: char ch_no
Channel number (0 to 3)
<numeric value>
short start_no
r.c
short stop_no
ce
nt
e
uchar *file_name
nc
Data
Data
.c
Data
double
double
double
double
double
double
double
double
double
double
double
double
long
(Milling offset)
struct {
double x;
double z;
double r;
double y;
double u;
double w;
double p;
double v;
double q;
} TRUN_OFFSET;
(Lathe offset)
84
B61992E/02
Return value
: =0
=
=
=
=
FFFF
FFFE
FFFC
FFF0
Others
Normal
Communication error
File open error
File write error
Sequence error
See Appendix F.
om
Outline
4. FUNCTION SPECIFICATIONS
D:
K:
X:
Z:
R:
Y:
Cutter compensation
Cutter compensation
X-axis offset quantity
Z-axis offset quantity
Tool tip R offset
Y-axis offset quantity
H:
L:
U:
W:
P :
V:
ce
nt
e
r.c
0 = Wear compensation
1 = Geometric compensation
2 = Wear compensation
3 = Wear compensation
4 = Wear compensation
5 = Wear compensation
6 = Virtual tool tipQ
7 = Not used
8 = Wear compensation
9 = Geomertic compensation
10 = Geomertic compensation
11 = Geomertic compensation
12 = Geomertic compensation
13 = Geomertic compensation
14 = Not used
15 = Not used
H, D, L, K
: Milling machine offset
X, Z, R, Y, Q, U, W, P, V : Lathe offset
nc
22)Function
: D_offset_r_mem
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
short start_no
.c
: =0
= FFFF
= FFF0
Others
85
Normal
Communication error
Sequence error
See Appendix F.
4. FUNCTION SPECIFICATIONS
Outline
B61992E/02
23)Function
: D_offset_w Writes tool offset.
Calling format : short D_offset_w (char ch_no, short
start_no,
short
stop_no,
type, uchar *file_name)
: char ch_no
Arguments
<numeric value>
om
Channel number (0 to 3)
ushort
short start_no
r.c
ce
nt
e
uchar *file_name
nc
NOTE
The offset type is specified for all write data. Be sure to input
the data specified in type.
Outline
.c
Return value
86
: =0
Normal
Communication error
File open error
File read error
Sequence error
Others See Appendix F.
: Writes the offsets on milling machines or lathes
stored in a file from the start number to stop
number to the CNC.
=
=
=
=
FFFF
FFFE
FFFD
FFF0
B61992E/02
4. FUNCTION SPECIFICATIONS
24)Function
: D_offset_w_mem Writes tool offset.
Calling format : short D_offset_w_mem
(char ch_no, short start_no, short
stop_no, ushort type, char *data)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
ushort type
om
ce
nt
e
r.c
Return value
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Writes offsets on milling machines or lathes stored
in a file from the start number to stop number to the
CNC.
= FFFF
= FFF0
nc
Outline
: D_variable_r
Reads custom
variables.
macro
Arguments
Channel number (0 to 3)
long
<numeric value>
long start_no
.c
25)Function
long stop_no
Variable data
double
Variable data
87
4. FUNCTION SPECIFICATIONS
Return value
: =0
Normal
Communication error
File open error
File write error
Sequence error
Others See Appendix F.
: Directs the CNC to read macro variables and stores
the data from the start number to stop number in a
file to return the data. If the stop number is
omitted, only the data corresponding to the start
number is returned.
=
=
=
=
FFFF
FFFE
FFFD
FFF0
om
Outline
B61992E/02
26)Function
: D_variable_r_mem
r.c
Arguments
Channel number (0 to 3)
<numeric value>
long start_no
ce
nt
e
long stop_no
Variable data
double
Variable data
nc
Variable data
Outline
.c
Return value
88
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
In the case of empty, 0 is returned.
: Directs the CNC to read macro variables and stores
the data from the start number to stop number in
buffer to return the data. If the stop number is
omitted, only the data corresponding to the start
number is returned.
= FFFF
= FFF0
B61992E/02
27)Function
4. FUNCTION SPECIFICATIONS
: D_variable_w
Writes custom
variables.
macro
Arguments
Channel number (0 to 3)
long
<numeric value>
long start_no
om
Variable data
double
r.c
Variable data
ce
nt
e
Variable data
Return value
: =0
=
=
=
=
Normal
nc
Outline
.c
Arguments
Channel number (0 to 3)
<numeric value>
long start_no
long stop_no
double *data
Variable data
Variable data
double
Variable data
Return value
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Writes the macro variable data from the start
number to stop number stored in the buffer to the
CNC.
= FFFF
= FFF0
Outline
89
4. FUNCTION SPECIFICATIONS
B61992E/02
29)Function
: D_toollife Reads tool life management data.
Calling format : short D_toollife
(char ch_no, short start_no, short
stop_no, uchar *file_name)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
<numeric value>
short stop_no
om
long
Group number
short
Group data
short
Group data
r.c
file_name
long
Data count
Tool number
short
Data
H code
short
Data
D code
short
TOOLLIFE
C code
short
Data
ce
nt
e
Group data
short
TOOLCODE
nc
Outline
.c
Return value
90
: =0
struct {
short no;
short hcode;
short dcode;
short ccode;
} TOOLCODE;
Normal
Communication error
File open error
File write error
Sequence error
Others See Appendix F.
: Directs the CNC to read tool life management data
and stores the data from the start number to stop
number in a file. If the stop number is omitted,
only the data corresponding to the start number is
returned.
=
=
=
=
FFFF
FFFE
FFFC
FFF0
B61992E/02
4. FUNCTION SPECIFICATIONS
30)Function
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
<numeric value>
short stop_no
long *count
om
Group data
Group number
short
short
ce
nt
e
Group data
short
Tool number
short
Data
H code
short
Data
D code
short
TOOLLIFE
C code
short
Return value
Outline
.c
long
Data
nc
Group data
r.c
91
TOOLCODE
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Directs the CNC to read tool life management
data, stores the data from the start number to stop
number in buffer, and returns the data along with
the number of group data items stored in the buffer.
If the stop number is omitted, only the data
corresponding to the start number is returned.
= FFFF
= FFF0
4. FUNCTION SPECIFICATIONS
B61992E/02
Arguments
short
operation
modal
select,
uchar
Channel number (0 to 3)
<numeric value>
short select
om
Number of
data items
short
long
0,1,2
Address
G,D,E,H,L,M,N,O,S,T,F (character)
char
Data
1:
2:
3:
4:
Data
char <numeric>X2
short
long
double
Data
MODALHEAD
MODALDATA
Type 1
Type 2
Numeric
(gg)
Empty
MODALDOUBLE
MODALSHORT
c;
s;
l;
d;
double
MODALLONG
8
MODALDOUBLE
typedef
struct {
char dt1;
char dt2;
short rsv1;
long rsv2;
} MODALCHAR;
typedef
struct {
long dt;
long rsv;
} MODALLONG;
typedef
struct {
short dt;
short rsv1;
long
rsv2;
} MODALSHORT;
typedef
struct {
double dt;
} MODALDOUBLE;
Type 4
} dat;
} MODALDAT;
long
Empty
nc
struct {
short sel;
long d_cnt;
} MODALHEAD;
struct {
char addr;
char type;
union {
MODLCHAR
MODALSHORT
MODALLONG
MODALDOUBLE
.c
typedef
Type 3
short
Numeric
(vv)
typedef
G (G gg. vv)
D/H/L/M/O/S/T
N
E/F
ce
nt
e
Fixed
length
(8 bytes)
r.c
Block select
file_name
Return value
: =0
Normal
Communication error
File open error
File write error
Sequence error
Others See Appendix F.
: Reads modal data and writes the read data to a file.
=
=
=
=
Outline
92
FFFF
FFFE
FFFC
FFF0
B61992E/02
4. FUNCTION SPECIFICATIONS
32)Function
Arguments
Channel number (0 to 3)
<numeric value>
short select
om
Data
Data
Fixed
length
(8 bytes)
Data
MODALHEAD
MODALDATA
G,D,E,H,L,M,N,O,S,T,F (character)
1:
2:
3:
4:
char <numeric>X2
short
long
double
G (G gg. vv)
D/H/L/M/O/S/T
N
E/F
Type 1
Type 2
Numeric
(gg)
Type 3
long
Numeric
(vv)
ce
nt
e
char
r.c
0,1,2
Address
Type 4
double
Empty
MODALSHORT
nc
MODALDOUBLE
MODALLONG
8
MODALDOUBLE
Outline
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Reads modal data, stores the read data in the buffer,
and returns the data along with the number of data
items stored.
= FFFF
= FFF0
33)Function
: D_actualspeed Reads actual speed.
Calling format : short D_actualspeed (char ch_no,
.c
Return value
Arguments
Channel number (0 to 3)
<numeric value>
short axis
Axis specification
<numeric value>
(Turns on the bits corresponding to axes. Bits 0
to 14.)
Bit
14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
93
4. FUNCTION SPECIFICATIONS
B61992E/02
double *data
Return value
First-axis data
double
Second-axis data
double
15th-axis data
double
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Directs the CNC to read the actual speed and stores
data of specified axes in buffer. Data of axes that
are not specified is undefined.
r.c
Outline
om
= FFFF
= FFF0
34)Function
: D_ADconvert Reads A/D conversion data.
Calling format : short D_ADconvert (char ch_no, short
select, short axis,double *data)
: char ch_no
Arguments
ce
nt
e
Channel number (0 to 3)
<numeric value>
short select
nc
short axis
Axis specification
<numeric value>
(Turns on bits corresponding to axes or general
input.)
.c
Bit 14 13 12 11 10 9
Type 1
General input 1
8 7
0
Fiest axis/general input 1
Second axis/general input 2
15th axis
double *data
double
Type 3
double
First-axis data
double
General input 2
double
Second-axis data
double
General input 6
double
15th-axis data
double
Return value
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
: Directs the CNC to read general input data, data for
spindles 1 and 2, or axis data, and returns the data
for each type. General input or axis data that is not
specified is undefined.
= FFFF
= FFF0
Outline
94
B61992E/02
4. FUNCTION SPECIFICATIONS
35)Function
: D_alarm Reads alarm information.
Calling format : short D_alarm
(char ch_no, ushort *alarm)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
ushort *alarm
ce
nt
e
r.c
om
Return value
Outline
nc
36)Function
: D_status Reads status information.
Calling format : short D_status (char ch_no, ushort
.c
Arguments
Channel number (0 to 3)
<numeric value>
ushort *status
4. FUNCTION SPECIFICATIONS
Return value
B61992E/02
: =0
Normal
Communication error
Sequence error
Others See Appendix F.
Outline
: Directs the CNC to read status information and
returns the status information in the form of a bit
pattern. When the alarm bit in the status
information is on, returns alarm information at the
same time.
37)Function
: D_message
Message output
Calling format : short D_message (char ch_no, char
om
= FFFF
= FFF0
Arguments
Channel number (0 to 3)
char buf_no
<numeric value>
<numeric value>
r.c
uchar *message
ce
nt
e
Output message
<character string>
(A maximum of 32 characters. Terminate the
text with a null code.)
Return value : = 0
Normal
= FFFF Communication error
= FFF0 Sequence error
Others See Appendix F.
Outline
: Outputs a message to the CNC.
38)Function
: D_PMCdata_r Reads PMC data.
Calling format : short D_PMCdata_r
(char
ch_no,
long
addr,
short
length, short status, uchar *data)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
.c
nc
long addr
96
B61992E/02
4. FUNCTION SPECIFICATIONS
short length
PMC data
uchar
om
PMC data
PMC data
Return value
: =0
max. 32
Normal
Communication error
Sequence error
See Appendix F.
r.c
= FFFF
= FFF0
uchar
Others
ce
nt
e
Outline
39)Function
: D_PMCdata_w
.c
nc
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
long addr
<numeric value>
short status
Return value
PMC data
uchar
PMC data
uchar
PMC data
uchar
: =0
= FFFF
= FFF0
Others
97
max. 32
Normal
Communication error
Sequence error
See Appendix F.
4. FUNCTION SPECIFICATIONS
Outline
B61992E/02
40)Function
: D_select Searches for a program number.
Calling format : short D_select
Arguments
om
Channel number (0 to 3)
char *prg_no
ce
nt
e
Outline
r.c
Return value
<numeric value>
nc
41)Function
: D_start Cycle start
Calling format : short D_start
Return value
Outline
.c
Arguments
98
: char ch_no
Channel number (0 to 3)
<numeric value>
char *prg_no
B61992E/02
4. FUNCTION SPECIFICATIONS
42)Function
: D_reset Reset
Calling format : short D_reset (char ch_no)
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
Normal
Return value : = 0
= FFFF Communication error
= FFF0 Sequence error
Others See Appendix F.
Outline
: Directs the CNC to reset the system.
om
43)Function
: D_systemID Reads system ID.
Calling format : short D_system ID (char ch_no, uchar
*name, uchar *revision)
Arguments
: char ch_no
Channel number (0 to 3)
uchar *name
<numeric value>
ce
nt
e
r.c
Return value
Outline
Return value
Outline
.c
nc
44)Function
: D_initial
Initializes communication port.
Calling format : short D_initial (char ch_no)
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
99
(sys_table)
Initialization parameter
: =0
Normal
= FFFF Initialization error
= FFFE Parameter error
: Initializes the specified communication port.
5. EXAMPLE OF USING
5. THE COMMUNICATION
5. PROGRAM
B61992E/02
om
ce
nt
e
r.c
.c
nc
100
5. EXAMPLE OF USING
THE COMMUNICATION
PROGRAM
B61992E/02
LIST 51
/****************************************/
/* Example of coding */
/****************************************/
ce
nt
e
sys_table.port [0].speed = 4;
/*
systable.port [0].parity = 1;
/*
ans = D_initial (0);
/*
if (ans ! = 0) {
printf (Initialization error \n)
exit(l);
}
r.c
main( );
main( )
{
short ans;
om
#include<stdio.h>
#includednc2def.h
.c
nc
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
1
2
3
4
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
101
6. ERROR CODES
ERROR CODES
.c
nc
ce
nt
e
r.c
om
B61992E/02
102
6.1
VALUES RETURNED
BY FUNCTIONS
6.2
COMMUNICATION
ERROR
INFORMATION
6. ERROR CODES
11
12
13
14
21
:
:
:
:
:
Timeout
Retry over
Busy (during text transmission, a response to ENQ was NAK)
Protocol error (when receiving text, other data was received
when waiting for ENQ)
Warning (when receiving text, a timeout occurred when
waiting for EOT. However, text is normally received.)
Line disconnected
Overrun error
Framing error
Parity error
ISO code parity error
r.c
:
:
:
:
ce
nt
e
1
2
3
4
om
B61992E/02
.c
nc
103
B61992E/02
om
When an error occurs in this library, the error, the time it occurred, and
other information can be saved in a file. A function called the logging
function, is provided for saving this information.
There are the following four types of logs depending on the cause of the
error:sequence error log, protocol error log, phase trace log, and
communication error log.
r.c
To use the logging function, set the appropriate log ON/OFF switch of
system parameter to 1 : ON.
.c
nc
ce
nt
e
This logging function is used to check programs. Normally, do not use it.
Since phase trace logs are taken at all times, the file inputoutput time
increases, affecting the timeout period. Therefore, use the logging
function carefully.
104
DETAILS OF THE
ERROR LOG FILE
Current pointer
short
Buffer size
short
Log data
Day
char [ 2]
Hours
char [ 2]
Minutes
char [ 2]
Seconds
char [ 2]
Send command
character string
Error response
character string
ce
nt
e
LOGHD
Month
om
7.1
r.c
B61992E/02
char [ 4]
char [ 4]
LOGSEQ
nc
short
Buffer size
short
.c
Current pointer
Log data
LOGHD
Month
char [ 2]
Day
char [ 2]
Hours
char [ 2]
Minutes
char [ 2]
Seconds
char [ 2]
Communication type
(*1)
char [ 1]
Phase number
char [ 1]
Event number
char [ 1]
Free
char [ 1]
Error number
char [ 2]
LOGPROTC
105
*1 Communication type
1: Send
2: Receive
3: Clear
B61992E/02
short
Buffer size
short
Log data
char [ 1]
char [ 1]
Event number
char [ 1]
r.c
Current pointer
char [ 1]
ce
nt
e
LOGTRACE
LOGHD
om
*1 Communication type
1: Send
2: Receive
nc
short
.c
Current pointer
Buffer size
Log data
LOGHD
short
Month
char [ 2]
Day
char [ 2]
Hours
char [ 2]
Minutes
char [ 2]
Seconds
char [ 2]
Communication type
(*1)
char [ 1]
Free
char [ 1]
char [ 2]
LOGCOM
106
*1 Communication type
1: Send
2: Receive
3: Clear
*2 Error type
1 : Timeout
11 : Line disconnected
12 : Overrun
13 : Framing error
14 : Parity error
21 : ISO code parity error
B61992E/02
7.2
SIMPLE ERROR LOG
BROWSING
FUNCTION
Date
time
20:24:53
20:26:02
Time
Number
send
recv
<PRPM> <M NR>
<PTPA> <T BD>
r.c
om
ce
nt
e
nc
.c
Number
time
type pha evt err
17:50:24 <2: 5
2> < 5>
17:50:48 <2: 5
2> < 5>
14:54:24 <3: 0
0> < 0>
14:54:31 <1: 1
1> <11>
Time
Error number
Event number
Phase number
Communication type
[1: Send, 2: Receive, 3: Intialization]
107
B61992E/02
om
Event number
r.c
ce
nt
e
nc
.c
Number
time
type error
20:24:53 <1: 11>
20:26:02 <2: 21>
14:54:31 <1: 11>
Time
*1 Error type 1
11
12
13
14
21
108
:
:
:
:
:
:
Timeout
Line disconnected
Overrun
Framing error
Parity error
ISO code parity error
r.c
ce
nt
e
nc
.c
om
APPENDIX
APPENDIX
B61992E/02
CONNECTOR SPECIFICATIONS
.c
nc
ce
nt
e
r.c
om
A. CONNECTOR SPECIFICATIONS
111
A. CONNECTOR SPECIFICATIONS
A.1
FANUC Series 0
(A02B0098J055)
APPENDIX
B61992E/02
(1) RS-232-C
M77 (in the CNC cabinet)
MR-20RMD (male)
14
1
8
RD
SD
15
16
CD
17
ER
H20.F
Cable 1
3
10
Host computer
18
DR
19
CS
5
12
6
13
RS
SG
r.c
20
om
4
11
(2) RS-422
(a) M77 (in the CNC cabinet)
ce
nt
e
MR-20RMD (male)
14
CS
SD
*SD
TR
*TR
RS
*RS
SG
15
*CS
16
10
RD
11
*RD
12
RR
13
*RR
17
18
19
Host computer
.c
nc
20
H20.F
Cable 2
MR-20RMD (male)
14
15
CS
8
TT
*TT
*CS
16
10
RD
11
*RD
12
RR
13
*RR
17
18
19
RT
*RT
20
112
SD
*SD
TR
*TR
RS
*RS
SG
H20.F
Cable 3
Host computer
A. CONNECTOR SPECIFICATIONS
APPENDIX
B61992E/02
A.2
FANUC Series 15A
(1) RS-232-C
CD4 (in the CNC cabinet)
MR-20RF (female)
14
+24V
1
8
RD
SD
15
16
CD
17
SG
3
10
4
11
DR
12
19
CS
13
20
ER
om
18
RS
r.c
(2) RS-422
CD3 (in the CNC cabinet)
MR-20RM (male)
CS
TT
*TT
ce
nt
e
14
15
*CS
16
10
RD
11
*RD
12
RR
13
*RR
17
18
19
.c
nc
20
113
RT
*RT
SD
*SD
TR
*TR
RS
*RS
SG
A. CONNECTOR SPECIFICATIONS
A.3
FANUC Series 15B
AND Series 16/18
APPENDIX
B61992E/02
(1) RS232C
RS232C connection signal diagram
CNC option 1 board
JD5C (PCREV20MDT)
FG
RD
11 SD
SD
0V
12 0V
RD
DR
13 ER
RS
0V
14 0V
CS
CS
15 RS
DR
0V
16 0V
SG
CD
17
CD
0V
18 *RD
19 (+24)
10 (+24V)
20
15
16
17
18
19
20 ER
21
22
10
29
11
r.c
14
om
(DBM25S)
12
13
24
25
ce
nt
e
SD
Input
RD
RD
nc
SD
.c
0V
RS
RS
CS
CS
ER
ER
DR
DR
CD
CD
SG
SG
FG
FG
Ground
NOTE
When CS is not used, connect CS and RS. When the IBM
PCAT is used as the host computer, connect CS and RS
in the CNC. When DR is not used, connect DR and ER.
Always connect CD and ER.
Host computer
Output
114
A. CONNECTOR SPECIFICATIONS
APPENDIX
B61992E/02
(2) RS422
RS422 connection signal diagram
CNC option 1 board
JD5C (PCREV20MDT)
FG
RD
11 SD
*RD
12 *SD
RT
13 TT
*RT
14 *TT
CS
15 RS
RD
*CS
16 *RS
RS
DM
17 TR
RT
0V
18 *TR
CS
*DM
19 (+24)
20
21
SD
22 *SD
23
24 *RD
25 *RS
om
10 (+24V)
(DBM25S)
10
20
11 DM
r.c
12 TR
13
14
15
16
ce
nt
e
17 TT
18
19 SG
26 *RT
27 *CS
28
29 *DM
30 *TR
31
32
33
34
35 *TT
36
37
SD
Input
RD
RD
RS
RS
CS
CS
TR
TR
DM
DM
TT
TT
RT
RT
SG
SG
FG
FG
.c
nc
SD
0V
Ground
Host computer
Output
115
B. PARAMETERS
APPENDIX
B61992E/02
PARAMETERS
.c
nc
ce
nt
e
r.c
om
116
B. PARAMETERS
APPENDIX
B61992E/02
B.1
FANUC Series 0
(UPPER ROW: Series
0TC, LOWER ROW:
Series 0MC)
#7
#6
0051
#5
ECLK
#4
#3
NCKCD RSASCI
ECLK
NCKCD RSASCI
#2
#1
PARTY
#0
STP2
PARTY
STP2
r.c
om
ce
nt
e
NOTE
With the Series 0, use ASCII code.
nc
PARTY : Parity
0 : No parity check
1 : Even parity
STP2 : Number of stop bits
0: 1
1: 2
.c
NOTE
The data length (in bits) is determined according to what is
set in RSASCI and PARTY. If both RSASCI and PARTY are
1, the data is 7 bits long. Otherwise, it is 8 bits long.
#7
#6
0055
#5
#4
#3
RS42
#2
RS42
117
#1
#0
B. PARAMETERS
APPENDIX
0251
B61992E/02
Baud rate
0251
Baud rate
Value
Baud rate
Value
Baud rate
50
300
100
600
12
19200
110
1200
13
38400
150
2400
14
76800
200
10
4800
15
86400
9600
r.c
0365
11
om
0320
ce
nt
e
0321
nc
.c
0323
B. PARAMETERS
APPENDIX
B61992E/02
#6
#7
#5
#4
0396
ERCODE
#3
#2
NCKER
ERCODE
NCKER
#1
#0
NCKBCC
NCKBCC
ce
nt
e
0490
r.c
om
0490
nc
DLF
STX
.c
2 bytes
119
Packet length
Command
Data section
4 bytes
80 to 256 bytes
DLE
ETX
3 bytes
BCC
B. PARAMETERS
APPENDIX
B61992E/02
B.2
Series 15
#7
#6
#5
#4
#3
0000
#2
ISP
#1
#0
om
0021
0022
0023
r.c
0020
#6
#5
#4
NCKCD
#3
ce
nt
e
5000
#2
#1
PARTY
#0
RB422
nc
.c
NOTE
The data length (in bits) is determined according to what is
set in RSASCI and PARTY. If both RSASCI and PARTY are
1, the data is 7 bits long. Otherwise, it is 8 bits long.
5070
Minimum baud rate that causes the reception lock pulse to be supplied
from the host
Range of data : 5 to 15
If the baud rate is grater than or equal to the value specified in this
parameter, the reception clock pulse is supplied from the host. The
parameter is valid for the RS-422 interface only.
120
B. PARAMETERS
APPENDIX
B61992E/02
5072
5082
om
5083
r.c
Value
Baud rate
ce
nt
e
Value
Value
Baud rate
50
300
11
9600
100
600
12
19200
110
1200
13
38400
150
2400
14
76800
200
10
4800
15
86400
5050
nc
.c
5051
B. PARAMETERS
APPENDIX
5054
B61992E/02
r.c
om
STX
Command
Data section
ce
nt
e
DLF
2 bytes
#7
4 bytes
#6
5056
80 to 256 bytes
#4
PCDAT
#3
ERCODE
ETX
BCC
3 bytes
#2
NCKER
#1
#0
NCKBCC
.c
nc
w
w
w
#5
DLE
122
B. PARAMETERS
APPENDIX
B61992E/02
B.3
FANUC Series
16/18/21
0020
#7
#6
#5
#4
ce
nt
e
#3
ASI
#2
#1
#0
SB2
#1
PRY
#0
r.c
0131
om
NOTE
Use ASCII code.
#7
#6
0134
#5
CLK
#4
NCD
#3
#2
nc
.c
NOTE
The data bit length is determined depending on the RSASC
and PARTY settings. If RSASC and PARTY are both set to
1, the 7bit length is used. In other cases, the 8bit length
is used.
#7
#6
#5
#4
0135
#3
R42
#2
#1
#0
B. PARAMETERS
APPENDIX
#7
#6
B61992E/02
#5
#4
0140
#3
ECD
#2
NCE
#1
#0
BCC
r.c
om
Baud rate
ce
nt
e
Baud rate
Value
Baud rate
Value
Baud rate
50
300
11
9600
100
600
12
19200
110
1200
13
38400
150
2400
14
76800
200
10
4800
15
86400
nc
0143
Timeout value of the timer used to check for a response from the host
.c
0144
B. PARAMETERS
APPENDIX
B61992E/02
0148
Maximum number of characters that can be received after send stop processing (CS off)
r.c
om
STX
Command
Data section
ce
nt
e
DLF
4 bytes
.c
nc
2 bytes
125
80 to 256 bytes
DLE
ETX
3 bytes
BCC
Received
DLE
send DLE0
Na, Nb, Nc=0
ignore
data
same to D
same to D
same to D
same to D
send DLE0
Na, Nb, Nc=0
same to D
same to D
same to D
same to D
to IDLE
state
same to E
same to E
same to D
same to D
wait
DLE
state
(DLE0)
wait
F0G
state
wait
1
state
CNC
send
ENQ
HOST
to wait
ENQ
to DLE wait
retry
over
send
ENQ
Na
0
retry
over
send
ENQ
Nb
0
send
ENQ
retry
over
0
send
ENQ
wait
DLE
state
(DLE STX)
wait
STX
state
Received
ENQ
10
wait
BCC
state
11
w
12
same to C
same to C
Na
retry
over
Nc
0
send EOT
(normal)
Recv.
STX
same to E
same to C
same to C
same to C
same to C Ta
Na : Retry counter A
Nb : Retry counter B
Nc : NAK counter
Recv.
DLE
retry
over
Nc
0
Ta : No response timer
Tb : EOT timer
Recv.
ETX
Recv.
BCC
Recv.
EOT
Recv.
ELSE
Time Out
same to C
same to C
same to C
same to C
same to C Ta
retry
over
Nb
0
same to C
to DLE
wait
same to C
same to C
same to C
same to C Ta
Regard as text
to ETX
wait
same to C
same to C
same to C
same to C
send
DLE0
10
Regard as text
same to C
same to C
to BCC
wait
same to C
same to C
send
DLE0
retry
over
Ta, Nb
send
DLE0
Nb
1
to STX
wait
send
DLE0
wait
ETX
state
same to D
retry
over
Na
0
retry
over
wait
DLE
state
(DLE ETX)
same to C
nc
Trns end
send
EOT
ENQ
to wait
1
Na
retry
over
.c
Matrix state
Trns req.
Na
0
start transmitt
Na, Nb, Nc=0
Nb
0
A, B : Process
m, n: Matrix state number to be changed
B
m
retry
over
same to E
retry
over
to wait
0
wait
EOT
state
HOST
to wait
ENQ
Event
R
E
C
E
I
V
I
N
G
CNC
send
ENQ
ce
nt
e
retry
over
Nb
Nb
0
Time Out
om
wait
DLE
state
(DLE1)
Received
ELSE
wait ENQ
state
(Host only)
Received
NAK
send ENQ
transmitting
state
Received
1
Trns end
IDLE state
Received ENQ
Received
0
Trns req.
Matrix state
T
R
A
N
S
M
I
T
T
I
N
G
B61992E/02
r.c
Event
APPENDIX
11
BCC valid : send DLE1
send
DLE1
retry
over
12
BCC invalid : 7
to EOT wait
send NAK
12
same to C
same to C
same to C
retry over Nc
0
to
IDLE
0
126
same to C
retry
over
Ta, Nb
send
DLE0
retry
over
Ta, Nc
0
to IDLE
Tb
0
APPENDIX
B61992E/02
1. PT**/LIPM type
Recv.
R **/
DIPM
Recv.
M OK
Recv.
M NR
Recv.
T NP
IDLE state
T NB wait
M OK wait
PT **
send
M RT
send
M NR/
T NP
send
0
R **/
DIPM
send
T FD
send
T BD
send
M RT wait
T BD
send
R ** wait
T BD
send
same to B
PT**/LIPM
T NB
PR **
send
M PR
send
M NR
M NP
send
R ** wait
M RR wait
T BD
send
same to B
T BD
send
T BD
send
R **
send
T FD
send
M OK wait
T NB
send
Recv.
else
CNC
reset
Datalink
error
T BD send
No operation
T BD
send
same to B
to
IDLE
T BD
send
to
IDLE
same to B
to
IDLE
to
IDLE
to
IDLE
same to B
to
IDLE
same
to B
T NB
send
same to B
M OK
send
same to B
same
to B
T BD
send
to
IDLE
T BD
send
to
IDLE
T BD
send
0
R **
M OK
M NR
T NP
T BD
M RR
M RT
T FD
else
CNC
reset
Datalink
error
T NB
send
1
same to B
to
IDLE
same to B
Recv.
T FD
to
IDLE
to
IDLE
T BD send
T NB wait
same to B
nc
IDLE state
Send
req.
.c
Event
to
IDLE
Recv.
M RT
A, B : Process
m, n: Matrix state number to be changed
2. PR** type
Matrix
state
same to B
0
4
to
IDLE
same to B
same to B
Recv.
M RR
No
operation
T BD send
T BD
send
Recv.
T BD
om
Received
T NB
ce
nt
e
Matrix
state
Received
PT**/LIPM
r.c
Event Receive
req.
same to B
to
IDLE
127
to
IDLE
same to B
0
to
IDLE
PR **
send
same to B
T BD send
same
to B
same to B
to
IDLE
No
operation
to
IDLE
0
to
IDLE
0
No operation
0
M OK
send
0
same to B
same to B
same to B
same
to B
T BD
send
to
IDLE
T BD
send
to
IDLE
T BD
send
to
IDLE
T BD
send
to
IDLE
APPENDIX
B61992E/02
3. T** type
Send
Req.
T **
IDLE state
R **
M OK
M NR
T NP
T **
send
R **
send
M NR/
T NP
send
T BD
T BD send
M OK wait
T BD
send
R ** wait
T BD
send
M OK
send
M NR
send
M ** /MCRM
R **
M NR
M NP
same to B
to
IDLE
to
IDLE
A
0
M OK wait
R ** /
M **
send
M OK
send
M NR
M NP
send
CNC
reset
else
T BD send
T BD send
No
operation
T BD
send
T BD
send
normal
to
IDLE
normal
to
IDLE
to
IDLE
same to B
.c
nc
IDLE state
T BD
128
same to B
same to B
Datalink
error
r.c
Send
Req.
No operation
T BD
send
to
IDLE
ce
nt
e
Event
H
T BD
send
4. M**/R** type
Matrix
state
Datalink
error
to
IDLE
same to B
CNC
reset
No
operation
to
IDLE
same to B
else
No operation
0
T BD
send
to
IDLE
T BD
send
to
IDLE
om
Event
Matrix
state
ALARM MESSAGES
.c
nc
ce
nt
e
r.c
om
E. ALARM MESSAGES
APPENDIX
B61992E/02
129
E. ALARM MESSAGES
APPENDIX
E.1
B61992E/02
Series 0
Message
Description
BP/S 073
BP/S 086
Remark
Note
om
Code
BP/S 071
ce
nt
e
r.c
NOTE
Recovery from this error can be done by turning off and on
again the ER/TR signal in the host computer or turning off
the power to the CNC.
E.2
Code
Message
Description
Remark
SR 960
Note
.c
nc
Series 15
Same as above
NOTE
Recovery from this error can be done by turning off and on
again the ER/TR signal in the host computer or turning off
the power to the CNC.
SR 970
130
APPENDIX
B61992E/02
Error code
FFB9H047H
M_BD
T_ER
M_NR
om
FEBAH046H
FFCCH034H
M_NR
FFCBH035H
M_NR
FFCAH036H
M_NR
FFC9H037H
M_NR
FFC6H03AH
T_BD
FFC5H03BH
T_BD
ce
nt
e
r.c
FFCEH032H
FFCDH033H
N_NR
T_BD
Timeout
M_NP
FDFEH202H
Channel busy
M_NP
FDFDH203H
Data remaining
M_NP
FDFCH204H
T_BD
FDFBH205H
M_NP
FDFAH206H
M_NP
FDF9H207H
CNC busy
M_NP
FC0CH3F4H
M_NR
nc
FF00H100H
FDFFH201H
FC0BH3F5H
T_NP
FC0AH3F6H
M_NP
FC09H3F7H
M_NP
FC08H3F8H
M_NP
FC07H3F9H
M_NP
FC06H3FAH
File protected
M_NP
FC05H3FBH
M_NP
FC04H3FCH
M_NP
FC03H3FDH
T_NP
FC02H3FEH
T_NP
FC01H3FFH
T_BD
FBA8H458H
M_NP
FBA7H459H
M_NP
FBA6H45AH
T_BD
.c
w
w
w
Remark
FBA5H45BH
M_NR
FBA4H45CH
M_NR
FBA3H45DH
M_NR
FBA2H45EH
T_BD
FBA1H45FH
T_BD
FBA0H460H
Invalid data
M_NP
FB9FH461H
M_NP
FB9EH462H
No option
M_NP
131
APPENDIX
B61992E/02
Meaning
M_NR
FB9CH464H
File protected
M_NP
FB9BH465H
No directory space
M_NP
FB9AH466H
M_NP
FB99H467H
Read disabled
T_NP
FB98H468H
Write disabled
M_NP
FB97H469H
Write failed
T_BD
FB96H46AH
Read failed
FB95H46BH
Device inoperable
FB94H46CH
FB93H46DH
Invalid status
FB92H46EH
Data mismatch
FB46H4BAH
FB45H4BBH
Miscellaneous errors
M_IL
F62DH9D3H
Write protected
M_NP
F62CH9D4H
M_NP
F62BH9D5H
Invalid mode
M_NP
F62AH9D6H
Invalid address
M_NP
F629H9D7H
M_NP
F628H9D8H
M_NP
F627H9D9H
Start disabled
M_NP
F626H9DAH
M_NP
F625H9DBH
M_NR
F624H9DCH
M_NP
F623H9DDH
M_NP
F622H9DEH
No program selected
M_NP
F621H9DFH
Editing impossible
M_NP
F620H9E0H
System error
M_NP
F61FH9E1H
M_NR
om
T_BD
M_NP
M_NP
M_NP
nc
ce
nt
e
r.c
T_BD
M_NP
F61EH9E2H
T_BD
F61DH9E3H
M_NP
F61CH9E4H
M_NP
F61BH9E5H
M_NP
F61AH9E6H
M_NP
F619H9E7H
M_NP
F618H9E8H
No program number
M_NP
F617H9E9H
Command rejected
M_NP
F616H9EAH
Running program
M_NP
.c
w
w
w
Remark
FB9DH463H
F615H9EBH
M_NP
F614H9ECH
No option found
M_NP
F60BH9F5H
Data missing
M_NP
F606H9FAH
M_NP
F605H9FBH
M_NP
F604H9FCH
M_NP
132
MAINTENANCE
.c
nc
ce
nt
e
r.c
om
G. MAINTENANCE
APPENDIX
B61992E/02
133
G. MAINTENANCE
APPENDIX
G.1
DESCRIPTIONS OF
INDICATION BY LEDS
(Series 15A)
G.1.1
B61992E/02
The arrangement of the LEDs is as shown on the right (the door open).
The following table lists the meanings of the LED indications.
0
f f
f f
om
When the LEDs are blinking or remain off, they indicate system errors.
The system errors can normally be eliminated by turning the power off
and on again. In some cases, error recovery requires hardware
replacement.
Blinking LED
Indications
No.
r.c
Meaning
Code
Message
No
f
f
f
f
F
f
f
f
Yes
f
F
f
f
F-BUS error
Yes
F
F
f
f
No
f
f
f
F
Invalid interrupt
An interrupt occurred when should not.
Yes
F
f
f
F
No
f
F
f
F
No
F
F
f
F
Not used
f
f
F
f
No
nc
ce
nt
e
If the LEDs are on or off with one of the patterns listed above, check the
information described below using the CNC diagnostic menu and report
it to the maintenance personnel: Four words at addresses 46003FEF to
46003FEB (selected from among addresses 46003F80H [46003F00H]
and on) displayed on the screen using INP-NO; enclosed in brackets are
the addresses that can be displayed on a 14-inch CRT screen.
.c
F ... Off
f ... On
134
G. MAINTENANCE
APPENDIX
B61992E/02
G.1.2
When the LEDs light steadily or remain off, they indicate the state (not
abnormal state) of the remote buffer.
Nonblinking LED
Indications
LED
indication
Meaning
Code
f
f
f
f
f
F
F
F
CIRR#15=1 wait;
Common Resource Irt. request awaited
F
f
F
F
f
f
F
F
F
F
F
f
CIRR#15=1 wait;
completion of IPL awaited
f
F
F
f
ce
nt
e
r.c
om
Message
F
f
F
f
f
f
F
f
.c
nc
135
G. MAINTENANCE
APPENDIX
G.2
B61992E/02
Incase of Series 15A, the following table lists the system error messages
related to the remote buffer.
SYSTEM ERROR
MESSAGES
(Series 15A)
Meaning
Message
f
f
f
F
f
f
f
f
f
F
om
F
f
r.c
ce
nt
e
nc
.c
w
w
w
136
G. MAINTENANCE
APPENDIX
B61992E/02
G.3
LED INDICATORS
(Series 15B)
The Series 15B has LEDs arranged as shown in the figure on the right
(as viewed with the door open). LEDs 3 and 4 are used for DNC2.
Immediately after the power is turned on, LEDs 3 and 4 both light while
the DNC2 CPU is stopped; then, these LEDs normally go off.
OPT1
om
STATUS
No.
On
Blink
Meaning
Internal
code
Message
8F
Not
provided
8E
Provided
Fbus error
8D
Provided
ce
nt
e
LED status
No.3
No.4
r.c
The following LED states indicate system errors. Such errors cannot be
recovered unless the power is turned off then back on. Some errors require
hardware replacement.
Blink
On
Blink
Blink
Blink
Off
8C
Provided
Off
Blink
89
Provided
Blink
Off
87
88
8A
8B
Provided
nc
.c
Off
Blink
137
G. MAINTENANCE
APPENDIX
G.4
B61992E/02
With the Series 15B, the system error messages related to DNC2 are
explained below.
Internal
code
Message
Meaning
8E
8D
8C
8B
8A
89
88
87
om
SYSTEM ERROR
MESSAGES
(Series 15B)
.c
nc
ce
nt
e
r.c
138
G. MAINTENANCE
APPENDIX
B61992E/02
G.5
TROUBLESHOOTING
G.5.1
MAP Log Messages
G.5.1.1
om
Log messages
r.c
PRPM | M RR | R PM | T NB | R PM | T NB | R PM | T NB | T FD | M OK | LIPM |
M RT | T NB | DIPM | T NB | T FD | M OK |
ce
nt
e
G.5.1.2
.c
nc
There are three log message formats. Each log message is separated by
ASCII character | . The meaning of the messages in each format is as
follows:
1) <CCCC>
:
CCCC
Command section of datagram
2) <NNNN0Xeeee>:
NNNN
Negative response (datagram command section)
eeee
Error code (See Appendix F.)
3) <Ennn0Xssdd>:
Ennn
Data link layer error code
See Table G.3.1.2.
ssdd
Details of the error
ss : Status of the data link layer matrix
dd : Error data
Error
code
Explanation
E002
0, 1, 2, 3
5, 6, 7, 8
9, A, B, C
E009
2, 3, 5, 6
7, 8, 9, A
B
00
E00C
0, 1, 2, 3
5, 6, 7, 8
C
Invalid TCC(*1)
E010
5, 6, B
Error code
5 : NAK
6 : NAK | DLFO
B : BCC
E011
E014
00
Invalid TCC(*1)
139
G. MAINTENANCE
APPENDIX
B61992E/02
G.5.2
Troubleshooting
No.
Symptom
Check procedure
2.
3.
.c
nc
ce
nt
e
r.c
om
1.
140
APPENDIX
B61992E/02
G code
Machining center Lathe (system B)
Group
p
(gg)
10
G98
G99
11
G50
G00
G01
0
1
G02
G03
G02
G03
2
3
G33
G33
G77
G78
4
8
9
G79
10
G17
G18
G19
G97
G96
0
1
2
G90
G91
G90
G91
G22
G22
G23
G23
G93
G94
G95
G94
G95
14
0
1
G20
G21
G41
G42
G41
G42
1
2
1
2
0
.c
G40
G66
Internal code
(vv)
G98
G99
1
0
G66
G66.1
G67
G66.1
G67
2
0
G96
G97
G68
G69
1
0
G54
G55
G54
G55
0
1
G56
G57
G56
G57
2
3
G58
G59
G58
G59
4
5
G61
G62
G61
G62
1
2
G63
G64
G64
3
0
G68
G69
G18
G17
1
0
G19
G15
G16
G50.1
G50.1
G51.1
G51.1
G40
13
12
G20
G21
G43
G44
G49
G51
0
1
ce
nt
e
G00
G01
15
nc
G code
Internal code
(vv)
om
Group
p
(gg)
r.c
1
0
16
17
G73
G83.1
10
G74
G76
G80
G81
G82
G83
G84
G85
G86
G87
G88
G89
G84.1
G86.1
G80
G81
G82
G83
G84
G85
G86
G87
G88
G89
11
12
0
1
2
3
4
5
6
7
8
9
18
Note))
141
I. COMMUNICATION PARAMETER
I. STRUCTURE
APPENDIX
B61992E/02
om
The following diagram shows the initial values and other valid values for
the communication parameters such as communication speed, parity, and
timeout in the system parameter table <sys_table>. The initial values
are enclosed in braces.
The parameter settings described here must coincide with those in the
CNC.
COMPARAM
Communication speed
Data length
Stop bits
Code
SYSTBL sys_table
Communication
parameters for port 0
Communication
parameters for port 1
Communication
parameters for port 3
[ 5]
[ 3]
[ 5]
[ 5]
.c
[ 5]
[256]
bytes
nc
Communication
parameters for port 2
1: 1200, 2: 2400,
[3]: 4800, 4: 9600
ce
nt
e
Parity
[ 1]: RS-232C
r.c
Communication interface
LOGDEF
Log on/off switch
Log buffer size
[ 0]: Off, 1: On
[2048] bytes
Communication
error log
NOTE
In the communication library provided by FANUC, the
maximum transmission speed is 9600 bps.
142
I. COMMUNICATION PARAMETER
STRUCTURE
APPENDIX
B61992E/02
typedef struct
{
COMPARAM port[4];
short
len;
LOGDEF
seqlog;
LOGDEF
prolog;
LOGDEF
phalog;
LOGDEF
comlog;
} SYSTBL;
struct
sw;
size;
.c
nc
ce
nt
e
r.c
typedef
short
short
LOGDEF;
om
typedef struct
{
char
type;
char
speed;
char
len;
char
parity;
char
stop;
char
code;
short retry;
short eotrty;
short nakrty;
short tmout;
short eotout;
short enqout;
} COMPARAM;
143
J. ERROR CODES
APPENDIX
B61992E/02
ERROR CODES
Description
om
Code
0FFFFh
0FFFCh
0FFF0h
Sequence error
0FFFBh
ce
nt
e
0FFFAh
r.c
0FFFEh
0FFFDh
0FFF9h
0FFF1h
0FFEFh
0FFEEh
0FFEDh
nc
0FFEB
.c
144
APPENDIX
B61992E/02
DEMONSTRATION PROGRAM
.c
nc
ce
nt
e
r.c
om
K. DEMONSTRATION PROGRAM
145
K. DEMONSTRATION PROGRAM
K.1
APPENDIX
B61992E/02
OUTLINE OF
FUNCTIONS
.c
nc
ce
nt
e
r.c
om
Since the program requires the Series 0MC and a special ladder, merely
executing the program on the supplied floppy disk does not allow
functions 4, 5, 6, 8, and 9 in the command list to be performed correctly.
146
APPENDIX
B61992E/02
K. DEMONSTRATION PROGRAM
K.2
PREPARATION
K.2.1
Copy the following files and the communication program library to the
directory where you are going to compile the program.
No.
DEMO_MAN.C
D2_DEMO.C
D2_UTL98.C
D2_UTIBM.C
D2DTGLB.C
D2DTEXT.H
D2_DEMO.H
D2_GLB.H
om
D2_PRT.H
10
DNC2DEF.H
11
DNC2SYS.CFG
(1) Preparation
Set up environment variables while referring to setting of
environment variables described in III3.3.
nc
Outline of function
ce
nt
e
K.2.2
File
r.c
Files
.c
147
K. DEMONSTRATION PROGRAM
K.2.3
APPENDIX
B61992E/02
Setting the
Communication
Parameters
.c
nc
ce
nt
e
r.c
om
APPENDIX
B61992E/02
timeout time=5
EOT timeout=5
K. DEMONSTRATION PROGRAM
(2) How to set the maximum text data length for the data link layer
Text max lenth=256 : Specifies the maximum text data length for the
data link layer by value (80 to 256).
.c
nc
ce
nt
e
r.c
om
149
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.3
OVERVIEW OF
OPERATIONS
After making sure that the executable file containing the demonstration
program (DEMOIBM.EXE or DEMO98.EXE) and the communication
parameter file (DNC2SYS.CFG) are on the current directory, activate the
executable file.
Example)
C>DEMOIBM
om
K.3.1
K.3.2
No.
Command
Summary
Registers a program.
Edit program
Delete program
Start
Starts machining.
Stop
Stops machining.
Continue
Resumes machining
Upload
Uploads a program.
nc
ce
nt
e
Commands
r.c
End
Ends demonstration.
.c
10
150
Remark
APPENDIX
B61992E/02
K. DEMONSTRATION PROGRAM
K.3.3
(1) Immediately after the demonstration program is started, the
command entry menu appears (see K.4.2). When machining is in
progress, pressing the ESC key causes the program to wait for
command entry.
(2) When the program is in command entry mode, register as many
programs as necessary.
(3) If a program name or other information you entered is incorrect,
correct it using the Edit program command. To delete a registered
program, use the Delete program command.
(4) After all necessary programs have been registered, select the Start
command to trigger machining. This causes the programs to be
downloaded in sequence they were registered.
(5) When a program ends running (always monitored by the Read PMC
data command), it is deleted from the NC memory, and the next
program is downloaded to start machining.
(6) To discontinue machining, press the ESC key to place the program
in command entry mode. Then select the Stop command.
(7) To read out the parameters during machining, press the ESC key to
place the program in command entry mode. Then, select the Read
PMC data command. To resume machining, select the Continue
command.
ce
nt
e
r.c
om
Operating Procedure
Demonstration program
nc
Register programs
.c
Error
related to program
registration?
Yes
No
Machining
to be discontinued?
Yes
Select Stop command
Yes
Machining to be resumed?
No
End
151
No
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.3.4
Machining Procedure
om
Start of machining
r.c
ce
nt
e
Download program to NC
Start program
No
Program ended?
Yes
.c
nc
No
152
Repeated
a specified number
of times?
Yes
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.4
MENU LAYOUT
K.4.1
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
by GE FANUC LTD.
1:
om
program 9 :
2:
Registered-progr
am display area
3:
4:
ce
nt
e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
r.c
.c
nc
153
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.4.2
(1) Menu
Command Entry
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
by GE FANUC LTD.
1:
om
2:
3:
4:
7:Upload
8:Read PMC data
9:Write PMC data
10:End
r.c
ce
nt
e
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
nc
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
= 99
.c
20
21
22
23
24
25
154
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
20
21
22
23
24
25
20
21
22
23
24
25
om
Edit program ? 9
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
= 99
r.c
ce
nt
e
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
20
21
22
23
24
25
Edit program ? 9
Sure ?(y/n)y
nc
.c
20
21
22
23
24
25
Cutting start
Sure ?(y/n)y
155
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
20
21
22
23
24
25
om
Cutting stop
Sure ?(y/n)y
r.c
(7) Continue
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
ce
nt
e
20
21
22
23
24
25
Cutting now
Machining is resumed.
After the ESC key is pressed to display the command entry menu
and interrupt machining, this command is used to resume
machining.
nc
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
.c
20
21
22
23
24
25
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
156
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
20
21
22
23
24
25
= 999999
= 99
number
+0 +1 +2
999999 : 99 99 99
999999 : 99 99 99
Please hit any key
+3
99
99
+4
99
99
+5
99
99
+6
99
99
+7
99
99
+8
99
99
om
20
21
22
23
24
25
+9
99
99
+A
99
99
+B
99
99
+C
99
99
+D
99
99
+E
99
99
+F
99
99
r.c
Enter a PMC RAM number and data length, and the PMC data
will be displayed.
To resume the command entry menu, press any key.
(10)Write PMC data command
ce
nt
e
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
20
21
22
23
24
25
= 999999
= 99
number
+0 +1
999999 : 99 99
999999 : 99 99
Sure ?(y/n) y
+2
99
99
.c
nc
20
21
22
23
24
25
+3
99
99
+4
99
99
+5
99
99
+6
99
99
+7
99
99
+8
99
99
+9
99
99
+A
99
99
+B
99
99
+C
99
99
+D
99
99
+E
99
99
+F
99
99
Enter a PMC RAM number and data length, then PMC data.
After all PMC data is entered, it is written to memory.
20
21
22
23
24
25
Demonstration end
Sure ?(y/n)y
157
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.4.3
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
by GE FANUC LTD.
(2)
:
:
:
:
:
(3)
o (4)
(5) / (6)
(7)
(8)
(9)
3:
cutting rate
0%
om
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
100%
4:
(10)
Cutting now
(16)
r.c
Machining Menu
ce
nt
e
(5) Number of times the program has been executed (execution count)
(6) Specified repetition time
nc
.c
158
APPENDIX
B61992E/02
PMC
address
Byte
address
Specified
address
0 41FFE000
511 41FFE1FF
F000
F319
512 41FFE200
831 41FFE33F
Y000
Y127
X000
X127
PMC
ADDRESS
BIT
ADDRESS
G0000.0
G0511.7
0
4095
F0000.0
F0319.7
4096
6655
1024 41FFE400
1151 41FFE47F
Y0000.0
Y0127.7
8192
9215
1152 41FFE480
1279 41FFE4FF
X0000.0
X0127.7
9216
10239
A000
A024
1984 41FFE7C0
2008 41FFE7D8
A000.0
A024.7
15872
16071
R000
R499
2010 41FFE7DA
2509 41FFE9CD
R0000.0
R0499.7
16080
20079
R500
R999
2510 41FFE9CE
3009 41FFEBC1
R0500.0
R0999.7
20080
24079
T000
T079
3024 41FFEBD0
3103 41FFEC1F
T0000.0
T0079.7
24192
24831
K000
K018
3112 41FFEC28
3130 41FFEC3A
K0000.0
K0018.7
24896
25047
C000
C079
3132 41FFEC3C
3211 41FFEC8B
C0000.0
C0079.7
25056
25695
D000
D883
3212 41FFEC8C
4095 41FFEFFF
D0000.0
D0883.7
25696
32767
D0884
D1859
4096 41FFF000
5071 41FFF3CF
D0884.0
D1859.7
32768
40575
.c
nc
ce
nt
e
r.c
C000
G511
om
159
B61992E/02
.c
nc
ce
nt
e
r.c
om
APPENDIX
160
APPENDIX
B61992E/02
M.1
OUTLINE
.c
nc
ce
nt
e
r.c
om
This feature allows CNC data for tool posts 1 and 2 to be read and written.
161
APPENDIX
B61992E/02
M.2
ASWITCHING OF
TARGET TOOL POST
FOR INPUT/OUTPUT
BY THE HOST
COMPUTER
HOST
PMC
(1)
R or D area
Ladder
CNC
ce
nt
e
r.c
(3)
om
WHEAD
(2)
(1) Using the PMC data write function of DNC2, the host computer
issues a request for switching to a target tool post for input/output to
the R or D area.
(2) Using the PMC data read function of DNC2, the host computer
confirms that DI signal WHEAD has been changed.
.c
nc
(3) Using these DNC2 functions, the host computer reads and writes
toolpostdependent data.
162
APPENDIX
B61992E/02
M.3
An outlined flow for writing data to tool posts 1 and 2 is shown below.
EXAMPLE
D_PMCdata_r
om
D_PMCdata_w
No
r.c
D_variable_w_mem
ce
nt
e
D_PMCdata_w
D_PMCdata_r
No
nc
Yes
.c
D_variable_w_mem
END
End
NOTE
1 All the names in the flowchart are function names of the
DNC2 communication package.
2 For details of each function, see Section III4.4.
3 Directly changing the status of DI signal WHEAD is not
advised. The status of the signal should be changed by a
ladder using, for example, an internal relay.
163
APPENDIX
B61992E/02
M.4
#7
PARAMETERS
#6
2004
#5
#4
DIHD
#3
#2
#1
#0
om
.c
nc
ce
nt
e
r.c
164
APPENDIX
B61992E/02
CONNECTION
[Type]
Input signal
[Function] When a window function instruction or DNC2 function
instruction is executed, this signal selects tool post 1 or 2.
[Operation] If this signal is low, executing a window function instruction
or DNC2 function instruction causes input/output of the data
related to tool post 1.
If this signal is high, executing a window function
instruction or DNC2 function instruction causes
input/output of the data related to tool post 2.
It takes at least 8 ms for the WHEAD signal to be accepted
by the NC after the signal status is changed.
.c
nc
ce
nt
e
r.c
om
M.5
165
B61992E/02
.c
nc
ce
nt
e
r.c
om
APPENDIX
166
APPENDIX
B61992E/02
N.1
COMMUNICATION
OPERATION SCREEN
When DNC operation is performed with the DNC2 function, the program
name set on the communication operation screen is sent to the host.
This screen is displayed by using function key <SYSTEM> then the
[COPER] soft key.
COMMUNICATION OPERATION
O0001 N00000
r.c
om
O0001. PRG
12:34:53
][
][ (OPRT) ]
ce
nt
e
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
.c
nc
167
N.2
COMMUNICATION
SERVICE SCREEN
APPENDIX
B61992E/02
COMMUNICATION PARAMETER
NC APPLICATION NAME
O0001 N00000
ce
nt
e
r.c
om
This screen is displayed by using function key <SYSTEM> then the ***
F.464 *** soft key.
The communication service screen consists of the three pages. Use the
page keys to switch between the pages described below.
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
12:34:53
][
][ (OPRT) ]
.c
nc
COMMUNICATION PARAMETER
O0001 N00000
CNC STATUS (UNSOLICITED STATUS)
RISING UPPER word
00000000 11111111
LOWER word
11111111 11111111
FALLING UPPER word
00000000 00000000
LOWER word
01010100 00000010
INFOMATION REPORT MASK
UPPER word
00000000 00000000
LOWER word
00000000 00000000
CNC ALARM(INFORMATION REPORT)
UPPER word
11110001 00000000
LOWER word
01000001 10000111
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
12:34:53
][
][ (OPRT) ]
168
APPENDIX
B61992E/02
COMMUNICATION PARAMETER
PASCAL STACK ADDRESS
UPPER LIMIT
LOWER LIMIT
SERVICE MODE 1
O0001 N00000
00000000
00000000
0000000000000000
SERVICE MODE 2
0000000000000000
FILE REQUEST TIME OUT
om
00002000
REMOTE REQUEST TIME OUT
00002000
12:34:53
][
][ (OPRT) ]
r.c
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
nc
ce
nt
e
The DNC2 function uses only part of the communication parameters. The
parameters used are as follows:
a) NC application name
: Unused
b) Host application name
: Unused
c) Status notification enabled : Used
d) Status notification mask
: Unused
e) Alarm notification
: Used
f) Pascal stack address
: Unused
g) Service mode 1
: Unused
h) Service mode 2
: Unused
i) File request timeout
: Used
j) Remote request timeout
: Used
k) Status notification enabled
.c
APPENDIX
B61992E/02
ce
nt
e
i)
r.c
om
e) Alarm notification
This parameter sets whether to notify the host if an alarm is generated
in the CNC.
Bit
0 : Foreground PS alarm
1 : Background PS alarm
2 : Overheat alarm
3 : Undefined
4 : Undefined
5 : Parameter input enable alarm
6 : Overtravel (OT) alarm
7 : PMC error
8 : External alarm
9 : Undefined
10: Severe PS alarm
11: Undefined
12: Servo alarm
13: I/O alarm
14: Undefined
15: Battery alarm
.c
nc
NOTE
1 A file request is a request for program downloading or
uploading.
2 The parameter value is set as follows:
Unit
: ms
Range : 16 ms to 9999.9984 s
(If 0 is set, 26 s is assumed.)
j)
NOTE
1 A remote request is a request from the host to the CNC
except program downloading and uploading requests.
2 The parameter value is set as follows:
Unit
: ms
Range : 16 ms to 9999.9984 s
(If 0 is set, 26 s is assumed.)
170
Index
B61992E/02
[A]
Details, 73
Details of the Data Section, 31
Acceleration/Deceleration Delay, 37
Application Layer, 23
[B]
Error Codes, 102, 144
om
[E]
[C]
r.c
Code, 30
Example, 163
Commands, 150
Executing a Program, 57
ce
nt
e
Communication Mode, 13
[F]
nc
Configuration, 7, 64
Connection, 165
Files, 147
Format, 29
Continuation, 30
.c
Function Specifications, 69
Functions, 24, 72
[D]
[I]
Installation, 65
Installation Procedure, 67
Data Type, 29
Interrupt, 60
Datagram Protocol, 59
Interrupt Command, 59
Datagram Syntax, 25
Interrupt Procedure, 60
[L]
i1
Index
B61992E/02
[M]
om
Maintenance, 133
r.c
Receiving a Datagram, 22
Message Format, 20
Reset, 58
RS232C Interface, 14
[N]
Negative Acknowledgment, 59
Nonblinking LED Indications, 135
Notation of the Datagram, 29
Notes, 71
ce
nt
e
RS422 Interface, 16
[S]
.c
nc
[O]
Supplied Programs, 66
[P]
Symbols, 29
Synchronous Method, 13
Physical Interface, 13
Physical Layer, 12
[T]
Termination, 22
Transmission Characters, 20
[R]
i2
Index
B61992E/02
[U]
[W]
Use, 70
[V]
.c
nc
ce
nt
e
r.c
om
i3
Oct., 97
Nov., 91
Date
02
01
Edition
Contents
Revision Record
r.c
Edition
Date
ce
nt
e
nc
.c
Contents
om
om
r.c
.c
nc
ce
nt
e