61992e DNC 2 Descriptions Manual
61992e DNC 2 Descriptions Manual
61992e DNC 2 Descriptions Manual
DNC 2
Descriptions Manual
Warning
Warning notices are used in this publication to emphasize that hazardous voltages, currents,
temperatures, or other conditions that could cause personal injury exist in this equipment or
may be associated with its use.
In situations where inattention could cause either personal injury or damage to equipment, a
Warning notice is used.
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.
2. CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
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 MAXIMUM CABLE LENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.6 RS–232–C INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.7 RS–422 INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4. APPLICATION LAYER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1 FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2 DATAGRAM SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.1 Configuration of Datagram Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.2 Service Functions Specified with Datagram Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2.3 Notation of the Datagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3.1 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3.2 Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3.3 Data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.3.4 Delimiter in the data section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.3.5 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.3.6 Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.4 Details of the Data Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2.4.1 Downloading a part program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2.4.2 Uploading a part program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2.4.3 Deleting a part program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.4.4 Reading the directory of part programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
c–1
Table of Contents B–61992E/02
2. CONFIGURATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3. INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.1 SUPPLIED PROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.2 INSTALLATION PROCEDURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.3 COMPILATION AND LINKING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
c–2
B–61992E/02
4. FUNCTION SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.1 USE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.2 NOTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.3 FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.4 DETAILS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
APPENDIX
A. CONNECTOR SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.1 FANUC Series 0 (A02B–0098–J055) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
A.2 FANUC Series 15–A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
A.3 FANUC Series 15–B AND Series 16/18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
B. PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
B.1 FANUC Series 0 (UPPER ROW: Series 0–TC, LOWER ROW: Series 0–MC) . . . . . . . . . . . . . . . . . 117
B.2 Series 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
B.3 FANUC Series 16/18/21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
G. MAINTENANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
G.1 DESCRIPTIONS OF INDICATION BY LEDS (Series 15–A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
G.1.1 Blinking LED Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
G.1.2 Nonblinking LED Indications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
G.2 SYSTEM ERROR MESSAGES (Series 15–A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
G.3 LED INDICATORS (Series 15–B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
G.4 SYSTEM ERROR MESSAGES (Series 15–B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
c–3
Table of Contents B–61992E/02
L. PMC ADDRESS
(Series 15–A AND ADDRESS SPECIFICATION TYPE OF Series 15–B) . . . . . 159
c–4
I. GENERAL
B–61992E/02 I. GENERAL 1. GENERAL
1 GENERAL
3
1. GENERAL I. GENERAL B–61992E/02
User
CNC control program application program
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.
4
B–61992E/02 I. GENERAL 1. 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 Service function
Downloading a part program Writing CNC CNC parameter
d t
data
Uploading a part program Pitch error compensation
Deleting a part program Tool offset
Reading the directory of part programs Custom macro variable
Reading information on a free area Displaying an operator message
Reading Machine position Reading PMC data
d t
CNC data
Absolute position Writing PMC data
Skip position Memory opera- Selecting a program
ti control
tion t l
Servo delay Start
Acceleration/deceleration DNC operation control
delay
Machine interface signal Reset
status
Current program No. Alarm notification
Current sequence No. Report on change in the internal status of the
CNC
CNC parameter Providing information on CNC system identifi-
cation
Pitch error compensation
Tool offset
Custom macro variable
Tool life management data
Modal data for automatic
operation
Actual speed
A/D conversion data
Alarm information
Status information
5
1. GENERAL I. GENERAL B–61992E/02
6
B–61992E/02 I. GENERAL 2. CONFIGURATION
2 CONFIGURATION
DNC2 ROM
Host computer
DNC2
communication
program library
7
II. PROTOCOL
B–61992E/02 II. PROTOCOL 1. LAYERS
1 LAYERS
Host computer
FANUC CNC or
personal computer
RS-232-C/RS-422
11
2. PHYSICAL LAYER II. PROTOCOL B–61992E/02
2 PHYSICAL LAYER
12
B–61992E/02 II. PROTOCOL 2. PHYSICAL LAYER
0
0 1 0 0 1 0 1 0 1
2.4
(1) RS-232-C : 19200 bps max.
COMMUNICATION
(2) RS-422 : 86400 bps max.
SPEED When the communication speed to be used is 38400 bps or more,
synchronization with a receive clock is required. Prepare the TT
(*TT) and RT (*RT) signals.
2.5
(1) RS-232-C : 100m (for 4800 bps or less)
MAXIMUM CABLE 50m (9600 bps or more)
LENGTH (2) RS-422 : 800m (9600 bps or less)
50m (19200 bps or more)
13
2. PHYSICAL LAYER II. PROTOCOL B–61992E/02
2.6
(1) Connection between devices
RS–232–C
INTERFACE CNC unit Host computer
SD SD
RD RD
RS RS
CS CS
ER ER
DR DR
CD CD
SG SG
FG FG
NOTE
When using IBM PC–AT, connect RS and CS in the CNC.
(IBM PC–AT is a registered trademark of IBM Corporation.)
14
B–61992E/02 II. PROTOCOL 2. PHYSICAL LAYER
(2) Signals
RS-232-C Input/
Name Description
circuit No. output
SD 103 Output Send data See Section 2.2 for the bit con-
fi
figuration.
ti
RD 104 Input Receive 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 Data set ready
When this signal is on, the host computer is
assumed to be ready.
The signal is generally connected to the ER
signal at the host computer. When it is off dur-
ing data transmission, an alarm is issued. If
this signal is not used, be sure to connect it with
the ER signal at the CNC unit.
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 dur-
ing 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 Signal quality detection
Since this signal is not used for connecting the
CNC unit with the host computer, connect it
with the ER signal at the CNC unit.
SG 102 Signal ground
FG 101 Protective ground
NOTE
The on and off states of each signal conform to the
following:
Less than –3V +3V or more
Function Off On
Signal condition Marking Spacing
15
2. PHYSICAL LAYER II. PROTOCOL B–61992E/02
2.7
(1) Connection between devices
RS–422 INTERFACE
CNC unit 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
16
B–61992E/02 II. PROTOCOL 2. PHYSICAL LAYER
(2) Signals
RS-422 Input/
Name Description
circuit No. output
SD 103 Output Send data See Section 3.2 for the bit con-
fi
figuration.
ti
RD 104 Input Receive 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 dur-
ing 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
NOTE
The on and off states of each signal conform to the
following:
A<B A>B
Function Off On
Signal condition Marking Spacing
Sending terminal
Receiving terminal
17
3. DATA LINK LAYER II. PROTOCOL B–61992E/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
B–61992E/02 II. PROTOCOL 3. DATA LINK LAYER
19
3. DATA LINK LAYER II. PROTOCOL B–61992E/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
B–61992E/02 II. PROTOCOL 3. DATA LINK LAYER
3.4
DATA LINK
PROTOCOL
3.4.1 The master device that needs to send the datagram establishes the data
Establishing a Data link.
Link
DLE1 EOT
Timeout
ENQ
NAK (A)
Other
Error
(Note) The underlined characters indicate the response from the receiving (slave) device.
3.4.2
Sending a Datagram
NAK/DLE0
Other ENQ
Timeout
Error
(Note) The underlined characters indicate the response from the receiving (slave) device.
21
3. DATA LINK LAYER II. PROTOCOL B–61992E/02
3.4.3
Receiving a Datagram
(A) ENQ DLE0 DLE STX .. DLE ETX BCC DLE1 EOT (A)
NAK Error
ENQ
Timeout
Other
Error
(Note) The underlined characters indicate the response from the sending (master) device.
22
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4 APPLICATION LAYER
This chapter outlines the application layer. For more details, see the
description given later.
23
4. APPLICATION LAYER II. PROTOCOL B–61992E/02
24
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2 The datagram consists of the command section and the omissible data
section. The command section contains four characters. The data section
DATAGRAM SYNTAX 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 B–61992E/02
4.2.1
Configuration of
Datagram Commands
Table 4.2.1 Configuration of datagram commands
Fist entry
A Listing catalog DI
B Catalog request LI
C Clear MC
D Operation mode M
E Receive R
F Transmit T
G Prepare to send PT
H Prepare to receive PR
Second entry A B C D E F G H
NOTE
h/ : Command from the host to the CNC
/c : Command from the CNC to the host
Blank : Space character in ASCII or ISO code
: Command modified or added by FANUC
26
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.2
Service Functions (1) Commands from the host
Specified with Service function Datagram command
Datagram Commands 1 Downloading <PR><PM><nn>
2 Uploading <PT><PM><nn>
3 Deleting a program <MC><PM><nn>
4 Directory information <LI><PM> [<nn>]
5 Free area size <T ><FR>
6 Reading a tool position <T ><WP | MP | SP> [<0Xmm>]
7 Reading servo delay <T ><SE> [<0Xmm>]
8 Reading acceleration/de- <T ><AE> [<0Xmm>]
celeration delay
9 Reading a machine inter- <T ><MI><nn>[<:><mm> ]
face signal
10 Reading a program or <T ><PN | SN>
sequence number
11 Reading a CNC parame- <PT><PA><nn> [<,><0Xmm> ]
ter
12 Writing a CNC parameter <PR><PA>
13 Reading pitch error com- <PT><PE><mm> [<:><nn> ]
pensation
14 Writing pitch error com- <PR><PE>
pensation
15 Reading a tool offset <PT><TO><mm> [<:><n>] <,><0Xkk>
16 Writing a tool offset <PR><TO>
17 Reading a macro vari- <PT><MV><mm> [<:><nn> ]
able
18 Writing a macro variable <PR><MV>
19 Reading tool life man- <PT><TL><mm> [<:><nn> ]
agement data
20 Reading modal informa- <T ><MD><mm>
tion for automatic opera-
tion
21 Reading an actual speed <T ><AF><0Xmm>
22 Reading A/D conversion <T ><AD><nn> [ [<,><0Xmm> ] <,><nn> [<,><0Xmm> ] ]
data
23 Reading alarm informa- <T ><AL>
tion
24 Reading status informa- <T ><ST> | <M ><ST> [<0Xmm>]
tion
25 Displaying an operator <M ><DI><nn><,><display message text>
message
26 Reading PMC data <PT><PD><0Xaa | mm><,><nn>
27 Writing PMC data <PR><PD>
28 Selecting a program <M ><SL><nn>
29 Executing a program <M ><CS> [<nn>]
30 Resetting the CNC <M ><CC>
31 Reading a system ID <T ><ID>
NOTE
With the Series 15–TTA/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 B–61992E/02
NOTE
The service functions marked with an asterisk (*) are not
supported.
28
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.3
Notation of the
Datagram
4.2.3.2
Format
Command section Data section
29
4. APPLICATION LAYER II. PROTOCOL B–61992E/02
4.2.3.4 Only a comma (,) and colon (:) can be used as a delimiter. A space is
Delimiter in the data ignored except when it is used for character–type data.
section The end of the data section is assumed to be a delimiter.
4.2.3.5 ASCII or ISO code is available. The code to be used in the datagram is
Code specified by the CNC parameter.
4.2.3.6 The data section can be continued only for the datagram of the response
Continuation 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.Y–1> “G01X100.Y–123.4Z50.0F200;”
<R ><PM><23.4Z50.0F200;>
Incorrect)
<R ><TO><N10D15H5N11D16> “N11D16H6” cannot be divided when it
<R ><TO><H6N12D17H7> is transmitted.
“N– D– H–” is a group data item.
30
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4
Details of the Data
Section
4.2.4.1
Downloading a part (1) Function
program 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>
<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 : Program number (UI: 4)
Only a program can be uploaded using this parameter.
2) program: Program statement (CH: 256)
This statement is in the tape output format.
The program consists of the following:
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 B–61992E/02
4.2.4.2
Uploading a part (1) Function
1) This command transfers a part program from the CNC according
program
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>
<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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
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 B–61992E/02
4.2.4.4
Reading the directory of (1) Function
This command reads the directory of part programs in memory.
part programs
(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 (1) Function
This command issues a request from the host computer to the CNC
memory 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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
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> : Absolute coordinate position
<T><MP> : Machine coordinate position
<T><SP> : Skip signal detection position
(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 8 7 6 5 4 3 2 1 0
1st axis
2nd axis
15th axis
Not used
35
4. APPLICATION LAYER II. PROTOCOL B–61992E/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 8 7 6 5 4 3 2 1 0
1st axis
2nd axis
15th axis
Not used
36
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.8
Acceleration/ (1) Function
This command reads the current acceleration/deceleration delay.
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 8 7 6 5 4 3 2 1 0
1st axis
2nd axis
15th axis
Not used
37
4. APPLICATION LAYER II. PROTOCOL B–61992E/02
4.2.4.9
Machine interface (1) Function
signals This command reads the machine interface signals (DI/DO) specified
with diagnosis numbers.
(For Series 15 only)
(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 (1) Function
and sequence number 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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.11
Reading a CNC (1) Function
This command reads a CNC parameter.
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 B–61992E/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 write–protected 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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.13
Reading pitch error (1) Function
This command reads pitch error compensation data.
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 B–61992E/02
4.2.4.14
Writing pitch error (1) Function
This command writes pitch error compensation.
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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
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 :Wear offset D: Cutter compensation
1 :Geometry offset K: Cutter compensation
2 :Wear offset X: Offset along the X axis
3 :Wear offset Z: Offset along the Z axis
4 :Wear offset R: Tool tip radius compensation
5 :Wear offset Y: Offset along the Y axis
6 :Virtual tool tip direction : Q
7 :Not used
8 :Wear offset H: Tool length offset
9 :Geometry offset L: Tool length offset
10 :Geometry offset U: Offset along the X axis
11 :Geometry offset W: Offset along the Z axis
12 :Geometry offset P: Tool tip radius compensation
13 :Geometry offset V: Offset along the Y axis
14 :Not used
15 :Not used
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 B–61992E/02
Request flag 15 14 12 12 11 10 9 8 7 6 5 4 3 2 1 0
– – V P W U L H – Q Y R Z X K D
Memory
Model type – – T M T M
b – – – – – – –
T
o – – –
Series0
b – – – – – –
M
o – – – – – –
A – – – – – – –
T
B – – –
Series15 A – – –
M B – – –
C – – –
b – – – – – – –
T
Series o – – –
16/18/21 b – – –
M
o – – –
– : Ignored b : Standard
: Specifiable o : Option
: Not specifiable
44
B–61992E/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 (1) Function
This command reads custom macro variables.
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 B–61992E/02
4.2.4.18
Writing a custom macro (1) Function
This command writes a value in the specified custom macro variable.
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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.19
Reading tool life (1) Function
This command reads tool life management data with the specified
management data 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 : First tool group number to be read (UI:4)
2) nn : Last tool group number to be read (UI:4 / mm < nn)
3) Pnn : nn is the tool group number. (UI:4)
4) Lnn : Tool life value (minutes or times) (UI:10)
5) Qnn : Qnn: nn is the life count value of the tool currently being
used. (UI: 5) The unit is the number of times the tool has
been used or the total usage time (in minutes), one of
which is specified with a parameter of the CNC.
6) Ttt : Tool number (UI:4)
7) Hhh : H code (UI:4)
8) Ddd : D code (UI:4)
9) Ccc : Tool information (UI:1/0 to 3)
0 : Currently selected tool
1 : The tool is already registered.
2 : The tool is already exhausted.
3 : The tool was skipped.
(4) Negative acknowledgment
M_NR [0XFFCA] :
Group number nn is not yet defined, or no option is found.
(5) Note
If the tool life management data cannot be transmitted with one
datagram, the datagram is divided into multiple parts. The data is then
transmitted using multiple datagrams having the same group number
P, the same tool life L, and the same tool life count type Q.
<T ><NB>
<R ><TL>{<Pnn><<Lvv>[<Qnn>][<Ttt><Hhh><Ddd><Ccc>]..}..
<T ><NB>
<R ><TL>{<Pnn><<Lvv>[<Qnn>][<Ttt><Hhh><Ddd><Ccc>]..}..
.
.
47
4. APPLICATION LAYER II. PROTOCOL B–61992E/02
4.2.4.20
Reading modal (1) Function
This command reads the previous, current, or next modal data.
information for
automatic operation (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 : UI:4
Mmm : UI:3
Nnn : UI:5
Ooo | Sss | Ttt : UI:4
Eee | Fff : UR:9
(4) Negative acknowledgment
None
(5) Note
If no modal data is specified, only the <R ><MD > command is
transmitted, and the data section is omitted.
For internal G code values, see the table in Appendix H.
48
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.21
Reading an actual (1) Function
This command reads the feedrate of each axis or the composite
feedrate feedrate of all axes.
(2) Datagram transmission
Host CNC
<T ><AF> [<0Xmm>]
<R ><AF><vv> [ <,><vv>..]
<M ><OK>
(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 (1) Function
This command reads A/D conversion data.
data (2) Datagram transmission
Host CNC
<T ><AD><nn> [<,><0Xmm>]
[<,><nn>[<,><0Xmm>]]..
<R ><AD><vv> [<,><vv>] ..
<M ><OK>
(3) Parameters
1) nn : A/D conversion data selection (UI:3)
0 to 1 : General-purpose analog input (Series 15)
0 to 3 : General-purpose analog input (Series 0)
100 : Voltage to which the analog input value of the load
current for the 1st spindle is onverted
101 : Voltage to which the analog input value of the load
current for the 2nd spindle is converted
200 : Voltage to which the load current for an NC control
axis is converted.
The 2nd parameter, 0Xmm, is required for this case.
2) mm: Axis request flag (HX:4)
For the function of this parameter, see item (3) in
Subsection 4.2.4.8.
3) vv : Read voltage obtained by conversion (SI:10)
10 * (voltage ] 128)/128 volts
(4) 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 B–61992E/02
4.2.4.23
Reading alarm (1) Function
This command reads alarm information.
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
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.2.4.24
Reading status (1) Function
information This command reads status information.
(2) Datagram transmission
1) Request from the host computer
Host CNC
<T ><ST>
<R ><ST><0Xss> [<,><0Xaa>]
<M ><OK>
<R ><ST><0Xss>
<M ><OK>
(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 B–61992E/02
Download
Automatic
notification
←Information of this
Status status change is
change not posted.
52
B–61992E/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.
53
4. APPLICATION LAYER II. PROTOCOL B–61992E/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 : PMC address (HX: 8) (applicable to the Series 15
PMC–NA only (address specification type))
The address is specified with eight hexadecimal
characters by prefixing 0X41 to the 6–digit physical
address, given in the list of relationships between
PMC addresses and physical addresses in Section
3.3.2 of the “FANUC PMC–MODEL N
Programming Manual” (B–61013E–2).
Example: For F000, specify 0X41FFE200.
mm : PMC data number (UI:4) (applicable to the Series 0
only (data number specification type))
Refer to “FANUC Series 0–MC Connection
Manual”(B–61393E) and “FANUC PMC MODEL –
K/L/M Programming Manual”(B–55193E).
Specify the numeric part of the PMC address, which
is the PMC address less the initial alphabetic
character.
Example: For F148, specify 148.
For R700, specify 700.
ammmm : PMC data number (<a> <mmmm>) (Series 16/18,
and PMC–NA, NB, NB2 of Series 15 (data number
specification type))
a : PMC data address (UI: 1)
0A 3F 6R 9Y
1C 4G 7T
2D 5K 8X
mmmm : PMC data number (UI: 4)
Example: For D500, specify 20500.
54
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
NOTE
The PMC data number must consist of five numeric
characters if address <a> is a non–zero value.
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 : PMC address (HX: 8) (applicable to the Series 15
PMC–NA only (address specification type))
The address is specified with eight hexadecimal
characters by prefixing 0X41 to the 6–digit physical
address, given in the list of relationships between PMC
addresses and physical addresses in Section 3.3.2 of
the “FANUC PMC–MODEL N Programming
Manual” (B–61013E–2).
Example: For F000, specify 0X41FFE200.
55
4. APPLICATION LAYER II. PROTOCOL B–61992E/02
NOTE
The PMC data number must consist of five numeric
characters if address <a> is a non–zero value.
56
B–61992E/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 B–61992E/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)
“FS0–MC/FS0–TC” (Series 0)
“F16–MA/F16–TA/F18–MA/F18–TA”
(Series 16/18–A)
“F16–MB/F16–TB/F18–MB/F18–TB”
(Series 16/18–B)
“F16–MC/F16–TC/F18–MC/F18–TC”
(Series 16/18–C)
“F16i–MA/F16i–TA/F18i–MA/F18i–TA/
F21i–MA/F21i–TA” (Series 16i/18i/21i–A)
2) revision : CNC DNC2 software revision
“1.0” (Series 15)
“1.1” (Series 0/16/18/21)
(4) Negative acknowledgment
None
58
B–61992E/02 II. PROTOCOL 4. APPLICATION LAYER
4.3 This section describes the datagram protocol between the FANUC CNC
and the host computer.
DATAGRAM
PROTOCOL
4.3.1 The DNC2 has six negative acknowledgments and one interrupt
Error Handling command for handling errors.
4.3.1.1
Negative (1) Syntax
<T_BD | M_ER | M_NR | M_NP | T_NP | M_IL> [<0Xeeee>]
acknowledgment
(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 B–61992E/02
4.3.2
Interrupt Procedure
4.3.2.1 The datagram transmission procedure can generally be started in the idle
Interrupt state.
Unless both the CNC and the host terminate the current datagram
transmission procedure, they cannot start a new transmission procedure.
In other words, they cannot interrupt the datagram transmission
procedure as shown in Fig. 4.3.2.1.
Sending device Receiving device
60
III. COMMUNICATION PROGRAM
LIBRARY
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 1. OUTLINE
1 OUTLINE
63
III. COMMUNICATION PROGRAM
2. CONFIGURATION LIBRARY B–61992E/02
2 CONFIGURATION
IBM PC series
Model : PC, AT, PS/2
OS : PC–DOS Ver. 3.1 or later
Compiler: MS–C compiler Ver. 5.0 or later
Memory : The communication package library alone uses 134K
bytes of memory.
Others : Use of the demonstration program requires the CGA
interface.
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
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 3.
3 INSTALLATION
65
III. COMMUNICATION PROGRAM
3. LIBRARY B–61992E/02
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 : IBM PC series makefile
98_DEMO.MAK : NEC PC98 series makefile
FMR_DEMO.MAK : Fujitsu FMR series makefile
DNC2SYS.CFG
LOG.EXE Executable file of DNC2 communication program library error log inspection program
SRC
LOG.C Source file of error log inspection program
66
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 3.
3.2 This section explains the procedure for installing the library.
INSTALLATION 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.
PROCEDURE
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
III. COMMUNICATION PROGRAM
3. LIBRARY B–61992E/02
3.3
(1) Compiler
COMPILATION AND The object compiler is version 5.0 or a later version of the MS–C
LINKING 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”
68
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
4 FUNCTION SPECIFICATIONS
69
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
4.1 Call functions in the calling format shown in Section 4.4. If the types of
arguments agree, it does not matter whether the variable names differ.
USE
The return values of functions are always of the short type. As required,
convert them to a proper type (cast) for use.
Example) test( )
{
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
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
4.2
(1) These functions do not return until communication with the NC unit
NOTES terminates completely.
Note that downloading/uploading or other time–consuming 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 input–output 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 ] );
(7) The types of variables used in the function specifications are
described below.
char : One–byte signed integer or 7–bit character
uchar : One–byte unsigned integer or 8–bit character
short : Two–byte signed integer
ushort : Two–byte unsigned integer
long : Four–byte signed integer
double : Eight–byte signed real number
71
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
72
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
73
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
74
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
75
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
76
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
double *data
Tool position data storage buffer
77
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
78
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
79
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
Second-axis data
Free
long_14
15th-axis data
80
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
Second-axis data
Free
long_14
15th-axis data
Return value : =0
Normal
Communication error
= FFFF
Sequence error
= FFF0
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 operator’s manual.
17)Function : D_pitch_r Reads pitch error data
Calling format : short D_pitch_r
(char ch_no, short start_no, short
stop_no, uchar *file_name)
Arguments : char ch_no
Channel number (0 to 3) <numeric value>
short start_no
Start correction position number
<numeric value>
(1 to 9999)
short stop_no
Stop correction position number
<numeric value>
(0 to 9999. When 0, omit this argument.)
uchar *file_name
Name of pitch error data file
81
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
82
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
83
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
D double X double
K double Z double
H double R double
L double Y double
U double
typedef struct{ typedef struct {
double d; double x; W double
double k; double z;
double h; double r; P double
double l; double y; V double
} MEAL_OFFSET; double u;
(Milling offset) double w; Q long
double p;
double v;
double q;
} TRUN_OFFSET;
(Lathe offset)
84
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
85
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
NOTE
The offset type is specified for all write data. Be sure to input
the data specified in type.
86
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
NOTE
The offset type is specified for all write data. Be sure to input
the data specified in type.
87
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
88
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
89
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
TOOLCODE
typedef struct{ typedef struct {
short g_no; short no;
short type; short hcode;
long life; short dcode;
short d_cnt; short ccode;
} TOOLLIFE; } TOOLCODE;
90
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
TOOLCODE
91
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
Data Data type char 1: char <numeric>X2 G (G gg. vv) gg: G group code
2: short D/H/L/M/O/S/T vv: Group internal code
Data 3: long N
Fixed
4: double E/F
Data length
(8 bytes)
Type 1 Type 2 Type 3 Type 4
MODALHEAD 0 Numeric
0 0 0
MODALDATA (gg)
Numeric short long double
(vv)
2 2
92
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
0,1,2
Address char G,D,E,H,L,M,N,O,S,T,F (character)
Data Data type char 1: char <numeric>X2 G (G gg. vv) gg: G group code
2: short D/H/L/M/O/S/T vv: Group internal code
Data 3: long N
Fixed
4: double E/F
Data length
(8 bytes)
Type 1 Type 2 Type 3 Type 4
MODALHEAD 0 Numeric
0 0 0
MODALDATA (gg)
Numeric long double
(vv)
2 2
Empty
4 8
MODALDOUBLE MODALSHORT MODALLONG MODALDOUBLE
Note) For gg and vv, see Appendix A.8.
93
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
double *data
A/D conversion data storage buffer.
Data types are types 1 to 3.
Type 1 Type 2 Type 3
General input 1 double Data double First-axis data double
94
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
95
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
96
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
short length
Data length (1 to 32) <numeric value>
short status
1 : RAM address, 2 : Data number
<numeric value>
uchar *data PMC data buffer
97
III. COMMUNICATION PROGRAM
4. FUNCTION SPECIFICATIONS LIBRARY B–61992E/02
98
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 4. FUNCTION SPECIFICATIONS
99
5. EXAMPLE OF USING
5. THE COMMUNICATION III. COMMUNICATION PROGRAM
5. PROGRAM LIBRARY B–61992E/02
100
5. EXAMPLE OF USING
III. COMMUNICATION PROGRAM THE COMMUNICATION
B–61992E/02 LIBRARY PROGRAM
LIST 5–1
1 : /****************************************/
2 : /* Example of coding */
3 : /****************************************/
4 :
5 : #include<stdio.h>
6 : #include”dnc2def.h”
7 :
8 : main( );
10 : main( )
11 : {
12 : short ans;
13 :
14 : sys_table.port [0].speed = 4; /* Set communication speed to 9600 bps */
15 : sys–table.port [0].parity = 1; /* No parity bit is set */
16 : ans = D_initial (0); /* Initialize port 0 */
17 : if (ans ! = 0) { /* Is initialization successful? */
18 : printf (”Initialization error \n”) /* Initialization error */
19 : exit(l); /* Return to DOS */
20 : }
21 :
22 : ans = D_download (0, ”pr_file.dat”, ”O0001”);/*Download */
23 : if (ans == 0) { /* Check the result */
24 : printf (”Download termination \n”); /* Normal termination */
25 : } else if (ans == 0xfffe) {
26 : printf (”No file is found \n”) /* File not found */
27 : exit(l);
28 : } else if (ans == 0xfffd) {
29 : printf (”The file cannot be read \n”)/* File read error */
30 : exit(l);
31 : } else {
32 : printf (”Download failure \n”) /* Communication error, other errors */
33 : exit(l);
34 : }
35 : return 0;
36 : }
101
III. COMMUNICATION PROGRAM
6. ERROR CODES LIBRARY B–61992E/02
6 ERROR CODES
102
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 6. ERROR CODES
6.1 The return values 0FFFFh to 0FFCFh (absolute values of 1 to 49) output
from functions in this library indicate errors detected within the library.
VALUES RETURNED The return values of 0FFCEh or less (absolute values of 50 or greater)
BY FUNCTIONS indicate errors output when a negative response is sent from the CNC.
For details of the error codes of this library, see Appendix J.
103
III. COMMUNICATION PROGRAM
7. ERROR LOG INFORMATION LIBRARY B–61992E/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 input–output time
increases, affecting the time–out period. Therefore, use the logging
function carefully.
104
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 7. ERROR LOG INFORMATION
7.1
(1) Sequence error log
DETAILS OF THE When a command is sent to the NC and a response to the command
ERROR LOG FILE is not the normal sequence, the sequence data is logged.
The log file name is <sequence.log> and its contents are as shown
below.
When the appropriate log switch of the system parameter table is not
ON, logging is not performed.
Sequence error log file (file name : sequence.log)
Day char [ 2]
Hours char [ 2]
Minutes char [ 2]
Seconds char [ 2]
Send command
character string char [ 4]
Error response
LOGHD character string char [ 4]
LOGSEQ
Day char [ 2]
Hours char [ 2]
Minutes char [ 2]
Seconds char [ 2]
Communication type
(*1) char [ 1]
*1 Communication type
LOGHD Phase number char [ 1] ’1’: Send
’2’: Receive
Event number char [ 1] ’3’: Clear
Free char [ 1]
LOGPROTC
105
III. COMMUNICATION PROGRAM
7. ERROR LOG INFORMATION LIBRARY B–61992E/02
LOGTRACE
*1 Communication type
’1’: Send
LOGHD ’2’: Receive
Day char [ 2]
Hours char [ 2]
Minutes char [ 2]
*1 Communication type
’1’: Send
Seconds char [ 2] ’2’: Receive
Communication type ’3’: Clear
(*1) char [ 1]
106
III. COMMUNICATION PROGRAM
B–61992E/02 LIBRARY 7. ERROR LOG INFORMATION
107
III. COMMUNICATION PROGRAM
7. ERROR LOG INFORMATION LIBRARY B–61992E/02
108
APPENDIX
B–61992E/02 APPENDIX A. CONNECTOR SPECIFICATIONS
A CONNECTOR SPECIFICATIONS
111
A. CONNECTOR SPECIFICATIONS APPENDIX B–61992E/02
A.1
(1) RS-232-C
FANUC Series 0 M77 (in the CNC cabinet)
(A02B–0098–J055)
MR-20RMD (male)
14 1
8 RD
15 2
9 SD H20.F
16 CD 3 Cable 1
10
17 ER 4 Host computer
11
18 DR 5
12
19 CS 6
13
20 RS 7 SG
(2) RS-422
(a) M77 (in the CNC cabinet)
MR-20RMD (male)
14 CS 1 SD
8
15 *CS 2 *SD
9 H20.F
16 3 TR Cable 2
10 RD
17 4 *TR Host computer
11 *RD
18 5 RS
12 RR
19 6 *RS
13 *RR
20 7 SG
MR-20RMD (male)
14 CS 1 SD
8 TT
15 *CS 2 *SD
9 *TT H20.F
16 3 TR Cable 3
10 RD
17 4 *TR Host computer
11 *RD
18 RT 5 RS
12 RR
19 *RT 6 *RS
13 *RR
20 7 SG
112
B–61992E/02 APPENDIX A. CONNECTOR SPECIFICATIONS
A.2
(1) RS-232-C
FANUC Series 15–A CD4 (in the CNC cabinet)
MR-20RF (female)
14 +24V 1
8 RD
15 2
9 SD
16 CD 3
10
17 SG 4
11
18 DR 5 ER
12
19 CS 6
13
20 RS 7
(2) RS-422
CD3 (in the CNC cabinet)
MR-20RM (male)
14 CS 1 SD
8 TT
15 *CS 2 *SD
9 *TT
16 3 TR
10 RD
17 4 *TR
11 *RD
18 RT 5 RS
12 RR
19 *RT 6 *RS
13 *RR
20 7 SG
113
A. CONNECTOR SPECIFICATIONS APPENDIX B–61992E/02
A.3
(1) RS–232C
FANUC Series 15–B RS–232C connection signal diagram
AND Series 16/18
CNC option 1 board Host computer (example)
JD5C (PCR–EV20MDT) (DBM–25S)
1 FG
1 RD 11 SD 14
2 SD
2 0V 12 0V 15
3 RD
3 DR 13 ER 16
4 RS
4 0V 14 0V 17
5 CS
5 CS 15 RS 18
6 DR
6 0V 16 0V 19
7 SG
7 CD 17 20 ER
8 CD
8 0V 18 *RD 21
9
9 19 (+24) 22
10
10 (+24V) 20 29
11
24
12
25
13
RS RS
CS CS
ER ER
DR DR
CD CD
SG SG
FG FG
0V
Ground
NOTE
When CS is not used, connect CS and RS. When the IBM
PC–AT 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
B–61992E/02 APPENDIX A. CONNECTOR SPECIFICATIONS
(2) RS–422
RS–422 connection signal diagram
RS RS
CS CS
TR TR
DM DM
TT TT
RT RT
SG SG
FG FG
0V
Ground
115
B. PARAMETERS APPENDIX B–61992E/02
B PARAMETERS
116
B–61992E/02 APPENDIX B. PARAMETERS
B.1
FANUC Series 0
(UPPER ROW: Series
0–TC, LOWER ROW: #7 #6 #5 #4 #3 #2 #1 #0
0051 ECLK NCKCD RSASCI PARTY STP2
Series 0–MC)
ECLK NCKCD RSASCI PARTY STP2
NOTE
With the Series 0, use ASCII code.
PARTY : Parity
0 : No parity check
1 : Even parity
STP2 : Number of stop bits
0: 1
1: 2
NOTE
The data length (in bits) is determined according to what is
set in RSASCI and PARTY. If both RSASCI and PARTY are
1, the data is 7 bits long. Otherwise, it is 8 bits long.
#7 #6 #5 #4 #3 #2 #1 #0
0055 RS42
RS42
117
B. PARAMETERS APPENDIX B–61992E/02
118
B–61992E/02 APPENDIX B. PARAMETERS
#7 #6 #5 #4 #3 #2 #1 #0
0396 ERCODE NCKER NCKBCC
Packet length
119
B. PARAMETERS APPENDIX B–61992E/02
B.2
Series 15 #7 #6 #5 #4 #3 #2 #1 #0
0000 ISP
#7 #6 #5 #4 #3 #2 #1 #0
5000 NCKCD PARTY RB422
NOTE
The data length (in bits) is determined according to what is
set in RSASCI and PARTY. If both RSASCI and PARTY are
1, the data is 7 bits long. Otherwise, it is 8 bits long.
5070 Minimum baud rate that causes the reception lock pulse to be supplied
from the host
120
B–61992E/02 APPENDIX B. PARAMETERS
121
B. PARAMETERS APPENDIX B–61992E/02
Packet length
#7 #6 #5 #4 #3 #2 #1 #0
5056 PCDAT ERCODE NCKER NCKBCC
122
B–61992E/02 APPENDIX B. PARAMETERS
B.3
FANUC Series The following parameters are transferred to the DNC2 system
16/18/21 only when the CNC is turned on. Therefore, when these
parameter values have been changed, the power to the CNC
must be turned off, then back on.
#7 #6 #5 #4 #3 #2 #1 #0
0131 ASI SB2
NOTE
Use ASCII code.
#7 #6 #5 #4 #3 #2 #1 #0
0134 CLK NCD PRY
NOTE
The data bit length is determined depending on the RSASC
and PARTY settings. If RSASC and PARTY are both set to
1, the 7–bit length is used. In other cases, the 8–bit length
is used.
#7 #6 #5 #4 #3 #2 #1 #0
0135 R42
123
B. PARAMETERS APPENDIX B–61992E/02
#7 #6 #5 #4 #3 #2 #1 #0
0140 ECD NCE BCC
0143 Timeout value of the timer used to check for a response from the host
0144 Timeout value of the timer used to check for the EOT signal from the host
124
B–61992E/02 APPENDIX B. PARAMETERS
0148 Maximum number of characters that can be received after send stop processing (CS off)
Packet length
125
C. DATA LINK LAYER MATRIX APPENDIX B–61992E/02
T wait 3 – – CNC HOST retry send retry start transmitt send retry
R F0G send to wait over ENQ over Na, Nb, Nc=0 EOT over same to D same to D same to D
A state ENQ ENQ ENQ
N Nb Nb Nb
S 2 1 0 2 0 4 2 1
M transmit- 4 – to DLE wait evaluate after transmitting is completed –
I ting
T state 5 4
T
I wait 5 – – send retry to wait retry
N DLE ENQ over “1” same to C same to C over same to C same to C
G state Na Nc
(DLE1) 5 0 6 4 0
wait 6 – – send retry retry send EOT
“1” ENQ over same to C over (normal) same to E same to C same to C Ta
state Na Nc
5 0 4 0 0
126
B–61992E/02 APPENDIX D. APPLICATION LAYER MATRIX
1. PT**/LIPM type
Event Receive Received Received Recv. Recv. Recv. Recv. Recv. Recv. Recv. Recv. Recv. CNC Datalink
R **/
req. PT**/LIPM T NB DIPM M OK M NR T NP T BD M RR M RT T FD else reset error
Matrix
state A B C D E F G H I J K L M N
IDLE state 0 PT ** M RT M NR/ No
send send T NP T BD send opera- T BD send No operation
send tion
3 1 0 0 0 0 0
T NB wait 1 – T BD R **/ T FD to T BD to
send DIPM send IDLE send IDLE
send same to B same to B
0 1 2 0 0 0
M OK wait 2 – T BD to to T BD to
send IDLE IDLE send IDLE
same to B same to B same to B
0 0 0 0 0
M RT wait 3 – T BD to to to T NB T BD to
send IDLE IDLE IDLE send send IDLE
same to B same same to B
0 0 0 0 to B 4 0 0
4 – T BD T NB to to M OK T BD to
R ** wait send send IDLE IDLE send send IDLE
same to B same to B same to B same
0 4 0 0 0 to B 0 0
A B A, B : Process
m, n: Matrix state number to be changed
n m
2. PR** type
Event Send CNC Datalink
PT**/LIPM T NB R ** M OK M NR T NP T BD M RR M RT T FD else
req. reset error
Matrix
state A B C D E F G H I J K 0 M N
IDLE state 0 PR ** M PR M NR No
send send M NP T BD send opera- T BD send No operation
send tion
2 1 0 0 0 0 0
R ** wait 1 – T BD T NB to to M OK T BD to
send send IDLE IDLE send same send IDLE
same to B same to B same to B to B
0 1 0 0 0 0 0
M RR wait 2 – T BD to to PR ** T BD to
send IDLE same IDLE send send IDLE
same to B to B same to B
0 0 0 3 0 0
T NB wait 3 – T BD R ** T FD to T BD to
send send send IDLE send IDLE
same to B same to B
0 3 4 0 0 0
M OK wait 4 – T BD to to T BD to
send IDLE IDLE send IDLE
same to B same to B same to B
0 0 0 0 0
127
D. APPLICATION LAYER MATRIX APPENDIX B–61992E/02
3. T** type
Event Send CNC Datalink
T ** R ** M OK M NR T NP T BD else
Req. reset error
Matrix
state A B C D E F G H I J
IDLE state 0 T ** R ** M NR/ No T BD
send send T NP T BD send operation send No operation
send
2 1 0 0 0 0 0
M OK wait 1 – T BD to to to T BD to
send IDLE IDLE IDLE send IDLE
same to B same to B same to B
0 0 0 0 0 0
R ** wait 2 – T BD M OK M NR to T BD to
send send send IDLE send IDLE
same to B same to B
0 0 0 0 0 0
4. M**/R** type
Event Send M ** /MCRM CNC Datalink
M NR M NP T BD else
Req. R ** reset error
Matrix
state A B C D E F G H
IDLE state 0 R ** / M OK M NR T BD send T BD send No T BD No operation
M ** send M NP operation send
send send
1 0 0 0 0 0 0 0
M OK wait 1 – T BD normal normal to T BD to
send to to IDLE same to B send IDLE
IDLE IDLE
0 0 0 0 0 0
128
B–61992E/02 APPENDIX E. ALARM MESSAGES
E ALARM MESSAGES
129
E. ALARM MESSAGES APPENDIX B–61992E/02
E.1
E.1 Alarm Messages for Series 0
Series 0
Code Message Description Remark
BP/S 071 BP/S 071 alarm A program specified to be deleted or
uploaded was not found.
BP/S 073 BP/S 073 alarm There is a program with the same name as
a program specified to be downloaded.
BP/S 086 BP/S 086 alarm Errors that disable communication Note
(1) Parity error
(2) Flaming error
(3) Overrun error
(4) CD (signal quality detection) low
(5) DR/TR signal low
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
E.2 Alarm Messages for Series 15
Series 15
Code Message Description Remark
SR 960 MAP file transmission error A communication error occurred on Note
(channel 1) channel 1.
a) The operator or the host com-
puter discontinued transmis-
sion.
b) Errors that disable commu-
nication
(1) Parity error
(2) Flaming error
(3) Overrun error
(4) CD (signal quality detec-
tion) low
(5) DR/TR signal low
SR 970 MAP file transmission error Same as above
(channel 2)
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
F. ERROR CODES DETAILING
B–61992E/02 APPENDIX NEFATIVE RESPONSE
131
F. ERROR CODES DETAILING
F. NEFATIVE RESPONSE APPENDIX B–61992E/02
132
B–61992E/02 APPENDIX G. MAINTENANCE
G MAINTENANCE
133
G. MAINTENANCE APPENDIX B–61992E/02
G.1 The arrangement of the LEDs is as shown on the right (the door open).
The following table lists the meanings of the LED indications.
DESCRIPTIONS OF
INDICATION BY LEDS
0 f f 3
(Series 15–A) 1 f f 2
G.1.1 When the LEDs are blinking or remain off, they indicate system errors.
Blinking LED The system errors can normally be eliminated by turning the power off
and on again. In some cases, error recovery requires hardware
Indications replacement.
LED
No. Meaning Code Message
indication
f f An NMI occurred in a module other than the
1 f f remote buffer. F No
F f
2 f f RAM parity error E Yes
f f
3 F f F-BUS error D Yes
F f
4 F f ROM parity error C No
f f Invalid interrupt
5 f F An interrupt occurred when should not. B Yes
F f
6 f F Error on the ID of a remote buffer PCB A No
f f
7 F F RAM collation error 9 No
F f
8 F F Not used 8 ––
f F
9 f f DNC2 software error 7 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
B–61992E/02 APPENDIX G. MAINTENANCE
G.1.2 When the LEDs light steadily or remain off, they indicate the state (not
Nonblinking LED abnormal state) of the remote buffer.
Indications G.1.2 LED Indications and Their Meanings
LED
No. Meaning Code Message
indication
f f The remote buffer CPU is at halt, immedi-
1 f f ately after power is applied. F
f F CIRR#15=1 wait;
2 F F Common Resource Irt. request awaited 1
f F
8 f f DNC2 software is ready. 7
135
G. MAINTENANCE APPENDIX B–61992E/02
G.2 Incase of Series 15–A, the following table lists the system error messages
related to the remote buffer.
SYSTEM ERROR
MESSAGES G.2 LED Indications and Their Meanings
(Series 15–A)
LED
Code Meaning Message
indication
RAM parity error occurred.
LH ... L : Even address
F f H : Odd address
f f E RAM PARITY LH (000aaaaa)
aaaaa Address (next com-
mand) detected when
the error occurred
F-BUS error occurred.
f f aaaaa Address (next com-
F f D BUS ERROR (000aaaaa)
mand) detected when
the error occurred
Invalid interrupt occurred.
f f UNDEFINED IRT 00n 000n... Type of the interrupt
f F B (000aaaaa) aaaaa Address (next com-
mand) detected when
the error occurred
136
B–61992E/02 APPENDIX G. MAINTENANCE
G.3 The Series 15–B 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.
LED INDICATORS Immediately after the power is turned on, LEDs 3 and 4 both light while
(Series 15–B) the DNC2 CPU is stopped; then, these LEDs normally go off.
OPT1
1 2 3 4
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.
LED status Internal
No. Meaning Message
No.3 No.4 code
1 On Blink NMI is generated in a module 8F Not
other than DNC2. provided
NOTE
DNC2 RAM ranges from 800000H to 8FFFFFH. Do not try
to display 46900000 and subsequent memory locations.
Otherwise, a system error occurs.
137
G. MAINTENANCE APPENDIX B–61992E/02
G.4 With the Series 15–B, the system error messages related to DNC2 are
explained below.
SYSTEM ERROR
Internal
MESSAGES code
Message Meaning
(Series 15–B) 8E RAM PARITY HL (00aaaaaa) RAM parity error occurred.
LH... L : Even–numbered address
H : Odd–numbered address
aaaaaa Execution address when
the error occurred (next
instruction)
8D BUS ERROR (00aaaaaa) F–bus error occurred.
aaaaaa...Execution address when
the error occurred (next
instruction)
8C DNC2 ROM PARITY ERROR ROM parity error occurred.
8B UNDEF IRT 00nn (00aaaaaa) Invalid interrupt was generated.
ERR–CODE : cccc 00nn... Interrupt type
aaaaaa...Execution address when
the error occurred
cccc... Error code
8A DNC2 PCB HARD ERROR Problem occurred in DNC2 printed cir-
(diimage) cuit board version B or later.
diimage...Status of 7000n4h in com
munication space
89 DNC2 RAM TEST ERROR RAM check error occurred.
(seg : addr) seg... Error segment
addr... Error address
88 DNC2 SOFT ERROR (id : ee : aaaa) DNC2 software error occurred.
87 id... Error type
ee... Error internal code
aaaa... Execution address when the
error occurred (next instruc
tion)
138
B–61992E/02 APPENDIX G. MAINTENANCE
G.5
TROUBLESHOOTING
G.5.1
MAP Log Messages
G.5.1.1 Datagram communication is always recorded in the log buffer area. The
Log messages most recent 500 characters recorded in the log area are displayed on the
CNC MAP log message screen. Figure G.5.1.1 shows a log message
display. This function is supported only by the Series 15.
PRPM | M RR | R PM | T NB | R PM | T NB | R PM | T NB | T FD | M OK | LIPM |
M RT | T NB | DIPM | T NB | T FD | M OK |
G.5.1.2 There are three log message formats. Each log message is separated by
Log message format 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 Details (0xssdd)
Explanation
code Status (ss) Error data (dd)
E002 0, 1, 2, 3 Error code of com- Communication line disconnection
5, 6, 7, 8 munication error
9, A, B, C
E009 2, 3, 5, 6 00 Retry limit reached due to timeout
7, 8, 9, A
B
E00C 0, 1, 2, 3 Invalid TCC(*1) Retry limit reached due to reception of
5, 6, 7, 8 invalid character
C
E010 5, 6, B Error code Retry limit reached due to NAK or DLE0
5 : “NAK” Retry limit reached due to checksum error
6 : “NAK” | “DLFO”
B : “BCC”
E011 B 00 Wait for BCC
E014 C Invalid TCC(*1) Retry limit reached due to reception of
invalid character during wait for EOT
*1 TCC stands for Transmission Control Character.
139
G. MAINTENANCE APPENDIX B–61992E/02
G.5.2
Troubleshooting
2. Operation was discontinued halfway through. Perform the same check as No.1 except for checking of param-
eters.
3. Alarm SR960/070 (Series 15) or BP/S86 (Series 0/16/18/21) Check the following:
occurred. a) Communication cable and connectors
b) Flaming or overrun error
(1) Baud rate mismatch
(2) Improper stop bit setting
(3) CD (signal quality detection) is off (RS-232-C only).
140
H. MODAL DATA AND CORRESPONDING
B–61992E/02 APPENDIX INTERNAL CODES
141
I. COMMUNICATION PARAMETER
I. STRUCTURE APPENDIX B–61992E/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
1: 1200, 2: 2400,
Communication speed [3]: 4800, 4: 9600
Data length [ 1]: 7 bits, 2: 8 bits
Communication
error log
NOTE
In the communication library provided by FANUC, the
maximum transmission speed is 9600 bps.
142
I. COMMUNICATION PARAMETER
B–61992E/02 APPENDIX STRUCTURE
typedef struct {
COMPARAM port[4];
short len;
LOGDEF seqlog;
LOGDEF prolog;
LOGDEF phalog;
LOGDEF comlog;
} SYSTBL;
143
J. ERROR CODES APPENDIX B–61992E/02
J ERROR CODES
144
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
K DEMONSTRATION PROGRAM
145
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
146
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
K.2
PREPARATION
K.2.1 Copy the following files and the communication program library to the
Files directory where you are going to compile the program.
No. File Outline of function
1 DEMO_MAN.C Main routine of the demonstration program
2 D2_DEMO.C Subfunctions of the demonstration program
3 D2_UTL98.C Machine-dependent utility routines (for NEC PC-9801) in
the demonstration program
4 D2_UTIBM.C Machine-dependent utility routines (for IBN PC) in the
demonstration program
5 D2DTGLB.C Message tables for the demonstration program
6 D2DTEXT.H Header file (external message table declarations) for the
demonstration program
7 D2_DEMO.H Header file (constant declarations) for the demonstration
program
8 D2_GLB.H Header file (function prototype declarations) for the dem-
onstration program
9 D2_PRT.H Header file (external function definitions) for the demon-
stration program
10 DNC2DEF.H Header file (communication package functions and type
declarations) for the demonstration program
11 DNC2SYS.CFG File containing communication parameter settings
K.2.2
Compiling and Linking (1) Preparation
Set up environment variables while referring to setting of
Programs environment variables described in III–3.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 APPENDIX B–61992E/02
148
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
149
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
K.3
OVERVIEW OF
OPERATIONS
K.3.1 After making sure that the executable file containing the demonstration
Starting and Exiting program (DEMOIBM.EXE or DEMO98.EXE) and the communication
parameter file (DNC2SYS.CFG) are on the current directory, activate the
the Demonstration executable file.
Program
Example) C>DEMOIBM
K.3.2
Commands No. Command Summary Remark
1 Set new program Registers a program. Invalid during machining
2 Edit program Makes changes regarding a Invalid during machining
registered program.
3 Delete program Deletes a registered program. Invalid during machining
4 Start Starts machining.
5 Stop Stops machining.
6 Continue Resumes machining Valid only during machining
7 Upload Uploads a program. Invalid during machining
8 Read PMC data Reads PMC data.
9 Write PMC data Writes PMC data.
10 End Ends demonstration.
150
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
K.3.3
Operating Procedure (1) Immediately after the demonstration program is started, the
command entry menu appears (see K.4.2). When machining is in
progress, pressing the ESC key causes the program to wait for
command entry.
(2) When the program is in command entry mode, register as many
programs as necessary.
(3) If a program name or other information you entered is incorrect,
correct it using the Edit program command. To delete a registered
program, use the Delete program command.
(4) After all necessary programs have been registered, select the Start
command to trigger machining. This causes the programs to be
downloaded in sequence they were registered.
(5) When a program ends running (always monitored by the Read PMC
data command), it is deleted from the NC memory, and the next
program is downloaded to start machining.
(6) To discontinue machining, press the ESC key to place the program
in command entry mode. Then select the Stop command.
(7) To read out the parameters during machining, press the ESC key to
place the program in command entry mode. Then, select the Read
PMC data command. To resume machining, select the Continue
command.
Demonstration program
Register programs
Error
No
related to program
registration?
Yes
No Machining
to be discontinued?
Yes
Yes
Machining to be resumed?
No
End
151
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
K.3.4
Machining Procedure (1) Select the Start command. The lowest-numbered registered program
is downloaded to the NCC.
(2) After the program is downloaded, start it and wait for it to end.
(3) When the end of program execution is detected, the program is
restarted and executed as many times as specified (repetition count).
(4) After the program is executed a specified number of times, it is
deleted from the NC, and the next program is downloaded.
(5) Steps 2 to 4 are repeated.
Start of machining
Download program to NC
Start program
No
Program ended?
Yes
No Repeated
a specified number
of times?
Yes
152
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
K.4
MENU LAYOUT
K.4.1 1 2 3 4 5 6 7 8
Main Menu Format 12345678901234567890123456789012345678901234567890123456789012345678901234567890
1
2 DNC2 Demonstration Program by GE FANUC LTD.
3
4 program 9 : 1:
5
6
7
8 Current program data display area 2:
9 Registered-progr
10 am display area
11
12
13
3:
14
15
16
17 4:
18
19
20
21
22 Command entry/parameter display area
23
24
25
153
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
K.4.2
Command Entry (1) Menu
1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
1
2 DNC2 Demonstration Program by GE FANUC LTD.
3
4 1:
5
6
7
8 2:
9
10
11
12
13
3:
14
15
16
17 4:
18
19
20
21 1:Set new program 4:Start 7:Upload 10:End
22 2:Edit program 5:Stop 8:Read PMC data
23 3:Delete program 6:Continue 9:Write PMC data
24 Select No.9
25
20
21 New program file name = aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
22 New program number = o9999
23 New program repeat count = 99
24 Sure ?(y/n)y
25
154
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
20
21 Edit program ? 9
22
23
24
25
20
21 New program file name = aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
22 New program number = o9999
23 New program repeat count = 99
24 Sure ?(y/n)y
25
20
21 Edit program ? 9
22 Sure ?(y/n)y
23
24
25
20
21 Cutting start
22 Sure ?(y/n)y
23
24
25
155
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
20
21 Cutting stop
22 Sure ?(y/n)y
23
24
25
20
21 Cutting now
22
23
24
25
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 Upload program file name = aaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaa.aaa
22 Upload program number = o9999
23 Sure ?(y/n)y
24
25
156
B–61992E/02 APPENDIX K. DEMONSTRATION PROGRAM
20
21 PMC RAM number = 999999
22 Data length = 99
23 Reading now...
24
25
20
21 number +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
22 999999 : 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
23 999999 : 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
24 Please hit any key
25
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 PMC RAM number = 999999
22 Data length = 99
23 Reading now...
24
25
20
21 number +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
22 999999 : 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
23 999999 : 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
24 Sure ?(y/n) y
25
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 Demonstration end
22 Sure ?(y/n)y
23
24
25
157
K. DEMONSTRATION PROGRAM APPENDIX B–61992E/02
K.4.3 1 2 3 4 5 6 7 8
Machining Menu 12345678901234567890123456789012345678901234567890123456789012345678901234567890
1
2 DNC2 Demonstration Program by GE FANUC LTD.
3
4 program (1) : (2) 1:o (11)< (12) . >
5 repeat (13)
6 file name : (3) total (14)
7 program no. : o (4) time (15)
8 repeat count : (5) / (6) 2:
9 total count : (7)
10 cutting time : (8)
11 total time : (9)
12 3:
13
14 cutting rate
15 0% 100%
16 4:
17 (10)
18
19
20
21 Cutting now
22 (16)
23
24
25
158
L. PMC ADDRESS (Series 15–A AND
ADDRESS SPECIFICATION
B–61992E/02 APPENDIX TYPE OF Series 15–B)
159
M. DNC2 TOOL POST SELECTION
M. (Series 15–TTB) APPENDIX B–61992E/02
160
M. DNC2 TOOL POST SELECTION
B–61992E/02 APPENDIX (Series 15–TTB)
161
M. DNC2 TOOL POST SELECTION
M. (Series 15–TTB) APPENDIX B–61992E/02
M.2
ASWITCHING OF HOST PMC
TARGET TOOL POST
(1)
FOR INPUT/OUTPUT R or D area
BY THE HOST
COMPUTER Ladder
WHEAD
(2)
CNC
(3)
(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
tool–post–dependent data.
162
M. DNC2 TOOL POST SELECTION
B–61992E/02 APPENDIX (Series 15–TTB)
M.3 An outlined flow for writing data to tool posts 1 and 2 is shown below.
EXAMPLE
D_PMCdata_w Issue a request for switching to tool post 1
to the R or D area.
No
Is DI signal WHEAD low?
No
Is DI signal WHEAD high?
Yes
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 III–4.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
M. DNC2 TOOL POST SELECTION
M. (Series 15–TTB) APPENDIX B–61992E/02
M.4
#7 #6 #5 #4 #3 #2 #1 #0
PARAMETERS 2004 DIHD
164
M. DNC2 TOOL POST SELECTION
B–61992E/02 APPENDIX (Series 15–TTB)
165
N. DNC2 SCREEN (Series 16/18) APPENDIX B–61992E/02
166
B–61992E/02 APPENDIX N. DNC2 SCREEN (Series 16/18)
N.1 When DNC operation is performed with the DNC2 function, the program
name set on the communication operation screen is sent to the host.
COMMUNICATION
This screen is displayed by using function key <SYSTEM> then the
OPERATION SCREEN [C–OPER] soft key.
O0001. PRG
>_
MDI STOP *** *** 12:34:53
[ C–OPER ][ C–SERV ][ ][ ][ (OPRT) ]
167
N. DNC2 SCREEN (Series 16/18) APPENDIX B–61992E/02
>_
MDI STOP *** *** 12:34:53
[ C–OPER ][ C–SERV ][ ][ ][ (OPRT) ]
>_
MDI STOP *** *** 12:34:53
[ C–OPER ][ C–SERV ][ ][ ][ (OPRT) ]
168
B–61992E/02 APPENDIX N. DNC2 SCREEN (Series 16/18)
>_
MDI STOP *** *** 12:34:53
[ C–OPER ][ C–SERV ][ ][ ][ (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
169
N. DNC2 SCREEN (Series 16/18) APPENDIX B–61992E/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
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.)
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
B–61992E/02 Index
[A] Details, 73
Details of the Data Section, 31
Acceleration/Deceleration Delay, 37
Details of the Error Log File, 105
Alarm Messages, 129
DNC2 screen (Series 16/18), 166
Application Layer, 23
DNC2 Tool Post Selection (Series 15–TTB), 160
Application Layer Matrix, 127
Downloading a Part Program, 31
[B]
[E]
Blinking LED Indications, 134
Error Codes, 102, 144
Error Codes Detailing Nefative Response, 131
Error Handling, 59
[C]
Error Log Information, 104
Code, 30
Establishing a Data Link, 21
Command Entry, 154
Example, 163
Commands, 150
Example of Using the Communication Program, 100
Communication Error Information, 103
Executing a Program, 57
Communication Mode, 13
Communication Operation Screen, 167
Communication Parameter Structure, 142 [F]
Communication Service Screen, 168
FANUC Series 0 (A02B–0098–J055), 112
Communication Speed, 13
FANUC Series 0 (Upper Row: Series 0–TC, Lower
Compilation and Linking, 68 Row: Series 0–MC), 117
Compiling and Linking Programs, 147 FANUC Series 15–A, 113
Configuration, 7, 64 FANUC Series 15–B and Series 16/18, 114
Configuration of Datagram Commands, 26 FANUC Series 16/18/21, 123
Connection, 165 Files, 147
Connector Specifications, 111 Format, 29
Continuation, 30 Free Area in Program Memory, 34
Current Program Number and Sequence Number, 38 Function Specifications, 69
Functions, 24, 72
[D]
Data Link Layer, 18 [I]
Data Link Layer Matrix, 126 Installation, 65
Data Link Protocol, 21 Installation Procedure, 67
Data Type, 29 Interrupt, 60
Datagram Protocol, 59 Interrupt Command, 59
Datagram Syntax, 25 Interrupt Procedure, 60
Deleting a Part Program, 33
Delimiter in the Data Section, 30
Demonstration Program, 145
[L]
Layers, 11
Descriptions of Indication by LEDs (Series 15–A),
134 LED Indicators (Series 15–B), 137
i–1
Index B–61992E/02
[N]
Negative Acknowledgment, 59 [S]
Nonblinking LED Indications, 135 Selecting a Part Program, 57
Notation of the Datagram, 29 Sending a Datagram, 21
Notes, 71 Series 0, 130
Series 15, 120, 130
Service Functions Specified with Datagram Com-
[O] mands, 27
Operating Procedure, 151 Servo Delay, 36
i–2
B–61992E/02 Index
[U] [W]
Uploading a Part Program, 32 Writing a CNC Parameter, 40
Use, 70
Writing a Custom Macro Variable, 46
Writing a Tool Offset, 45
[V] Writing Pitch Error Compensation, 42
Values Returned by Functions, 103 Writing PMC Data, 55
i–3
Revision Record
01 Nov., ’91