Basic CNCPMC Interfacing Manual
Basic CNCPMC Interfacing Manual
1
Basic CNC/PMC interfacing Manual
TABLE OF CONTENTS
1 Introduction to PMC ............................................... 6
1.1 Programmable machine controller .......................................... 7
1.2 Basic Configuration of PMC ..................................................... 8
2 Interfacing I/O devices ...................................... 22
2.1 I/O LINK CONNECTION ........................................................... 23
2.2 Setting the connection location ............................................. 25
2.3 Interfacing I/O Devices ........................................................... 27
2.4 Connection of I/O units with 0i Systems ............................... 28
2.4.1 I/O unit configuration .............................................. 29
2.4.2 2.5.2. Pin addresses of I/O unit .............................. 30
2.5 CONNECTION TO STANDARD MACHINE
OPERATOR'S PANEL .............................................................. 31
2.5.1 Keyboard of main panel .......................................... 32
2.5.2 Override signals ...................................................... 33
2.5.3 I/O Mapping for Machine operator panel ............... 34
3 Basic Instructions.............................................. 35
3.1 Introduction to ladder ............................................................. 36
3.1.1 Procedure to enable the cursor over the ladder
(PMC-1)....................................................................36
3.1.2 Procedure to create a new Net in the existing
ladder (PMC-1) ........................................................ 36
3.1.3 Procedure to search an input address (PMC-1) ....36
3.1.4 Procedure to search an output address (PMC-1)..37
3.1.5 Procedure to search the functional instructions
(PMC-1)....................................................................37
3.1.6 Use of Collective monitor screen ........................... 37
3.1.7 The important points to be considered for
creating the ladder ................................................. 38
2
Basic CNC/PMC interfacing Manual
5
Basic CNC/PMC interfacing Manual
1 Introduction to PMC
6
Basic CNC/PMC interfacing Manual
7
Basic CNC/PMC interfacing Manual
8
Basic CNC/PMC interfacing Manual
PMC signal addresses include I/O signals exchanged with the machine, I/O signals
exchanged with the CNC, and signals for internal relays and data (PMC parameters)
in nonvolatile memory.
9
Basic CNC/PMC interfacing Manual
10
Basic CNC/PMC interfacing Manual
Table 3: Coils
These instructions perform a 1-bit operation and are called basic instructions.
11
Basic CNC/PMC interfacing Manual
12
Basic CNC/PMC interfacing Manual
13
Basic CNC/PMC interfacing Manual
for processing the 3rd level sequence part is not guaranteed to maintain program
compatibility with conventional models. Therefore, the 1st and 2nd level sequence
parts should be programmed without using the 3rd level sequence part.
14
Basic CNC/PMC interfacing Manual
15
Basic CNC/PMC interfacing Manual
NOTE
1 This area is reserved for PMC management software. No I/O can be allocated in
this area. We should not use it in user programs.
2 This area is reserved for PMC management software. We should not use it in user
programs.
16
Basic CNC/PMC interfacing Manual
The following table lists the number of signals (bytes) that can be used as
internal relays.
MESSAGE
These addresses are intended to be used for a message display request and
message status display.
The following table lists how many messages can be used number of messages
= number of bytes × 8).
17
Basic CNC/PMC interfacing Manual
18
Basic CNC/PMC interfacing Manual
These addresses are used to specify jump destination labels (positions within
the sequence program) in the JMPB and JMPC instructions.
The same label number can be specified for different instructions as long as the
instructions are not within the same program unit (main program or subprogram).
PMC PARAMETERS
The term "PMC parameter" refers to any of the timer, counter, keep relay
parameters, and data table. PMC parameters are held in nonvolatile memory, whose
contents are not lost even when the power is turned off.
19
Basic CNC/PMC interfacing Manual
1) Timer
This parameter specifies a timer value. It is possible to set and display the timer
value on the TIMER screen. The sequence program can read and write the timer
setting.
2) Counter
This parameter is used for a counter preset value and cumulative value. It is
possible to set and display these values on the COUNTER screen.
3) Keep relay
This parameter is used for sequence control. It can be set and displayed from
the KEEP RELAY screen. It can also be read and written, using instructions in the
sequence program.
The data set up or displayed from the KEEP RELAY screen is 8-bit binary data.
On the KEEP RELAY screen, therefore, each of the eighth digits is set or displayed
as 0 or 1.
4) Data table
The data table enables a set of numeric data ( data table) to be used for PMC
sequence control.
5) Extra relay
Extra relays are volatile memory, which can be used as extention of ordinary
internal relays.
20
Basic CNC/PMC interfacing Manual
Consider the example of pallet changing operation. The logic can be written in a
sub program and this sub program can be called by means a call instruction as
shown below.
Fig.6
In the above instruction, P0001 is a sub program for pallet changing. The sub
program will be called only when the keep relay K0.0 is in enabled state. So, the
keep relay can be enabled or disabled by means of keep relay screen depending
upon the availability of the function.
21
Basic CNC/PMC interfacing Manual
22
Basic CNC/PMC interfacing Manual
The FANUC I/O Link is a serial interface which passes input/output signals
between the PMC and each I/O device at a high speed. For each channel, up to
1024 DI points and up to 1024 DO points can be connected and controlled from the
PMC.
Table: 12
Table: 13
24
Basic CNC/PMC interfacing Manual
I/O devices can roughly be divided into the following three types according to
the method for specifying the connection location.
1) Type of I/O device whose connection location is specified with its
group, base, and slot numbers
- I/O Unit-MODEL A is of this type. Specify the connection location with its
group, base, and slot numbers.
- The range of valid settings of each item is as follows:
Group = 0 to 15
Base = 0 and 1
Slot = 1 to 10 (number of a slot on a I/O Unit- MODEL A base board)
2) Type of I/O device whose connection location is specified with its group and
slot numbers
- I/O Unit-MODEL B and handy machine operator's panels are of this type.
- Always set the base number to 0.
The range of valid settings of each item is as follows:
Group = 0 to 15
Base = 0 (Always set 0.)
Slot = 0 to 30
3) Type of I/O device whose connection location is specified with its group
number
Machine operator's panel interface unit, I/O Link connection unit, Power Mate, and
other devices are of this type. One unit of this type occupies one group.
When using this type, always set the base number to 0 and the slot number to 1.
The range of valid settings of each item is as follows:
Group = 0 to 15
Base = 0 (Always set 0.)
Slot = 1 (Always set 1.)
For the group number, we have to assign the group number used in the
configuration.
For the base number, always assign 0.
25
Basic CNC/PMC interfacing Manual
27
Basic CNC/PMC interfacing Manual
With the I/O unit for 0i, up to 96 DI points and up to 64 DO points can be used.
I/O Link is used to connect to controls. For the I/O unit for 0i, it is necessary to
perform I/O Link assignment. Assume starting input/output address for the I/O unit is
X0/Y0. So, the I/O address mapping will be follows
28
Basic CNC/PMC interfacing Manual
29
Basic CNC/PMC interfacing Manual
30
Basic CNC/PMC interfacing Manual
Standard machine operator's panel is connected with CNC by I/O Link, which is
composed by some following operator's panels.
Main panel
All key tops are detachable. MTB can customize keys and make his original key
layout easily.
Sub panel
31
Basic CNC/PMC interfacing Manual
I/O address of Key switches and LED on the keyboard of Main panel are as
follows.
For Example to find the address of the Remote button, the row/column
number is (A4)
When a Sub panel is used, gray code is output from each rotary switch
according to the following table:
33
Basic CNC/PMC interfacing Manual
34
Basic CNC/PMC interfacing Manual
3 Basic Instructions
35
Basic CNC/PMC interfacing Manual
Collective monitor is the screen on which the selected Net functions can be
visualized.
37
Basic CNC/PMC interfacing Manual
38
Basic CNC/PMC interfacing Manual
Table 15 :Contacts
39
Basic CNC/PMC interfacing Manual
3.3.1 Example: 1
Write ladder logic for a coil which will energize when an input is given and
de-energize when the input is stopped.
X10.0 is a normally open contact which will get closed when the X10.0 is high,
As per the above logic when X10.0 will become high the coil Y20.0 get energized. II
will be de-energized when the input is removed.
3.3.2 Example: 2
Write ladder logic for a coil which will de-energize when an input is given and
energize when the input is stopped.
X15.0 is a normally closed contact which will get opened when the input X15.0
is high, As per the above logic when X15.0 will become high the coil Y20.0 get
de-energized. II will be energized when the input is given.
40
Basic CNC/PMC interfacing Manual
3.3.3 Example: 3
Consider a hydraulic cylinder as shown in fig. The piston in the cylinder will extend
when the oil enter through port I and reverse when the oil enter through port II. By
pressing the pushbutton A, the solenoid S1 can be activated by which oil will enter
through port I. In the same way, by pushbutton B, solenoid S2 can be activated
and oil will enter through Port II.
Write ladder logic for activating solenoid S1 and S2 by the pushbuttons A and B.
Logic 1
As per the above diagram, by actuating pushbutton X1.0, the solenoid Y1.0 can
be turned on. By actuating the pushbutton X2.0, the solenoid Y2.0 can be turned on.
41
Basic CNC/PMC interfacing Manual
But, if both the buttons were pressed, what will happen?. We can’t predict the
result.
Logic 2
Consider the following logic.
By actuating pushbutton X1.0, the solenoid Y1.0 can be turned on. At the same
time, It will be de-energized by the actuation of pushbutton X2.0. The same
principle is applicable to solenoid II. But, if both the buttons were pressed, what will
happen? All the solenoids will be in off state.
Logic 3
By actuating pushbutton X1.0, the solenoid Y1.0 can be turned on. It will be
maintained in high state by the normally open contact of Y1.0 even though
pushbutton is released. It will be turned off by the actuation of another pushbutton
X2.0. The same principle is applicable to solenoid II.
42
Basic CNC/PMC interfacing Manual
Once the signal G7.2 becomes high and low, the CNC starts the execution of
part program either in MDI mode or Auto mode.
So that, Cycle start button of MOP (X22.1) is directly used to make the G7.2 to high
without any latching circuit.
43
Basic CNC/PMC interfacing Manual
Normally G8.5 will be high. When we press the feed hold button, G8.5 will
become low and it stops the execution of the part program. Once we released feed
hold button, execution of program will start.
Here, X10.0 is assumed as the input address for the feed hold button.
44
Basic CNC/PMC interfacing Manual
During auto mode or MDI mode, if the single block button (X20.4) has been
selected, the part program will be executed block by block.
Normally the single block operation will be enabled and disabled by the same
input button only.
The G signal for single block operation is G46.1. When it becomes high, CNC
will execute the part program block by block.
1. When the single block button is pressed first time, G46.1 should become high.
2. When the same button is pressed next time, G46.1 should become low.
The above function should happen repeatedly.
Net1
X20.4 is the input address of single block button present in the machine operator
panel. R10.0 & R10.1 are the intermediate relays.
When X20.4 is pressed, R10.0 will become high.
Net2
Due to sequential execution of ladder after executing second net the relays R10.0
and R10.1 both will be in high state.
45
Basic CNC/PMC interfacing Manual
Net 3
Since R10.0 is in high state, G46.1 and Y16.4 will be forced to high state. So that
now CNC will be in single block mode.
Case II
When the same input button X20.4 is pressed for the second time, In Net 1, R10.0
will become high which in turn makes the NC input coil R10.0 in the Net 3 will get
open. It leads G46.1 and Y16.4 to disabled state.
Other program testing signals
Machine lock all axis G44.1
Dry Run G46.7
Block Skip G44.0
46
Basic CNC/PMC interfacing Manual
If this signal is enabled, the physical axes movements will be disabled. But in
position screen we can able to see virtual axis movements.
The logic for this operation is same as single block operation which is shown in
the following Nets.
47
Basic CNC/PMC interfacing Manual
48
Basic CNC/PMC interfacing Manual
By selecting this function, CNC skip the blocks present in the part program
which are having the symbol “ / “ as a starting data. The logic for this function is
shown as follows
49
Basic CNC/PMC interfacing Manual
50
Basic CNC/PMC interfacing Manual
4.1.1 Procedure:
1. CNC will change to the particular mode depending upon the status of the
mode selection signals such as MD4, MD2, MD1, DNCI and ZRN.
2. As per the module description, each buttons of the machine operator panel
will have some specific input/output address.
4. So in PMC we have to write a logic which will create the required combination
of the mode selection signals( G signals) depending upon the mode selected.
5. The status of the mode signal for different modes such as AUTO(memory),
Edit, MDI, Jog, etc. are shown in the table.
51
Basic CNC/PMC interfacing Manual
52
Basic CNC/PMC interfacing Manual
R0.0 to R0.7 are intermediate relay used to store the mode selection signal to
store temporarily.
Step 2: Write logic for different modes with interlock of other modes as follows
Here X20.1 is the input address for EDIT button available in MOP
Y16.1 is the output address of LED over EDIT button present in MOP
53
Basic CNC/PMC interfacing Manual
JOG Mode(Net 6)
54
Basic CNC/PMC interfacing Manual
HNDL Mode(Net 8)
55
Basic CNC/PMC interfacing Manual
(Net 10)
56
Basic CNC/PMC interfacing Manual
(Net 11)
(Net 12)
(Net 13)
58
Basic CNC/PMC interfacing Manual
59
Basic CNC/PMC interfacing Manual
60
Basic CNC/PMC interfacing Manual
61
Basic CNC/PMC interfacing Manual
62
Basic CNC/PMC interfacing Manual
In the code data of address X16, X16.0 to X16.4 value is based on the feed
percentage, selected using rotary switch1 of machine operator panel. X16.5 is used
as a parity bit which will not be required for controlling feed rate percentage. So that
the signal X16.5 is omitted by using MOVE instruction by using the multiplication
data 0001 1111 as shown in the following Net.
63
Basic CNC/PMC interfacing Manual
In this instruction, the content of the input address specifies the location of the
table. Then, the content of the location of the table will be moved to output address.
Parameters
64
Basic CNC/PMC interfacing Manual
As per the content of G10 and G11, a feed rate will be selected in jog feed or
incremental feed. These signals are in sixteen bit binary code, which corresponds to
the override values as follows:
The override value is assumed to be zero when all of the signals, (*JV0 to
*JV15) are set to "1" or "0". When this occurs, the feed is stopped. The override
value can be specified in the range of 0% to 655.34% in units of 0.01%. Some
examples are listed below.
65
Basic CNC/PMC interfacing Manual
By using reverse technique, the value for different percentages can be found
as follows
Consider the example of 120 %
Step 2: Add proceeding zeros if required to form it as 16 bits. Then, Group the
binary
digits into 4 bits from LSB.
0010 1110 1110 0000
66
Basic CNC/PMC interfacing Manual
% 15 14 13 12 11 10 9 8 % 7 6 5 4 3 2 1 0 %
1 1 1 1 1 1 1 1 1 255 1 0 0 1 1 0 1 1 155
2 1 1 1 1 1 1 1 1 255 0 0 1 1 0 1 1 1 055
4 1 1 1 1 1 1 1 0 254 0 1 1 0 1 1 1 1 111
6 1 1 1 1 1 1 0 1 253 1 0 1 0 0 1 1 1 167
8 1 1 1 1 1 1 0 0 252 1 1 0 1 1 1 1 1 223
10 1 1 1 1 1 1 0 0 252 0 0 0 1 0 1 1 1 023
15 1 1 1 1 1 0 1 0 250 0 0 1 0 0 0 1 1 035
20 1 1 1 1 1 0 0 0 248 0 0 1 0 1 1 1 1 047
30 1 1 1 1 0 1 0 0 244 0 1 0 0 0 1 1 1 071
40 1 1 1 1 0 0 0 0 240 0 1 0 1 1 1 1 1 095
50 1 1 1 0 1 1 0 0 236 0 1 1 1 0 1 1 1 119
60 1 1 1 0 1 0 0 0 232 1 0 0 0 1 1 1 1 143
70 1 1 1 0 0 1 0 0 228 1 0 1 0 0 1 1 1 167
80 1 1 1 0 0 0 0 0 224 1 0 1 1 1 1 1 1 191
90 1 1 0 1 1 1 0 0 220 1 1 0 1 0 1 1 1 215
100 1 1 0 1 1 0 0 0 216 1 1 1 0 1 1 1 1 239
110 1 1 0 1 0 1 0 1 213 0 0 0 0 0 1 1 1 007
120 1 1 0 1 0 0 0 1 209 0 0 0 1 1 1 1 1 031
Table 22: Jog Override data
Enter the above G11 and G10 values in the table of CODB instruction
corresponding to the input data address of R5.
R5 data is obtained from X16 after omitting the parity bit by using MOVE
instruction
67
Basic CNC/PMC interfacing Manual
Net 2:CODB instruction for G10 signal. Here, R5 indicates the location of the data of
the table which should be moved to G10
Net 3: CODB instruction for G11 signal: Here, R5 indicates the location of the data
of the table which should be moved to G11.
68
Basic CNC/PMC interfacing Manual
Enter the table with the data calculated for different federate explained in previous
section.
Incase if we are going to combine G10 and G11 signals together as a 2 byte
instruction the values to be filled in the table are as follows
% Value to be entered
1 -101
2 -201
4 -401
6 -601
8 -801
10 -1001
69
Basic CNC/PMC interfacing Manual
15 -1501
20 -2001
30 -3001
40 -4001
50 -5001
60 -6001
70 -7001
80 -8001
90 -9001
100 -10001
110 -11001
120 -12001
70
Basic CNC/PMC interfacing Manual
This signal selects the distance traveled per pulse from the manual pulse
generator during the manual handle feed or manual handle interrupt. It also selects
the distance traveled per incremental feed step. The table below lists the
signal-to-distance correspondence.
71
Basic CNC/PMC interfacing Manual
72
Basic CNC/PMC interfacing Manual
73
Basic CNC/PMC interfacing Manual
6 Functional instructions
74
Basic CNC/PMC interfacing Manual
It should be specified once in a sequence program, either at the end of the 1st
level sequence, or at the beginning of the 2nd level sequence when there is no 1st
level sequence.
75
Basic CNC/PMC interfacing Manual
We should specify this instruction at the end of the 2nd level sequence.
76
Basic CNC/PMC interfacing Manual
We should specify this command at the end of the 3rd level sequence program.
If there is no 3rd level sequence program, this instruction need not be specified.
77
Basic CNC/PMC interfacing Manual
78
Basic CNC/PMC interfacing Manual
79
Basic CNC/PMC interfacing Manual
The timer number specified in the parameter is a number displayed on the timer
screen. The data type in this instruction is binary type.
EXAMPLE
In the above example, once the lubrication motor (Y2.0) is turned on, timer
starts timing operation. Once the preset time is reached, the output R604.2 will be
turned on, which can be used to turn off the lubrication motor.
The pre set value of the timer can be changed in the timer screen, so that his timer
is named as variable timer. The user can change this preset time value if required.
80
Basic CNC/PMC interfacing Manual
This timer is used as a fixed on-delay timer. Time present in this fixed timer is
written to the memory together with the sequence program, so the time once set
cannot be changed without editing the ladder.
Control condition
The timer numbers and the setting time range are as shown below.
The output W1 is turned on after certain time preset in the parameter of this
instruction pasts after ACT = 1. The designer can freely decide the address of W1.
81
Basic CNC/PMC interfacing Manual
Example
In the above step, when the pedal switch for chuck clamp/decamp is pressed,
it should enable hydraulic motor control switch by which chuck will be operated. This
operation will be monitored by feedback system.
If there is any failure or delay in the hydraulic circuit, there will be no feedback
signal. Then the above timer starts. If there is no feedback for 3000 millisecond,
R91.2 will be high by which we will get alarm as “1026 Hydraulic system failure”.
Here the timer preset value is fixed by the machine tool builder and it can’t be
changed by the user.
82
Basic CNC/PMC interfacing Manual
Control conditions
84
Basic CNC/PMC interfacing Manual
EXAMPLE
The number of work pieces to be machined is counted. When the number
reaches the preset count, a signal is output.
• L1 is a circuit to make logic 1.
• Since the count ranges from 0 to 9,999, contact B of L1 is used for making
CNO = 0.
• Since it is to be up counter, contact B of L1 is used make UPD = 0.
• The reset signal of the counter uses input signal CRST.M from the machine
tool.
• The count signal is M30X, which was decoded from the NC output M code.
M30X contains contact B of CUP to prevent counting past the pre set value, as
long as reset is not enabled after count up.
85
Basic CNC/PMC interfacing Manual
The function of the fixed counter is same as variable counter. But the pre set
value will be fixed and entered in the instruction itself which cannot be easily
modified by the user.
Example, this counter can be used for turret indexing in combination with COIN
instruction, for turret indexing, the no. of tools can be set as a preset value which is
not required to change by the user.
86
Basic CNC/PMC interfacing Manual
The MOVB instruction transfers 1-byte data from a specified source address to
a specified destination address.
87
Basic CNC/PMC interfacing Manual
ANDs logical multiplication data and input data, and outputs the results to a
specified address. It can also be used to remove unnecessary bits from an eight-bit
signal in a specific address, etc.
Execution command
88
Basic CNC/PMC interfacing Manual
Consider a code signal(like parity bit) and another signal co-exist at address
X35 for an input signal from the machine tool. To compare the code signal and a
code signal of another address, the rest of signals in address X35 should be
removed. Thus, the MOVE instruction can be used to transfer the only code signal of
address X35 to address R210.
89
Basic CNC/PMC interfacing Manual
This instruction displays messages on the CNC screen. We can also specify the
message number to generate an alarm in the CNC. We can program up to 2000
messages. We must use the special message addresses in the program to simplify
use of the messages.
If we set any bit of the message display request memory (addresses A) to "1"
when ACT = 1, the instruction displays the message data defined in the message
data table corresponding to that bit.
90
Basic CNC/PMC interfacing Manual
This memory locates at the address A9000 to A9249 and has 2000 bits. Each
bit corresponds to a message. While displaying a message in CNC screen, the
corresponding bit is set to 1.
This table stores messages corresponding to the message display request bits.
The table is stored in the EPROM together with the sequence program. Message
data table numbers correspond to the message display request memory addresses.
(iv)Message number
This message number consisting of 4 digits must always be defined at the start
of each message data.
Parameter (0)
Enter "0" as the input value in this location, if it is required to stop alarm/message
display. if the entered value is in the range between 1 and 2000, the messages will
be displayed.
91
Basic CNC/PMC interfacing Manual
92
Basic CNC/PMC interfacing Manual
Example
Consider the lubrication level sensor input is X40.0. The output address used to
create message “Lubrication level low” is A0.0
93
Basic CNC/PMC interfacing Manual
When the level of lubrication becomes less than the minimum value, the level sensor
will send signal to PMC as X40.0. When X40.0 becomes high, A0.0 also becomes
high which will lead to display of message in the message display screen which is
shown as follows
94
Basic CNC/PMC interfacing Manual
(b) Constant
IT is used to define constants in decimal format.
95
Basic CNC/PMC interfacing Manual
The NOT instruction inverts each bit of the contents of address A, and stores the
result at address B.
(b) Address A
Input data to be inverted bit by bit.
(c) Address B
The result of a NOT operation is stored starting at this address, and has the data
length specified in format specification.
96
Basic CNC/PMC interfacing Manual
At the end of the execution of above Net, the data present in the R100 will be
11101111 which is the binary equivalent of the decimal no. 239
Net2
At the end of the execution of the Net1, the content of R100 will be 11101111 which
will be inverted and the result 00010000 will be moved to X8.
Net3
Now as per the above Net, G8.4 will be high which indicates that the emergency is in
released condition.
97
Basic CNC/PMC interfacing Manual
This instruction performs binary addition between 1-, 2-, and 4-byte data.
Control conditions
Parameters
98
Basic CNC/PMC interfacing Manual
W1 goes on (W1=1) if the result of addition exceeds the specified data length. Then,
the result will be output and the overflow flag and other flags will be output to the
operation output register.
This register is set with data on operation. If register bit is on, they signify the
following operation data:
99
Basic CNC/PMC interfacing Manual
This instruction subtracts one data from another, both data being in the binary
format of 1, 2 or 4 bytes.
Fig.52
Control conditions
W1 goes on (W1=1) if the result of subtraction exceeds the specified data length.
Then, the result will be output and the overflow flag and other flags will be output to
the operation output register.
100
Basic CNC/PMC interfacing Manual
DECB decodes one, two, or four-byte binary code data. When one of the
specified eight consecutive numbers matches the code data, a logical high value
(value 1) is set in the output data bit which corresponds to the specified number.
Control conditions
(a) Command (ACT)
ACT=0: Resets all the output data bits.
ACT=1: Decodes data. Results of processing is set in the output data
address.
Parameters
101
Basic CNC/PMC interfacing Manual
Whenever M code is executed by the CNC, the following two actions will be
performed
1. CNC will generate one strobe signal.(F7.0)
2. The equivalent binary number for the type of M code will be available on
F10.
102
Basic CNC/PMC interfacing Manual
Example 1:
Net1
103
Basic CNC/PMC interfacing Manual
Net2
Example 2:
M04 S100;
1. When the CNC executes this command, it will generate F7.0 and the binary
equivalent of 04 (00000100) on F10.
3. In DECB instruction, as per the content of F10, the equivalent bit of output
address will be enabled (R20.4)
5. Then G70.4 signal will be used to generate G4.3 signal which indicates the
completion of M code operation to CNC
104
Basic CNC/PMC interfacing Manual
In DECB instruction, consider M code starting data as 31, code data is of 2 byte
length and output address as R25.
2. As per DECB instruction now R26.3 (10th bit from R25.0) will be high which
can be used to enable some output signal and G4.3.
3. Once G4.3 becomes high, the CNC will start execution of next block of part
program.
105
Basic CNC/PMC interfacing Manual
106
Basic CNC/PMC interfacing Manual
This instruction is used to control rotating elements including the tool post, ATC
(Automatic Tool Changer), rotary table, etc.
(b) Select the rotation direction via the shorter path or not. (DIR)
DIR=0: No direction is selected. The direction of rotation is only forward.
DIR=1: Selected. Refer rotating direction output (W1) described below for
details on the rotation direction.
We should specify the address which contains the number of indexing should be
performed
We should specify the address which contains the current position of the rotor
We should specify the address which contains the goal position (or command
value), for example the address storing the CNC output T code.
The result of the calculation, the number of steps for the rotor to rotate, the
number of steps up to the position one position before, or the position before the
goal will be in this address.
The direction of rotation for control of rotation via the shorter path is output
to W1. When W1=0, the direction is forward (FOR) when it is 1, reverse (REV)
direction.
108
Basic CNC/PMC interfacing Manual
• The goal position is specified with 32 bit binary code (address F26 to F29)
from NC.
• The current position is entered with the binary code signal (address X41)
from the machine tool.
• The result of calculating the position one position before the goal is output to
address R230 (work area).
• Operation starts with the output TF (address F7.3) from the NC • The binary
compare instruction (COMPB) is used to detect the deceleration and stop positions.
Net1
Net2
109
Basic CNC/PMC interfacing Manual
Net3,4 & 5
Here, the binary compare (COMPB) instruction is used to detect when the
deceleration of indexing should be started.
Net6 & 7
Here, the binary compare (COMPB) instruction is used to stop the indexing of
turret.
Net8 & 9
The above two Nets are for rotating the turret in forward or reverse direction as
per the output R228.1 from Net 2
110
Basic CNC/PMC interfacing Manual
This instruction compares 1, 2, and 4 byte binary data with one another. Results of
comparison are set in the operation output register (R9000).
Control condition
Parameters
(a) Format specification
111
Basic CNC/PMC interfacing Manual
The following table shows the relationship among the [input data], [data
compared], and operation output register.
112
Basic CNC/PMC interfacing Manual
This instruction is used to check whether the input value and comparison value
coincide. The value in this instruction will be in BCD. format.
Control conditions
Parameters
(a) Specification of input data format
0: Specifies input data as a constant.
1: Specifies input data as an address.
113
Basic CNC/PMC interfacing Manual
Example:
The counter current data can be compared with some fixed value using coincidence
check instruction and can be used to enable or disable some other function if
coincidence occurs using this instruction.
114
Basic CNC/PMC interfacing Manual
The DIFU instruction sets the output signal to 1 for one scanning cycle on a rising
edge of the input signal.
Detection result
(a) Output signal (OUT)
The output signal level remains at 1 for one scanning cycle of the ladder level where
this functional instruction is operating.
115
Basic CNC/PMC interfacing Manual
The DIFD instruction set the output signal to 1 for one scanning period on a
falling edge of the input signal.
Control conditions
(a) Input signal (ACT)
On a falling edge (1→0) of the input signal, the output signal is set to 1.
Detection result
(a) Output signal (OUT)
The output signal level remains at 1 for one scanning period of the ladder level
where this functional instruction is operating.
The above two instructions will be used when there is a need for triggering signals
(rising edge or falling edge) in the nets.
116
Basic CNC/PMC interfacing Manual
117
Basic CNC/PMC interfacing Manual
Net1
118
Basic CNC/PMC interfacing Manual
Net2, 3 & 4
F1.1 will become high, when Reset button on MDI unit is pressed.
X27.0 is the input address of CW button present in Machine operator panel
Y23.0 is the output address of CW LED present in the Machine operator panel
X27.1 is the input address of cycle stop button present in Machine operator panel
Y23.1 is the output address of cycle stop LED present in the Machine operator panel
X27.2 is the input address of CCW button present in Machine operator panel
Y23.2 is the output address of CCW LED present in Machine operator panel
G70.5 is the G signal for making the spindle in CW rotation
G70.4 is the G signal for making the spindle in CCW rotation
119
Basic CNC/PMC interfacing Manual
In Net2, if we command M04, R20.4 will become high which will enable G70.4
and spindle will start to rotate in counter clockwise rotation .Here, latching also
provided by means of G70.4.The same G70.4 signal can be activated by means of
CW button (X27.0). Now spindle rotation can be deactivated by means of Reset
button, M03 or by spindle stop(X27.1).
In Net3, if we command M03, R20.3 will become high which will enable G70.5
and spindle will start to rotate in counter clockwise rotation .Here, latching also
provided by means of G70.4.The same G70.4 signal can be activated by means of
CW button (X27.0). Now spindle rotation can be deactivated by means of Reset
button, M04 or by spindle stop(X27.1).
In Net4, the spindle stop LED (Y23.1) will be activated by input spindle stop
button (X27.1)
120
Basic CNC/PMC interfacing Manual
The speed of the spindle depends upon the value present in the address G30
7 6 5 4 3 2 1 0
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 %
G30 0 0 0 0 0 0 0 0 0
G30` 0 0 0 0 0 0 0 1 1
G30 0 0 0 0 0 0 1 1 5
G30 0 0 0 0 0 1 1 1 13
G30 0 0 0 0 1 1 1 1 29
G30 0 0 0 1 1 1 1 1 62
G30 0 0 1 1 1 1 1 1 126
G30 0 1 1 1 1 1 1 1 254
G30 1 1 1 1 1 1 1 1 0
The values present in the X16 and X17 are the Gray code. By using the following
nets, the values of the X inputs are moved to R200.
121
Basic CNC/PMC interfacing Manual
Net 1, 2, 3 &4
Then, the required data of G30 for different spindle speed are entered in the table of
CODB instruction.
Net 5
As per the above network, according to the data present in the R200, the table value
will be moved to G30 by which we will get different speed.
122
Basic CNC/PMC interfacing Manual
8 Special functions
123
Basic CNC/PMC interfacing Manual
The speed of the serial spindle is controlled by the spindle speed control function,
while the spindle positioning is controlled by the Cs contouring control function
("spindle contour control"). Spindle speed control rotates the spindle using the
velocity command, while the spindle contour control rotates the spindle using the
move command. Switching between spindle speed control and spindle contour
control is performed by the DI signal from the PMC.
In the Cs contour control mode, the Cs contour control axis can be operated either
manually or automatically, in the same way as normal Servo axes.
124
Basic CNC/PMC interfacing Manual
Ladder Diagram:
125
Basic CNC/PMC interfacing Manual
Test Program:
O8085;
M20;(Code for switching the spindle from speed mode to Cs contour control mode)
G00 C50.;
M21;(Code for releasing the spindle from Cs contour control mode)
M30;
After executing the above program, Spindle will be positioned at angle 50 degree
with respect to orientation position.
126
Basic CNC/PMC interfacing Manual
The function for spindle control with Servo motor allows a Servo motor to be used
for executing spindle speed commands and spindle functions such as rigid tapping.
Switching from Servo positioning mode to SERVO speed control mode can be
accomplished by following two methods.
127
Basic CNC/PMC interfacing Manual
Ladder Diagram:
128
Basic CNC/PMC interfacing Manual
Parameter Setting:
P11000#7=1 To enable the Servo-spindle function
P11006#0=1 To specify Servo axis act as a spindle and act as Servo position
control.
P11010= Number of an axis subject to spindle control with Servo motor
P11011= 360 Movement of Servo motor spindle per revolution
P11012= Enter the Spindle indexing speed
P11013= Enter position deviation limit during movement
P11014= Specify position deviation limit during stop
P11015= Enter the Servo motor speed
P11016= Time constant of acceleration/deceleration in SERVO speed control mode
P11017= FL rate of exponential acceleration/deceleration in SERVO speed control
mode
P11020=Acceleration/deceleration switching speed (1st) for each axis
P11021=Acceleration/deceleration switching speed (2nd) for each axis
P11030= Individual acceleration / deceleration 1 (Leg 1)
P11031= Individual acceleration / deceleration 2 (Leg 2)
P3701#SS2& ISI make 1 and 0 for specifying no of spindle
P 8133#MSP=1 to enable multi spindle function.
P3703=1 Spindle selection is done by programmed command
P3781= Enter the P code for selecting the spindle in multi-spindle control
P3741= Specify the Maximum spindle speed
Test Program:
O8086;
M03 S100 P2;
G04 X5;
M24;
M30;
After executing the above program Servo-spindle will be rotated with100rpm for 4
sec and get stopped.
129
Basic CNC/PMC interfacing Manual
Each Power mate manager axis occupies 128 bits I.e., 16 bytes of input X
address and 16 bytes of Y address
In the FAPT ladder software, I/O module menu, the Beta amplifier axis has
to be given a address
Example if the axis is to be addressed from X100 and Y100, Go to X100 ,
Y100 Addresses and write 0.0.1.OC02I for X and 0.0.1.OC02O for Y
Signals:
X: signal from PMM to PMC
Y: Signal to PMM from PMC
130
Basic CNC/PMC interfacing Manual
Note:
For the signal details, refer chapter no. 2.2 in the manual B- 65245EN/02
131
Basic CNC/PMC interfacing Manual
o After mode selection for jogging the Axis, select jog mode, make the
signal +X (Yn+0.4) or –X (Yn+0.5) as high it will take the Feedrate from
Parameter 41 and it will move.
For run in Auto Mode refer the function code, command data1 and command
Data2
Example: Absolute Positioning mode
Set mode in Auto
Move function code (Yn+2.4 to Yn+2.7 ) as value 5
Move command data1(Yn+2.0 to Yn+2.3) as 15 if we want to move axis in
rapid traverse set in the parameter 40. Move command data2 (Yn+3 to Yn+6)
as Axis Position Require to move.
After moving Above Values give one pulse to Cycle start (Yn+0.7)
132
Basic CNC/PMC interfacing Manual
133
Basic CNC/PMC interfacing Manual
Ladder Diagram:
134
Basic CNC/PMC interfacing Manual
135
Basic CNC/PMC interfacing Manual
136
Basic CNC/PMC interfacing Manual
Test program
O8087;
M48 B50000;
M30;
After executing the above program, the additional axis (PMM axis) will be
positioned in the specified position.
137