Академический Документы
Профессиональный Документы
Культура Документы
• Time information
• Automatic operation control
• Execution pause (which can be restarted with CYCLE START)
• Mirror image information
• Number of machined parts
• Modal information
• Current tool position
• Work offset values
Interface Signals
This is perhaps the toughest concept in macro programming, because
it also requires a knowledge of PLC programming. It is only for
advanced users. So, the readers may skip it until they have learned the
basic features of macro programming.
Interface signals are used for communicating with (i.e., receiving
input and sending output, as binary signals, from/to) external
devices, connected to the CNC machine. This issue is discussed in
more detail in Chap. 12. Here, only a broad overview is given, with-
out going into the finer details, so, certain things may not be very
clear until the reader refers to the chapter exclusively devoted to this
topic. The main objective here is to explain what interface signals are,
not how they are used, though some idea of that is also given.
A discussion on interface signals and their use requires an under-
standing of the hardware architecture of the control (refer also to
Communication with external devices in Sec. 1.2 where some informa-
tion is given). The CNC (control) is mainly concerned with toolpath
control. The overall control of the machine is through the logic incor-
porated in a PLC. For example, if the door is open, machining should
not start. If, for some reason, machining is required to be done with
the door open, the PLC logic will have to be altered, through a change
in its ladder diagram. (Ladder diagram or ladder language is one of
the methods of programming a PLC. It is assumed that the reader pos-
sesses its basic knowledge. If not, one may refer to some book on PLC
programming, such as the one by John R. Hackworth, published by
Pearson Education.)
Though a PLC is an integral part of the control hardware supplied
by the control manufacturers, it is programmed by the machine tool
builders to suit particular machine tools. Fanuc calls its PLC program-
mable machine control (PMC). Essentially, both PLC and PMC refer to
the same thing.
When a CNC machine is connected to external devices, two-way
communication between the CNC, the PMC, and the external devices
is needed. The CNC, however, does not communicate with the external
devices directly. The communication between the two is through the
PMC, as shown in Fig. 3.4.
G-signal X-signal
Machine tool
CNC PMC and
external devices
F-signal Y-signal
The PMC accepts inputs from the CNC as well as from external
devices (including the machine tool). These inputs are called F-signals
and X-signals, respectively. Similarly, it sends outputs to the CNC
(G-signals) as well as to the external devices (Y-signals). The X-
and Y-signals are also called DI (data in) and DO (data out) signals,
respectively.
Since F- and G-signals are internal to the control, the signal
addressees and the corresponding meanings are decided by Fanuc.
On the other hand, X- and Y-signals are external signals, so the signal
addresses and their meanings are decided by the MTB. The MTB does
not need to use all the available X- and Y-addresses. The left-over
addresses can be used by the end-user, as interface signals to/from
external devices. Some X-addresses (such as X4.0 to X4.7, and X8.4),
however, are standard, and always used with the same meaning.
All the signals are eight-bit signals, each bit carrying a different
meaning from the other seven bits. For example, the PMC sends the
“cycle start” signal to the CNC by G7.2 (which means bit #2 of G7 or
G007; usually, the F- and G-signal addresses are three-digit numbers,
and X- and Y-addresses are two-digit numbers, where the leading
zeroes can be omitted). On the other hand, G7.1 is the “start lock”
signal (which disables the CYCLE START button on the MOP), and
G7.0 is not defined. Similarly, X0.0 (bit #0 of X0) and X0.1 (bit #1 of X0)
are two independent input signals. Sometimes, a combination of cer-
tain bits is used for sending appropriate signals. For example, G43.0,
G43.1, and G43.2 are for mode selection signal to the CNC. When
these are all 0, the CNC considers it an instruction to work in the
MDI mode. On the other hand, 001 is for HANDLE mode, 100 is for
MEMORY or AUTO mode, and so on.
The hardware connections for F- and G-signals are internal. The
predefined meanings of F- and G-signals cannot be changed by the MTB
or the end-user. The address numbers for these signals and the associ-
ated meanings can be found in the Fanuc Maintenance Manual.
A number of X- and Y-signals are available for interacting with
the outside world. Typically, X0 to X3 are for general-purpose signals,
X4 to X11 are connected to the keys of the Fanuc-manufactured MOP,
X12 is connected to the manual pulse generator (MPG), X13 and X14 are
for additional MPGs, and X15 is for error signals. Many MTBs do not
use Fanuc’s MOP. They design their own MOP. In such cases, X0 to
X11 become general-purpose signals, and any signal can be used for
any purpose. The available Y-signals typically are Y0 to Y7. One will
have to refer to the manual supplied by the MTB to find out which
X- and Y-addresses have been used by them. The remaining addresses
can be used by the users for the purpose of communication with
external devices.
The physical connection between the PMC and the external
devices is done by connecting wires to the terminal strip attached to the
I/O (input/output) module (also called the I/O unit) of the PMC.
Refer to the Connection Manual (Hardware) of Fanuc to know the pin
assignment (i.e., which terminal corresponds to which X- or Y-address)
on the terminal strip. The I/O module is generally placed in the wir-
ing cabinet designed by the MTB. It is connected to the terminal strip
by four 50-pin connectors (on the I/O module) and ribbon cables.
In order to communicate an external signal to the CNC, the corre-
sponding X-signal will need to be written to the appropriate G-signal
(G54.0 to G54.7 and G55.0 to G55.7 are reserved for this purpose). This
can be done by adding a new rung to the PMC ladder:
X_·_ G_·_
F_·_ Y_·_
and 16 output signals are available. The current status of these signals
is available inside a program through certain system variables, as
already explained by some examples.
Two types of system variables are available: for 16 single-bit sig-
nals and for one 16-bit signal (for both input and output signals). The
examples given pertain to system variables for single-bit signals
which can only be 0 or 1. The variables for 16-bit signals are used to
read/write all the 16 signals simultaneously by a single program
statement. For example, if the first and the second signals (i.e., F54.0
and F54.1) are 1 and the rest are 0 then the corresponding 16-bit sig-
nal would be 0000000000000011 (the decimal interpretation of which
is 3). So, #1100 = 1; and #1101 = 1; is the same as #1132 = 3; except that
the two outputs are triggered simultaneously in the second case. It is
a matter of individual choice/requirement whether the signals are
read/written by the program one by one or simultaneously. The com-
plete variable list is given below. (32-bit signals are also available.
They are not described here because they are rarely used.)
The decimal values of #1032 and #1132 (all other variables are
either 0 or 1) would be given by the following equations:
15
# 1032 = ∑ #[1000 + i] × 2 i
i= 0
15
# 1132 = ∑ #[1100 + i] × 2 i
=0
i=