dnc2 Romi Fanuc 61992e PDF
dnc2 Romi Fanuc 61992e PDF
dnc2 Romi Fanuc 61992e PDF
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
II. PROTOCOL
1. LAYERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2. PHYSICAL LAYER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.1
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
3.1
19
3.2
MESSAGE FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.3
TRANSMISSION CHARACTERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
3.4
21
3.4.1
3.4.2
3.4.3
3.4.4
21
21
22
22
4. APPLICATION LAYER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
4.1
FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
4.2
DATAGRAM SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
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
4.3
B61992E/02
4.2.4.5
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
42
43
45
45
46
47
48
49
49
50
51
53
54
55
57
57
4.2.4.30 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
58
DATAGRAM PROTOCOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1
4.3.2
59
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1.1 Negative acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
59
59
60
60
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
103
6.2
103
105
7.2
107
APPENDIX
A. CONNECTOR SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.1
112
A.2
113
A.3
114
B. PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
B.1
FANUC Series 0 (UPPER ROW: Series 0TC, LOWER ROW: Series 0MC) . . . . . . . . . . . . . . . . .
117
B.2
Series 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
120
B.3
123
Series 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
130
E.2
Series 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
OUTLINE OF FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
146
PREPARATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
147
K.2.1
K.2.2
K.2.3
K.3
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
150
150
151
152
MENU LAYOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
153
K.4.1
K.4.2
K.4.3
153
154
158
L. PMC ADDRESS
(Series 15A AND ADDRESS SPECIFICATION TYPE OF Series 15B) . . . . . 159
M. DNC2 TOOL POST SELECTION (Series 15TTB) . . . . . . . . . . . . . . . . . . . . . . . . . 160
M.1
OUTLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
161
M.2
162
M.3
EXAMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
163
M.4
PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
164
M.5
CONNECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
165
167
N.2
168
c4
I. GENERAL
I. GENERAL
B61992E/02
GENERAL
1. GENERAL
1. GENERAL
1.1
OUTLINE
I. GENERAL
B61992E/02
Personal computer
User
application program
Application layer
Application layer
Physical layer
Physical layer
RS-232-C/RS-422
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
B61992E/02
1. GENERAL
I. GENERAL
(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
Downloading a part program
Uploading a part program
Service function
Writing CNC
d t
data
CNC parameter
Pitch error compensation
Tool offset
Reading
Machine position
d t
CNC data
Absolute position
Skip position
Servo delay
Selecting a program
Start
Acceleration/deceleration
delay
Reset
Alarm notification
CNC parameter
1. GENERAL
I. GENERAL
B61992E/02
Abbreviation
0MC
0TC
15MA
15TA
15TTA
15MB
15TB
15TTB
16MA
16TA
16GSA
16GCA
16MB
16TB
16MC
16TC
16iMA
16iTA
18MA
18TA
18GSA
18GCA
18MB
18TB
18MC
18TC
18iMA
18iTA
21iMA
21iTA
Series 0
0C
C
Series 0
Series 15A
Series 15
Series 15B
Series 16
16A
A
Series 16
16B
B
Series 16
Series 16C
16 C
Series 16i
16 A
A
Series 18
18A
A
Series 18
18B
B
Series 18
Series 18C
18 C
Series 18i
18 A
A
Series 21i
21 A
A
Series 21
2. CONFIGURATION
I. GENERAL
B61992E/02
CONFIGURATION
Series
16/18/21
Option
Series 0
Application
DNC2
Read/write of custom
macro variables
Background editing
PMC
:
n:
:
:
Required
Optional
Not required
Standard
CNC
DNC2 ROM
Host computer
DNC2
communication
program library
II. PROTOCOL
1. LAYERS
II. PROTOCOL
B61992E/02
LAYERS
FANUC CNC
Application program
Application program
Application layer
Application layer
Physical layer
Physical layer
RS-232-C/RS-422
11
2. PHYSICAL LAYER
II. PROTOCOL
PHYSICAL LAYER
12
B61992E/02
2.1
2. PHYSICAL LAYER
II. PROTOCOL
B61992E/02
PHYSICAL
INTERFACE
2.2
Asynchronous transmission
SYNCHRONOUS
METHOD
LSB
ST
MSB
b1
b2
b3
b4
b5
b6
b7
b8
SP
1
0
ST
b1 to b8
P
SP
2.3
:
:
:
:
Half-duplex transmission
COMMUNICATION
MODE
2.4
COMMUNICATION
SPEED
2.5
MAXIMUM CABLE
LENGTH
13
2. PHYSICAL LAYER
2.6
RS232C
INTERFACE
II. PROTOCOL
B61992E/02
Host computer
SD
SD
RD
RD
RS
RS
CS
CS
ER
ER
DR
DR
CD
CD
SG
SG
FG
FG
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
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.
CD
109
Input
SG
102
Signal ground
FG
101
Protective ground
Receive data
NOTE
The on and off states of each signal conform to the
following:
Function
Signal condition
15
Less than 3V
+3V or more
Off
On
Marking
Spacing
2. PHYSICAL LAYER
2.7
RS422 INTERFACE
II. PROTOCOL
B61992E/02
16
Host computer
SD
SD
*SD
*SD
RD
RD
*RD
*RD
RS
RS
*RS
*RS
CS
CS
*CS
*CS
TR
TR
*TR
*TR
RR
RR
*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
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.
TT
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.
SG
102
Signal ground
FG
101
Protective ground
Receive data
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
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
3.1
TRANSMISSION
CONTROL
CHARACTERS
II. PROTOCOL
B61992E/02
Tcc
Meaning
ASCII
ISO
ENQ
05H
05H
Request to send
NAK
15H
95H
Negative acknowledgment
DLE 0
10H 30H
90H 30H
Acknowledgment
DLE 1
10H 31H
90H B1H
Acknowledgment
DLE STX
10H 02H
90H 82H
Datagram start
DLE ETX
10H 03H
90H 03H
Datagram end
EOT
04H
84H
19
End of transmission
II. PROTOCOL
B61992E/02
3.2
MESSAGE FORMAT
DLE
STX
Datagram
DLE
ETX
BCC
(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.
(2) Block check character (BCC)
The BCC is obtained by exclusive ORing all characters of the
datagram excluding DLE and STX.
3.3
These characters are usually ASCII code but can also be ISO code.
TRANSMISSION
CHARACTERS
20
II. PROTOCOL
B61992E/02
3.4
DATA LINK
PROTOCOL
3.4.1
Establishing a Data
Link
Initial
state
(A)
The master device that needs to send the datagram establishes the data
link.
Datagram transmission
DLE0
Termination
(A)
EOT
DLE1
Timeout
ENQ
NAK
Other
EOT
(A)
Error
(Note) The underlined characters indicate the response from the receiving (slave) device.
Fig.3.4.1 Establishing the Data Link
3.4.2
Sending a Datagram
Data
link
Termination
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
Initial
state
Data link
establishment
Datagram reception
Termination
ENQ
Other
Timeout
Other
(A)
ENQ
DLE0
DLE1
NAK
EOT
(A)
Error
ENQ
Timeout
Other
Error
(Note) The underlined characters indicate the response from the sending (master) device.
Fig.3.4.3 Receiving a Datagram
3.4.4
Termination
22
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
APPLICATION LAYER
This chapter outlines the application layer. For more details, see the
description given later.
23
4. APPLICATION LAYER
4.1
II. PROTOCOL
B61992E/02
FUNCTIONS
Function
Description
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
CNC parameter
H!C
Reads the value of the CNC parameter with the specified number.
H!C
Tool offset
H!C
H!C
H!C
Reads tool life management data with the specified tool group
number.
H!C
Actual speed
H!C
H!C
Alarm information
H!C
Status information
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.
H!C
Writes the specified data to the custom macro variable with the
specified number.
Operator message
H!C
PMC data
H!C
H!C
H!C
Reset
H!C
Alarm notification
HzC
Status notification
HzC
System ID
H!C
Writing
CNC
data
24
Remarks
B61992E/02
4.2
DATAGRAM SYNTAX
II. PROTOCOL
4. APPLICATION LAYER
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
Fist entry
A
Listing catalog
DI
Catalog request
LI
Clear
MC
Operation mode
Receive
Transmit
Prepare to send
PT
Prepare to receive
PR
A
Second entry
AD
h/c
h/c
Acc./Dec error
AE
h/c
h/c
Actual feedrate
AF
h/c
h/c
Alarm status
AL
h/c
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
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
NB
h/c
18
Not position
NP
h/c
19
Incorrect number
NR
20
Function ready
OK
21
Parameter
PA
h/c
h/c
h/c
22
PMC data
PD
h/
h/c
h/c
23
Pitch error
PE
h/c
h/c
h/c
24
Part program
PM
h/c
h/c
h/c
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
32
Status
ST
h/c
h/c
33
TL
34
Tool offset
TO
35
Absolute position
WP
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
h/c
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
Service Functions
Specified with
Datagram Commands
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> ]
14
<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>
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
28
Selecting a program
29
Executing a program
30
31
Reading a system ID
NOTE
The service functions marked with an asterisk (*) are not
supported.
28
II. PROTOCOL
B61992E/02
4. APPLICATION LAYER
4.2.3
Notation of the
Datagram
4.2.3.1
Symbols
<>
[]
: 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
Command section
Data section
2 bytes
2 bytes
Variable length
1st entry
2nd entry
4.2.3.3
Data type
29
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
9999 to 9999
99999999. to 99999999.
0X19A5
ABCDEFGH or ABC EF
12345
123.4567895
0XFF1234
ABCDEFGHI
4.2.3.4
Delimiter in the data
section
4.2.3.5
Code
4.2.3.6
Continuation
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.
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
B61992E/02
4. APPLICATION LAYER
II. PROTOCOL
4.2.4
Details of the Data
Section
4.2.4.1
Downloading a part
program
(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.
(2) Datagram transmission
1) Commands issued by the host computer
Host
CNC
<PR><PM><nn>
<M ><RR>
<R ><PM><program>
<T ><NB>
<R ><PM><program>
<T ><NB>
<T ><FD>
<M ><OK>
CNC
<PT><PM><nn>
<M ><RT>
<T ><NB>
<R ><PM><program>
<T ><NB>
<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
4.2.4.2
Uploading a part
program
(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.
(2) Datagram transmission
1) Commands issued by the host computer
Host
CNC
<PT><PM><nn>
<M ><RT>
<T ><NB>
<R ><PM><program>
<T ><NB>
<R ><PM><program>
<T ><NB>
<T ><FD>
<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
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
No program is found.
An alarm occurred in the CNC.
(For Series 0 only)
(5) Note
Release background edit mode and simultaneous edit mode (Series
15 only) in advance.
4.2.4.3
Deleting a part program
(1) Function
This command deletes a part program from memory.
(2) Datagram transmission
Host
CNC
<MC><PM><nn>
<M ><OK>
(3) Parameter
nn : Program number (SI: 4)
If nn is 9999, all programs are deleted.
(4) Negative acknowledgment
1) M_NR [0XFB9D]:
The program with nn is not found, or no programs are found.
2) M_NP [0XFB98]:
The program is protected by a parameter or key switch.
3) M_NP [0XFB93]:
The program is being used (selected or executed). If the
program is being selected in the edit mode, it can be deleted.
4) M_NP [0XFBA7]:
Alarm state (for Series 0)
nn is no 9999, and the system is not in the edit mode.
(for Series 15/16/18/21)
(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.
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>
<DI><PM><nn> [<<,><nn>>. . .]
<T ><NB>
<T ><FD>
<M ><OK>
(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.
(4) Negative acknowledgment
1) T_NP [0XFC02]:
The specified program is not found. (For Series 0/16/18/21)
2) T_NP [0XFC03]:
The specified program is not found. (For Series 15)
3) T_NP [0XFC02]:
No program is found. (When no program)
4.2.4.5
Free area in program
memory
(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.
(2) Datagram transmission
Host
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
Host
CNC
NOTE
<T><WP> :
<T><MP> :
<T><SP> :
(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.
Bit
15 14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
Not used
35
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.7
Servo delay
(1) Function
This command reads the current servo delay.
(2) Datagram transmission
Host
CNC
(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.
Bit
15 14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
Not used
36
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.8
Acceleration/
deceleration delay
(1) Function
This command reads the current acceleration/deceleration delay.
(2) Datagram transmission
Host
CNC
(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.
Bit
15 14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
Not used
37
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.9
Machine interface
signals
(For Series 15 only)
(1) Function
This command reads the machine interface signals (DI/DO) specified
with diagnosis numbers.
(2) Datagram transmission
Host
CNC
<T ><MI><mm>
[<:><nn> ]
<R ><MI><0Xdd> [<,><0Xdd>]..
<M ><OK>
(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.
(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
Current program number
and sequence number
(1) Function
This command reads the current program number and sequence
number.
(2) Datagram transmission
Host
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
B61992E/02
4. APPLICATION LAYER
II. PROTOCOL
4.2.4.11
Reading a CNC
parameter
(1) Function
This command reads a CNC parameter.
(2) Datagram transmission
Host
CNC
<PT><PA><nn> [<,><OXmm>]
<M ><RT>
<T ><NB>
<R ><PA><Nnn>< <Pvv> |
<Ax><Pvv> [<Ax><Pvv> ]..
<T ><NB>
<T ><FD>
<M ><OK>
(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.
(4) Negative acknowledgment
1) M_NR [0XFBA5]:
The parameter number is incorrect.(For Series 0 only)
2) M_NR [0XFBA4]:
The parameter number is incorrect.(For Series 15 only)
3) M_NR [0XFBA3]:
The axis exponent parameter (0Xmm) is invalid.
(For Series 15 only)
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> ]..>
<T ><NB>
<R ><PA><Nnn>< <Pvv> |<Ax><Pvv> [<Ax><Pvv> ]..>
<T ><NB>
<T ><FD>
<M ><OK>
(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.
(4) Negative acknowledgment
1) M_NP [0XFB98]:
The parameter is writeprotected or locked.
(For Series 15/16/18/21)
2) M_NR [0XFBA45]:
The parameter is invalid. (For Series 0/16/18/21)
3) M_NR [0XFBA4]:
The parameter is invalid. (For Series 15/16/18/21)
40
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
4.2.4.13
Reading pitch error
compensation data
(1) Function
This command reads pitch error compensation data.
(2) Datagram transmission
Host
CNC
<PT><PE><mm> [<:><nn> ]
<M ><RT>
<T ><NB>
<R ><PE><Nnn><Pvv>
[<Nnn><Pvv> ]..
<T ><NB>
<T ><FD>
<M ><OK>
(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)
(4) Negative acknowledgment
M_NR [0XFFCA]:
The parameter value is invalid, or no option is found
(for Series 0 only).
(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
Writing pitch error
compensation
(1) Function
This command writes pitch error compensation.
(2) Datagram transmission
Host
CNC
<PR><PE>
<M ><RR>
<R ><PE><Nnn><Pvv>[<Nnn><Pvv>]..
<T ><NB>
<R ><PE><Nnn><Pvv>[<Nnn><Pvv>]..
<T ><NB>
<T ><FD>
<M ><OK>
(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)
(5) Note
This command can write only the pitch error compensation into the
CNC. To write other parameters, use the <PR> <PA> command.
42
B61992E/02
4. APPLICATION LAYER
II. PROTOCOL
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>
<R ><TO> {<Nnn> <Dvv> [<Kvv>
[<Hvv><Lvv]]
(3)
|<Xvv><Zvv><Rvv><Yvv><Qvv> (3)
[<Uvv><Wvv><Pvv><Vvv>]>}.. (3)
<T > <NB>
<T ><FD>
<M > <OK>
(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
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
: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
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
4) Nnn :
5) Dvv :
Kvv :
Hvv :
Lvv :
Xvv :
Zvv :
Rvv :
Yvv :
Qvv :
Uvv :
Wvv :
Pvv :
Vvv :
B61992E/02
14
12
12
Request flag
Model
Memory
type
T
Series0
M
T
Series15
M
T
Series
16/18/21
M
11
10
: Ignored
: Specifiable
: Not specifiable
44
D
M
b : Standard
o : Option
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
4.2.4.16
Writing a tool offset
(1) Function
This command writes a tool offset.
(2) Datagram transmission
Host
CNC
<PR><TO>
<M ><RR>
<R ><TO>{<Nnn><Dvv>[<Kvv>
[<Hnn><Lvv>]] |
<Xvv><Zvv><Rvv><Yvv><Qvv>
[<Uvv><Wvv><Pvv><Vvv>]>}..
<T ><NB>
<T ><FD>
<M ><OK>
(3) Parameters
See 3) and 4) in item (3) of Subsection 4.2.4.15.
(4) Negative acknowledgment
1) M_NR [0XFBA3] :
The compensation number is incorrect. (For Series 0 only)
2) M_NR [0XFBA4] :
The compensation number is incorrect. (For Series 15 only)
4.2.4.17
Reading custom macro
variables
(1) Function
This command reads custom macro variables.
(2) Datagram transmission
Host
CNC
<PT><MV><mm> [<:><nn>]
<M ><RT>
<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>
<M ><RR>
<R ><MV><Nnn><Pvv>
[<Nnn><Pvv>] ..
<T ><NB>
<R ><MV><Nnn><Pvv>
[<Nnn><Pvv>] ..
<T ><NB>
<T ><FD>
<M ><OK>
<M ><OK>
(3) Parameters
1) Nnn : nn is the custom macro variable number. (UI:5)
2) Pvv : Value of custom macro variable nn (SR:9)
(4) Negative acknowledgment
1) M_NR [0XFBA5] :
The custom macro variable number is incorrect.
(For Series 0/16/18/21)
2) M_NR [0XFFA4] :
The custom macro variable number is incorrect.
(For Series 15)
3) M_NR [0XFB9E] :
No option is found.
(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
Reading tool life
management data
(1) Function
This command reads tool life management data with the specified
group number.
(2) Datagram transmission
Host
CNC
<PT><TL><mm> [<:><nn>]
<M ><RT>
<T ><NB>
<R ><TL> {<Pnn><Lvv>[<Qnn>]
[<Ttt><Hhh><Ddd><Ccc>]..} ..
<T ><NB>
<T ><FD>
<M ><OK>
(3) Parameters
1) mm :
2) nn :
3) Pnn :
4) Lnn :
5) Qnn :
6)
7)
8)
9)
Ttt
Hhh
Ddd
Ccc
:
:
:
:
.
.
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>
<R ><MD> [<Ggg.vv>] [<Ggg.vv>]..
[<Ddd>] [<Eee>] [<Hhh>]
[<Lll>] [<Mmm>] [<Nnn>]
[<Ooo>] [<Sss>] [<Ttt>]
[<Fff>]
<M ><OK>
(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
48
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
4.2.4.21
Reading an actual
feedrate
(1) Function
This command reads the feedrate of each axis or the composite
feedrate of all axes.
(2) Datagram transmission
Host
CNC
(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
Host
CNC
(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) Negative acknowledgment
1) M_NR [0XFFC9] : The axis request flag is omitted.
2) M_NP [0XFB94] : Alarm status (for Series 0/16/18/21)
49
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.23
Reading alarm
information
(1) Function
This command reads alarm information.
(2) Datagram transmission
Host
CNC
<T ><AL>
<R ><AL><0Xaa> [<,><cc>] ..
<M ><OK>
(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
(4) Negative acknowledgment
None
50
B61992E/02
4. APPLICATION LAYER
II. PROTOCOL
4.2.4.24
Reading status
information
(1) Function
This command reads status information.
(2) Datagram transmission
1) Request from the host computer
Host
CNC
<T ><ST>
<R ><ST><0Xss> [<,><0Xaa>]
<M ><OK>
CNC
(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
Start
End
Download
Automatic
notification
Information of this
status change is
not posted.
Status
change
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
4.2.4.25
Operator messages
(1) Function
This command displays the operator messages on the Screen of the
CNC.
(2) Datagram transmission
Host
CNC
<M ><DI><nn><,><message>
<M ><OK>
(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.
(4) Negative acknowledgment
M_NR [0XFFC9] : The message number is incorrect.
53
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
4.2.4.26
Reading PMC data
(1) Function
Data in the PMC area is read.
(2) Datagram transmission
a) Type A
Host
CNC
<PT><PD><0Xaa |mm|ammmm>
<, ><nn>
<M ><RT>
<T ><NB>
<R ><PD> {<N0Xaa |Nmm|
Nammmm><P0Xvv> [<P0Xvv>]..}..
<T ><NB>
<R ><PD> {<N0Xaa |Nmm|
Nammmm><P0Xvv> [<P0Xvv>]..}..
<T ><NB>
<T ><FD>
<N ><OK>
b) Type B
Host
CNC
<T ><PD><0Xaa|mm|ammmm>
<R ><PD>
<N0Xaa|Nmm|Nammmm><P0Xvv>
<M ><OK>
(3) Parameters
1) aa
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
NOTE
The PMC data number must consist of five numeric
characters if address <a> is a nonzero value.
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.
(4) Negative acknowledgment
M_NR [0XFFCA]:
The PMC address or PMC data number is invalid.
4.2.4.27
Writing PMC data
(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.
(2) Datagram transmission
a) Type A
Host
CNC
<PR><PD>
<M ><RR>
<R ><PD> {<N0Xaa|Nmm|Nammmm>
<P0Xvv> [<P0Xvv>]..}..
<T ><NB>
<R ><PD> {<N0Xaa|Nmm|Nammmm>
<P0Xvv> [<P0Xvv>]..}..
<T ><NB>
<T ><FD>
<M ><OK>
b) Type B
Host
CNC
(3) Parameters
1) aa
4. APPLICATION LAYER
II. PROTOCOL
B61992E/02
mm
56
B61992E/02
II. PROTOCOL
4. APPLICATION LAYER
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>
<M ><OK>
(3) Parameter
nn : Part program number (UI:4)
(4) Negative acknowledgment
1) M_NR [0XFC0C] :
Program nn is not found.
2) M_NR [0XFC08] :
Alarm status (for Series 0 only), or the program is running.
3) M_NR [0XFC09] :
The system is not in the AUTO mode. (For Series 0 only)
(5) Note
With the Series 15, only memory mode (MEM) and edit mode (EDIT)
are valid. In other modes, the sequence terminates normally, but
program selection is not performed.
4.2.4.29
Executing a program
(1) Function
This command selects and executes a program.
(2) Datagram transmission
Host
CNC
(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
Reset
(1) Function
This command resets the CNC. It functions in the same way as the
external reset (ERS) signal of the machine interface.
(2) Datagram transmission
Host
CNC
<M ><CC>
<M ><OK>
(3) Parameters
None
(4) Negative acknowledgment
None
4.2.4.31
Reading a system ID
(1) Function
This command reads information on the system ID.
(2) Datagram transmission
Host
CNC
<T ><ID>
<R ><ID><model name><,><revision>
<M ><OK>
(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)
(4) Negative acknowledgment
None
58
B61992E/02
4.3
DATAGRAM
PROTOCOL
4.3.1
Error Handling
II. PROTOCOL
4. APPLICATION LAYER
This section describes the datagram protocol between the FANUC CNC
and the host computer.
4.3.1.1
Negative
acknowledgment
(1) Syntax
<T_BD | M_ER | M_NR | M_NP | T_NP | M_IL> [<0Xeeee>]
(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) 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.
4.3.1.2
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
Receiving device
Command A11
Response A11
Command B11
Response B11
Command B12
Interrupt by the
sending device
Response B12
Command A12
Response A12
CASE : B
Command A21
Response A21
Response B21
Command B21
Response B22
Command B22
Command A22
Response A22
60
B61992E/02
1. OUTLINE
OUTLINE
63
2. CONFIGURATION
B61992E/02
CONFIGURATION
IBM PC series
Model :
OS
:
Compiler:
Memory :
Others
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
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.
64
B61992E/02
INSTALLATION
65
3.
3.
3.1
SUPPLIED
PROGRAMS
\
B61992E/02
LIB
DNC2DFF.H
Header file
DNC2NECL.LIB
DNC2IBML.LIB
DNC2FMRL.LIB
DEMO
SRC
D2_DEMO.H
D2_GLB.H
D2_PRT.H
D2DTEXT.H
DEMO_MAN.C
D2_DEMO.C
D2DTGLB.C
D2_UTNEC.C
D2_UTIBM.C
D2_UTFMR. C
IBM_DEMO.MAK
98_DEMO.MAK
FMR_DEMO.MAK
DEMOIBM. EXE
DNC2SYS.CFG
Error log directory
LOG
LOG.EXE
Executable file of DNC2 communication program library error log inspection program
SRC
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.
C>CD \DNC2
C>COPY A: \LIB \DNC2DEF. H C:
C>COPY A: \LIB \DNC2IBML. LIB 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.
(2) Application program setup
This library only executes single functions (commands). It requires
a main program which executes different types of functions in
combination. The main program is called an application program.
When creating an application program, be sure to include the header
file DNC2DEF. H at the beginning. (Insert the following line at the
beginning of each file.)
#include dnc2def. h
MSC \
BINR \
LIB \
INCLUDE \
:
:
:
Compiler
Standard library
Include file
68
B61992E/02
FUNCTION SPECIFICATIONS
69
4. FUNCTION SPECIFICATIONS
4. FUNCTION SPECIFICATIONS
4.1
USE
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.
The return values of functions are always of the short type. As required,
convert them to a proper type (cast) for use.
Example) test( )
{
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
NOTES
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.
(2) Specify in uppercase a program number or any other character string
used as an argument to call a function.
Message output can be input in both uppercase and lowercase.
(3) Specify the name of an inputoutput file with an absolute path or a
path relative to a current directory.
(4) Since the functions that output results to files open files in the
overwrite mode, the contents of existing files are deleted.
(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.
(6) Arguments selected by numbers (mode of D_tool_pos()) can be
specified directly by numeric values, or by defined names. (The latter
is recommended.)
When specifying arguments by defined names, be sure to include
dnc2def.h.
Example) #include dnc2def.h
...
D_tool_pos(0,MACHINE_POS,0x13,&tooldat [0 ] );
71
4. FUNCTION SPECIFICATIONS
4.3
FUNCTIONS
No.
Function
B61992E/02
Description
Send
command
D_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
T SE
T AE
T MI
D_fdir
D_tool_pos
10
11
12
D_servo
13
D_exec_num
T PN
T SN
14
15
16
D_parameter_r
PTPA
PRPA
PRPA
17
18
D_pitch_r
PTPE
PTPE
19
20
21
D_pitch_w
PRPE
PRPE
PTTO
22
23
D_offset_r_mem
PTTO
PRTO
24
25
26
D_offset_w_mem
PRTO
PTMV
PTMV
27
28
D_variable_w
PRMV
PRMV
29
30
D_toollife
PTTL
PTTL
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
D_AccDec
D_diagnose
D_parameter_w
D_parameter_w_mem
D_pitch_r_mem
D_pitch_w_mem
D_offset_r
D_offset_w
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
Arguments
: char ch_no
Cannel number (0 to 3) <numeric value>
uchar *file_name
: 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.
The general procedures for DNC operation are
explained below.
(1) Put the system in the tape mode (for Series 15
only)
(2) Use the PMC data read function to check that
the CNC has become ready.
73
4. FUNCTION SPECIFICATIONS
B61992E/02
Arguments
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
char *prg_no
Return value
Outline
74
B61992E/02
4. FUNCTION SPECIFICATIONS
Note
5) Function
: D_fdir
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
char *prg_no
Return value
Outline
6) Function
Arguments
: char ch_no
Channel number (0 to 3) <numeric value>
uchar *file_name
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
Program number
char [6]
Program number
char [6]
Return value
: =0
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
= 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>
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
Return value
First-axis data
double
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.
= FFFF
= FFF0
Outline
10)Function
: D_servo Reads the servo delay.
Calling format : short D_servo (char ch_no,
short
Arguments
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
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.
: 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
77
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.)
Bit
14 13 12
11 10 9
0
1st axis
2nd axis
15th axis
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.
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
= FFFF
= FFF0
Arguments
Channel number (0 to 3)
<numeric value>
short start_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
Channel number (0 to 3)
<numeric value>
char type
Arguments
Channel number (0 to 3)
<numeric value>
short p_no
Parameter number
<numeric value>
short axis
14 13 12
11 10 9
0
1st axis
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
(char ch_no, uchar *file_name)
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
uchar *file_name
short
Data
Parameter No.
short
Data
Axis specification
short
Data
Without axis specification
CNCPARAM
First-axis data
long
Parameter value
long
Second-axis data
Free
long_14
15th-axis data
Axis specification
Bit 14 13 12 11 10 9
8 7
0
1st axis
2nd axis
15th axis
typedef struct {
short no;
short axis;
long dt [15]
} CNCPARAM;
Return value
: =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.
=
=
=
=
Outline
Note
80
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
Parameter No.
short
Data
Axis specification
short
Data
Data
CNCPARAM
long
long
Second-axis data
Free
long_14
15th-axis data
Axis specification
Bit 14 13 12 11 10 9
8 7
0
1st axis
2nd axis
15th axis
typedef struct {
short no;
short axis;
long dt [15]
} CNCPARAM;
Return value
: =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
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
4. FUNCTION SPECIFICATIONS
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.
=
=
=
=
Outline
FFFF
FFFE
FFFC
FFF0
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
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
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.
=
=
=
=
Outline
FFFF
FFFE
FFFD
FFF0
20)Function
: D_pitch_w_mem Writes pitch error data.
Calling format : short D_pitch_w_mem
(char ch_no, short start_no, short
stop_no, char *data)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
short start_no
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
start_no,
short
stop_no,
type, uchar *file_name)
Arguments
: char ch_no
Channel number (0 to 3)
ushort
<numeric value>
short start_no
Data
Data
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
Outline
4. FUNCTION SPECIFICATIONS
Normal
Communication error
File open error
File write error
Sequence error
See Appendix F.
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:
H, D, L, K
: Milling machine offset
X, Z, R, Y, Q, U, W, P, V : Lathe offset
22)Function
: D_offset_r_mem
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
short start_no
: =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
Channel number (0 to 3)
ushort
<numeric value>
short start_no
: =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.
=
=
=
=
Outline
86
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
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
Outline
25)Function
: D_variable_r
Reads custom
variables.
macro
Arguments
Channel number (0 to 3)
long
<numeric value>
long start_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.
=
=
=
=
Outline
26)Function
B61992E/02
FFFF
FFFE
FFFD
FFF0
: D_variable_r_mem
Arguments
Channel number (0 to 3)
<numeric value>
long start_no
Variable data
double
Variable data
Return value
: =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
Outline
88
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
Variable data
double
Variable data
Return value
: =0
=
=
=
=
Normal
Arguments
Channel number (0 to 3)
<numeric value>
long start_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
long
Group number
short
Group data
short
Group data
file_name
long
Data count
Group data
short
Data
Tool number
short
Data
H code
short
Data
D code
short
TOOLLIFE
C code
short
TOOLCODE
typedef struct{ typedef
short g_no;
short type;
long life;
short d_cnt;
} TOOLLIFE;
Return value
: =0
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.
=
=
=
=
Outline
90
struct {
short no;
short hcode;
short dcode;
short ccode;
} TOOLCODE;
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
short
Group data
short
Group data
Group data
long
short
Data
Tool number
short
Data
H code
short
Data
D code
short
TOOLLIFE
C code
short
TOOLCODE
Return value
: =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
Outline
91
4. FUNCTION SPECIFICATIONS
B61992E/02
Arguments
short
operation
modal
select,
uchar
Channel number (0 to 3)
<numeric value>
short select
file_name
Number of
data items
Data
short
long
0,1,2
Address
G,D,E,H,L,M,N,O,S,T,F (character)
char
1:
2:
3:
4:
Data
Data
Fixed
length
(8 bytes)
MODALHEAD
MODALDATA
char <numeric>X2
short
long
double
Type 1
Type 2
Numeric
(gg)
typedef
struct {
short sel;
long d_cnt;
} MODALHEAD;
struct {
char addr;
char type;
union {
MODLCHAR
MODALSHORT
MODALLONG
MODALDOUBLE
Type 3
short
Numeric
(vv)
typedef
G (G gg. vv)
D/H/L/M/O/S/T
N
E/F
long
Type 4
double
2
Empty
Empty
MODALDOUBLE
MODALSHORT
8
MODALLONG
MODALDOUBLE
c;
s;
l;
d;
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;
} dat;
} MODALDAT;
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
char
Data
Fixed
length
(8 bytes)
MODALHEAD
MODALDATA
G,D,E,H,L,M,N,O,S,T,F (character)
1:
2:
3:
4:
char <numeric>X2
short
long
double
Type 1
Type 2
Numeric
(gg)
G (G gg. vv)
D/H/L/M/O/S/T
N
E/F
Type 3
long
Numeric
(vv)
Type 4
double
2
Empty
4
MODALDOUBLE
MODALSHORT
8
MODALLONG
MODALDOUBLE
Return value
: =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
Outline
33)Function
: D_actualspeed Reads actual speed.
Calling format : short D_actualspeed (char ch_no,
short axis, double *data)
: char ch_no
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.
= FFFF
= FFF0
Outline
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
Channel number (0 to 3)
<numeric value>
short select
Axis specification
<numeric value>
(Turns on bits corresponding to axes or general
input.)
Bit 14 13 12 11 10 9
8 7
0
Fiest axis/general input 1
Second axis/general input 2
15th axis
double *data
Type 2
General input 1
double
General input 2
General input 6
Data
Type 3
First-axis data
double
double
Second-axis data
double
double
15th-axis data
double
Return value
double
: =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
Return value
Outline
36)Function
: D_status Reads status information.
Calling format : short D_status (char ch_no, ushort
*status, ushort *alarm)
: char ch_no
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
= FFFF
= FFF0
Arguments
Channel number (0 to 3)
<numeric value>
char buf_no
<numeric value>
uchar *message
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>
long addr
B61992E/02
4. FUNCTION SPECIFICATIONS
short length
Return value
PMC data
uchar
PMC data
uchar
PMC data
uchar
: =0
= FFFF
= FFF0
Others
Outline
max. 32
Normal
Communication error
Sequence error
See Appendix F.
39)Function
: D_PMCdata_w
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
(char ch_no, char *prg_no)
: char ch_no
Arguments
Channel number (0 to 3)
<numeric value>
char *prg_no
Return value
Outline
Arguments
: char ch_no
Channel number (0 to 3)
<numeric value>
char *prg_no
Return value
Outline
98
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>
Return value : = 0
Normal
= FFFF Communication error
= FFF0 Sequence error
Others See Appendix F.
Outline
: Directs the CNC to reset the system.
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)
<numeric value>
uchar *name
Return value
Outline
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>
(sys_table)
Return value
Outline
99
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
100
B61992E/02
5. EXAMPLE OF USING
THE COMMUNICATION
PROGRAM
LIST 51
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
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
/****************************************/
/* Example of coding */
/****************************************/
#include<stdio.h>
#includednc2def.h
main( );
main( )
{
short ans;
sys_table.port [0].speed = 4;
/*
systable.port [0].parity = 1;
/*
ans = D_initial (0);
/*
if (ans ! = 0) {
printf (Initialization error \n)
exit(l);
}
101
6. ERROR CODES
ERROR CODES
102
B61992E/02
B61992E/02
6.1
VALUES RETURNED
BY FUNCTIONS
6.2
COMMUNICATION
ERROR
INFORMATION
6. ERROR CODES
1
2
3
4
:
:
:
:
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
103
B61992E/02
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.
To use the logging function, set the appropriate log ON/OFF switch of
system parameter to 1 : ON.
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
B61992E/02
7.1
DETAILS OF THE
ERROR LOG FILE
Current pointer
short
Buffer size
short
Log data
Month
Day
char [ 2]
Hours
char [ 2]
Minutes
char [ 2]
Seconds
char [ 2]
Send command
character string
Error response
character string
LOGHD
char [ 4]
char [ 4]
LOGSEQ
short
Buffer size
short
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]
char [ 1]
LOGTRACE
*1 Communication type
1: Send
2: Receive
LOGHD
short
Buffer size
short
Log data
LOGHD
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
time
20:24:53
20:26:02
Time
Number
send
recv
<PRPM> <M NR>
<PTPA> <T BD>
Send command character string
Error response character string
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
Event number
Transferrer phase number
time
type error
20:24:53 <1: 11>
20:26:02 <2: 21>
14:54:31 <1: 11>
Time
108
:
:
:
:
:
:
Timeout
Line disconnected
Overrun
Framing error
Parity error
ISO code parity error
APPENDIX
B61992E/02
APPENDIX
CONNECTOR SPECIFICATIONS
111
A. CONNECTOR SPECIFICATIONS
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
4
11
18
DR
19
CS
5
12
6
13
20
RS
SG
(2) RS-422
(a) M77 (in the CNC cabinet)
MR-20RMD (male)
14
CS
SD
*SD
TR
*TR
RS
*RS
SG
8
15
*CS
9
16
10
RD
11
*RD
12
RR
13
*RR
17
18
19
20
H20.F
Cable 2
Host computer
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
B61992E/02
A.2
FANUC Series 15A
A. CONNECTOR SPECIFICATIONS
APPENDIX
(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
18
DR
ER
12
19
CS
6
13
20
RS
(2) RS-422
CD3 (in the CNC cabinet)
MR-20RM (male)
14
15
CS
8
TT
*TT
*CS
16
10
RD
11
*RD
12
RR
13
*RR
17
18
19
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
10 (+24V)
20
11
(DBM25S)
14
15
16
17
18
19
20 ER
21
22
29
24
12
25
13
CNC
Output
SD
SD
Input
RD
RD
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.
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)
10
20
11 DM
10 (+24V)
20
21
SD
12 TR
(DBM25S)
13
22 *SD
23
24 *RD
25 *RS
26 *RT
27 *CS
28
29 *DM
30 *TR
31
32
14
33
15
34
16
17 TT
18
19 SG
35 *TT
36
37
CNC
Output
SD
SD
Input
RD
RD
RS
RS
CS
CS
TR
TR
DM
DM
TT
TT
RT
RT
SG
SG
FG
FG
0V
Ground
115
B. PARAMETERS
APPENDIX
B61992E/02
PARAMETERS
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
#7
#6
0055
#5
#4
#3
RS42
#2
RS42
117
#1
#0
B. PARAMETERS
APPENDIX
0251
B61992E/02
Baud rate
0251
0365
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
0320
0321
B. PARAMETERS
APPENDIX
B61992E/02
#6
#7
#5
#4
0396
ERCODE
#3
#2
NCKER
ERCODE
NCKER
#1
#0
NCKBCC
NCKBCC
0490
STX
2 bytes
119
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
0021
0022
0023
#6
5000
#5
#4
NCKCD
#3
#2
#1
PARTY
#0
RB422
5070
Minimum baud rate that causes the reception lock pulse to be supplied
from the host
120
B. PARAMETERS
APPENDIX
B61992E/02
5072
5082
5083
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
5050
B. PARAMETERS
APPENDIX
5054
B61992E/02
STX
2 bytes
#7
#6
5056
Command
Data section
4 bytes
80 to 256 bytes
#5
#4
PCDAT
#3
ERCODE
DLE
ETX
BCC
3 bytes
#2
NCKER
#1
#0
NCKBCC
122
B. PARAMETERS
APPENDIX
B61992E/02
B.3
FANUC Series
16/18/21
0020
#6
#5
#4
#3
ASI
#2
#1
#0
SB2
#4
NCD
#3
#2
#1
PRY
#0
0131
#7
#6
0134
#5
CLK
#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
Baud rate
0143
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
Timeout value of the timer used to check for a response from the host
Timeout value of the timer used to check for the EOT signal from the host
B. PARAMETERS
APPENDIX
B61992E/02
0148
Maximum number of characters that can be received after send stop processing (CS off)
STX
2 bytes
125
Command
Data section
4 bytes
80 to 256 bytes
DLE
ETX
3 bytes
BCC
C
Event
Matrix state
APPENDIX
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
same to E
to IDLE
state
same to E
same to E
same to D
same to D
wait
DLE
state
(DLE0)
wait
F0G
state
wait
DLE
state
(DLE1)
wait
1
state
HOST
to wait
ENQ
CNC
send
ENQ
HOST
to wait
ENQ
retry
over
send
ENQ
Na
0
retry
over
send
ENQ
Nb
0
Matrix state
retry
over
send
ENQ
retry
over
send
ENQ
retry
over
0
Trns req.
Trns end
Received
ENQ
send
DLE0
wait
STX
state
send
DLE0
wait
DLE
state
(DLE ETX)
wait
ETX
state
10
wait
BCC
state
11
same to C
to wait
1
Na
retry
over
Nc
0
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
same to C
6
same to C
Recv.
DLE
same to D
Nb
1
Ta : No response timer
Tb : EOT timer
Recv.
ETX
Recv.
BCC
Recv.
EOT
Recv.
ELSE
Time Out
retry
over
Na
0
to STX
wait
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
0
send
EOT
ENQ
12
Na
0
wait
DLE
state
(DLE STX)
wait
EOT
state
retry
over
start transmitt
Na, Nb, Nc=0
Nb
0
A, B : Process
m, n: Matrix state number to be changed
retry
over
Time Out
to wait
0
to DLE wait
Event
R
E
C
E
I
V
I
N
G
retry
over
Nb
Nb
0
CNC
send
ENQ
Received
ELSE
Received
NAK
send ENQ
wait ENQ
state
(Host only)
transmitting
state
Received
1
Trns end
Received ENQ
Received
0
Trns req.
IDLE state
T
R
A
N
S
M
I
T
T
I
N
G
B61992E/02
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
Event Receive
req.
Matrix
state
Received
PT**/LIPM
Received
T NB
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
T BD send
0
T BD
send
R **/
DIPM
send
T FD
send
T BD
send
same to B
0
M RT wait
T BD
send
same to B
0
R ** wait
T BD
send
same to B
same to B
T NB
send
Recv.
M RT
Recv.
T FD
Recv.
else
CNC
reset
Datalink
error
No
operation
T BD send
No operation
0
T BD
send
same to B
to
IDLE
to
IDLE
T BD
send
to
IDLE
same to B
to
IDLE
to
IDLE
to
IDLE
to
IDLE
to
IDLE
same to B
Recv.
M RR
to
IDLE
same to B
to
IDLE
Recv.
T BD
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
A, B : Process
m, n: Matrix state number to be changed
2. PR** type
Event
Matrix
state
IDLE state
Send
req.
PT**/LIPM
T NB
R **
M OK
M NR
T NP
T BD
M RR
M RT
T FD
else
CNC
reset
Datalink
error
PR **
send
M PR
send
M NR
M NP
send
R ** wait
T BD
send
M RR wait
T BD
send
T BD send
0
same to B
M OK wait
T BD
send
R **
send
T FD
send
T BD
send
0
same to B
to
IDLE
same to B
0
T NB wait
T NB
send
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
Event
Matrix
state
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
Event
Send
Req.
A
IDLE state
M OK wait
R ** /
M **
send
M OK
send
M NR
M NP
send
0
T BD
CNC
reset
Datalink
error
T BD send
No
operation
T BD
send
T BD
send
normal
to
IDLE
normal
to
IDLE
to
IDLE
same to B
128
else
T BD send
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
same to B
same to B
No operation
0
T BD
send
to
IDLE
T BD
send
to
IDLE
APPENDIX
B61992E/02
ALARM MESSAGES
129
E. ALARM MESSAGES
E. ALARM MESSAGES
APPENDIX
E.1
B61992E/02
Series 0
Code
Message
Description
BP/S 071
BP/S 073
BP/S 086
Remark
Note
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
Series 15
Code
Message
Description
Remark
SR 960
Note
SR 970
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.
130
B61992E/02
APPENDIX
Error code
Remark
FEBAH046H
T_ER
FFB9H047H
M_BD
M_NR
FFCEH032H
FFCDH033H
N_NR
FFCCH034H
M_NR
FFCBH035H
M_NR
FFCAH036H
M_NR
FFC9H037H
M_NR
FFC6H03AH
T_BD
FFC5H03BH
T_BD
FF00H100H
T_BD
FDFFH201H
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
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
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
Remark
FB9DH463H
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
T_BD
FB95H46BH
Device inoperable
M_NP
FB94H46CH
M_NP
FB93H46DH
Invalid status
M_NP
FB92H46EH
Data mismatch
T_BD
FB46H4BAH
M_NP
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
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
F615H9EBH
M_NP
F614H9ECH
No option found
M_NP
F60BH9F5H
Data missing
M_NP
F606H9FAH
M_NP
F605H9FBH
M_NP
F604H9FCH
M_NP
132
APPENDIX
B61992E/02
MAINTENANCE
133
G. MAINTENANCE
G. MAINTENANCE
G.1
DESCRIPTIONS OF
INDICATION BY LEDS
(Series 15A)
G.1.1
Blinking LED
Indications
APPENDIX
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
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.
G.1.1 Errors Indicated by Blinking LEDs
No.
LED
indication
Meaning
Code
Message
f
f
f
f
No
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
F ... Off
f ... On
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.
134
G.1.2
Nonblinking LED
Indications
G. MAINTENANCE
APPENDIX
B61992E/02
When the LEDs light steadily or remain off, they indicate the state (not
abnormal state) of the remote buffer.
G.1.2 LED Indications and Their Meanings
No.
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
F
f
F
f
f
f
F
f
135
Message
G. MAINTENANCE
G.2
SYSTEM ERROR
MESSAGES
(Series 15A)
APPENDIX
B61992E/02
Incase of Series 15A, the following table lists the system error messages
related to the remote buffer.
G.2 LED Indications and Their Meanings
LED
Code
indication
Meaning
Message
F
f
f
f
f
F
f
f
f
f
f
F
136
G.3
LED INDICATORS
(Series 15B)
G. MAINTENANCE
APPENDIX
B61992E/02
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
STATUS
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.
No.
LED status
No.3
No.4
Meaning
Internal
code
Message
8F
Not
provided
8E
Provided
Fbus error
8D
Provided
On
Blink
Blink
On
Blink
Blink
Blink
Off
8C
Provided
Off
Blink
89
Provided
Blink
Off
Blink
87
88
8A
8B
Provided
Off
137
G. MAINTENANCE
G.4
SYSTEM ERROR
MESSAGES
(Series 15B)
APPENDIX
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
138
G. MAINTENANCE
APPENDIX
B61992E/02
G.5
TROUBLESHOOTING
G.5.1
MAP Log Messages
G.5.1.1
Log messages
G.5.1.2
Log message format
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
G.5.1.2 Error codes
Error
code
Details (0xssdd)
Status (ss)
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
1.
2.
3.
140
APPENDIX
B61992E/02
H
Group
p
(gg)
1
G code
Machining center Lathe (system B)
Group
p
(gg)
10
G98
G99
G98
G99
1
0
11
G50
G51
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
0
1
G22
G22
G23
G23
G93
G94
G95
G94
G95
0
1
G20
G21
G20
G21
1
0
G40
G40
G41
G42
G41
G42
1
2
G43
G44
G49
1
2
0
12
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
G66
G66.1
G67
2
0
13
G96
G97
G68
G69
1
0
14
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
15
18
Note))
141
Internal code
(vv)
G66
17
G66.1
G67
16
G code
Internal code
(vv)
G00
G01
I. COMMUNICATION PARAMETER
I. STRUCTURE
APPENDIX
B61992E/02
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 interface
[ 1]: RS-232C
Communication speed
1: 1200, 2: 2400,
[3]: 4800, 4: 9600
Data length
Parity
Stop bits
Code
SYSTBL sys_table
Communication
parameters for port 0
Communication
parameters for port 1
Communication
parameters for port 2
Communication
parameters for port 3
Maximum text data
length
Sequence error log
[ 5]
[ 5]
[ 3]
[ 5]
[ 5]
[256]
bytes
LOGDEF
Log on/off switch
Log buffer size
[ 0]: Off, 1: On
[2048] bytes
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;
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
typedef
short
short
LOGDEF;
struct
sw;
size;
J. ERROR CODES
APPENDIX
B61992E/02
ERROR CODES
Name
0FFFFh
Communication error
Description
0FFFEh
0FFFDh
0FFFCh
0FFF0h
Sequence error
0FFFBh
0FFFAh
0FFF9h
0FFF1h
0FFEFh
0FFEEh
0FFEDh
0FFEB
144
B61992E/02
APPENDIX
DEMONSTRATION PROGRAM
145
K. DEMONSTRATION PROGRAM
K. DEMONSTRATION PROGRAM
K.1
OUTLINE OF
FUNCTIONS
APPENDIX
B61992E/02
146
APPENDIX
B61992E/02
K. DEMONSTRATION PROGRAM
K.2
PREPARATION
K.2.1
Files
Copy the following files and the communication program library to the
directory where you are going to compile the program.
No.
File
Outline of function
DEMO_MAN.C
D2_DEMO.C
D2_UTL98.C
D2_UTIBM.C
D2DTGLB.C
D2DTEXT.H
D2_DEMO.H
D2_GLB.H
D2_PRT.H
10
DNC2DEF.H
11
DNC2SYS.CFG
K.2.2
Compiling and Linking
Programs
(1) Preparation
Set up environment variables while referring to setting of
environment variables described in III3.3.
(2) Compiling and linking
The communication program library contains makefiles for
MAKE.EXE supplied together with the MS-C compiler. Compile
your program using a makefile designed for your computer.
Makefile for IBM PC
: IBM_DEMO.MAK
Makefile for NEC PC-98 : 98_DEMO.MAK
Makefile for Fujitsu FMR : FMR_DEMO.MAK
For the IBM PC, enter:
C>MAKE IBM_DEMO.MAK
An executable file will be generated automatically.
The executable file names are:
DEMOIBM.EXE for IBM PC
DEMO98.EXE for NEC PC-98
DEMOFMR.EXE for Fujitsu FMR
147
K. DEMONSTRATION PROGRAM
K.2.3
Setting the
Communication
Parameters
APPENDIX
B61992E/02
B61992E/02
APPENDIX
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).
(3) How to set up log conditions
To change log conditions, modify values set in the log setting section.
log sequence error : Sequence error log
See the descriptions below for how to set the
parameters.
log protocol error : Protocol error log
See the descriptions below for how to set the
parameters.
log phase trace
: Phase trace log
See the descriptions below for how to set the
parameters.
log communication error : Communication error log
See the descriptions below for how to
set the parameters.
switch=0 : Specifies by number whether to turn the log switch on
or off.
0 : Not logging
1 : Logging
Number 0 disables logging.
Number 1 enables logging.
This is an option for program debugging.
It should not be used for other purposes.
buff size=2048
: Specifies the maximum log file size in bytes.
149
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.3
OVERVIEW OF
OPERATIONS
K.3.1
Starting and Exiting
the Demonstration
Program
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
K.3.2
Commands
No.
Command
Registers a program.
Edit program
Delete program
Start
Starts machining.
Stop
Stops machining.
Continue
Resumes machining
Upload
Uploads a program.
10
End
Ends demonstration.
150
Summary
Remark
B61992E/02
APPENDIX
K. DEMONSTRATION PROGRAM
K.3.3
Operating Procedure
Register programs
Error
related to program
registration?
Yes
Select Edit program command
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
Download program to NC
Start program
No
Program ended?
Yes
No
Repeated
a specified number
of times?
Yes
Prepare for next program
152
APPENDIX
B61992E/02
K. DEMONSTRATION PROGRAM
K.4
MENU LAYOUT
K.4.1
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
by GE FANUC LTD.
1:
program 9 :
2:
Registered-progr
am display area
3:
4:
153
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
K.4.2
Command Entry
(1) Menu
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:
2:
3:
4:
7:Upload
8:Read PMC data
9:Write PMC data
10:End
20
21
22
23
24
25
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
= 99
154
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
20
21
22
23
24
25
20
21
22
23
24
25
Edit program ? 9
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
= 99
20
21
22
23
24
25
Edit program ? 9
Sure ?(y/n)y
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
Cutting stop
Sure ?(y/n)y
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.
(8) Upload command
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
20
21
22
23
24
25
= aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
= o9999
156
K. DEMONSTRATION PROGRAM
APPENDIX
B61992E/02
20
21
22
23
24
25
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
+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, and the PMC data
will be displayed.
To resume the command entry menu, press any key.
(10)Write PMC data command
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
20
21
22
23
24
25
20
21
22
23
24
25
= 999999
= 99
number
+0 +1
999999 : 99 99
999999 : 99 99
Sure ?(y/n) y
+2
99
99
+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.
(11) End command
1
2
3
4
5
6
7
8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
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
Machining Menu
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.
(2)
:
:
:
:
:
(3)
o (4)
(5) / (6)
(7)
(8)
(9)
3:
cutting rate
0%
100%
4:
(10)
Cutting now
(16)
158
APPENDIX
B61992E/02
Byte
address
Specified
address
PMC
ADDRESS
BIT
ADDRESS
C000
G511
0 41FFE000
511 41FFE1FF
G0000.0
G0511.7
0
4095
F000
F319
512 41FFE200
831 41FFE33F
F0000.0
F0319.7
4096
6655
Y000
Y127
1024 41FFE400
1151 41FFE47F
Y0000.0
Y0127.7
8192
9215
X000
X127
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
159
APPENDIX
160
B61992E/02
B61992E/02
M.1
OUTLINE
APPENDIX
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
WHEAD
(2)
(3)
CNC
(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.
(3) Using these DNC2 functions, the host computer reads and writes
toolpostdependent data.
162
M.3
APPENDIX
B61992E/02
An outlined flow for writing data to tool posts 1 and 2 is shown below.
EXAMPLE
D_PMCdata_w
D_PMCdata_r
No
Is DI signal WHEAD low?
D_variable_w_mem
D_PMCdata_w
D_PMCdata_r
No
Is DI signal WHEAD high?
Yes
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
PARAMETERS
#7
#6
2004
#5
#4
DIHD
#3
#2
#1
#0
164
B61992E/02
APPENDIX
M.5
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.
165
APPENDIX
166
B61992E/02
B61992E/02
N.1
COMMUNICATION
OPERATION SCREEN
APPENDIX
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
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
12:34:53
][
][ (OPRT) ]
167
N.2
COMMUNICATION
SERVICE SCREEN
APPENDIX
B61992E/02
O0001 N00000
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
12:34:53
][
][ (OPRT) ]
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
B61992E/02
APPENDIX
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
00002000
REMOTE REQUEST TIME OUT
00002000
>_
MDI STOP *** ***
[ COPER ][ CSERV ][
12:34:53
][
][ (OPRT) ]
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) Status notification enabled
This parameter determines whether the host is notified when the CNC
status changes.
Notification of changes in signal status (rise and fall) can be enabled
or disabled.
Bit
0 : Rewind (RWD)
1 : Alarm (AL)
2 : Reset (RST)
3 : Automatic operation stopped (SPL)
4 : Automatic operation being started (STL)
5 : Automatic operation in progress (OP)
6 : Servo ready (SA)
7 : CNC ready (MA)
8 : Unused
9 : Unused
10: Unused
11: Unused
12: M00 output (M00)
13: M01 output (M01)
14: M02 output (M02)
15: M30 output (M30)
169
APPENDIX
B61992E/02
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
i)
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]
[E]
[C]
Code, 30
Example, 163
Commands, 150
Executing a Program, 57
Communication Mode, 13
Communication Operation Screen, 167
[F]
Communication Speed, 13
Compilation and Linking, 68
Configuration, 7, 64
Connection, 165
Files, 147
Format, 29
Continuation, 30
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]
Maintenance, 133
Receiving a Datagram, 22
Message Format, 20
Reset, 58
RS232C Interface, 14
RS422 Interface, 16
[N]
[S]
Negative Acknowledgment, 59
Nonblinking LED Indications, 135
Sending a Datagram, 21
Notes, 71
Series 0, 130
Series 15, 120, 130
Service Functions Specified with Datagram Commands, 27
[O]
Operating Procedure, 151
Servo Delay, 36
Operator Messages, 53
Supplied Programs, 66
Switching of Target Tool Post for Input/Output by the
Host Computer, 162
[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]
i3
Oct., 97
Nov., 91
Date
02
01
Edition
Contents
Edition
Date
Revision Record
Contents