KEMBAR78
Basic CNCPMC Interfacing Manual | PDF | Input/Output | Computer Program
0% found this document useful (0 votes)
128 views137 pages

Basic CNCPMC Interfacing Manual

The Basic CNC/PMC Interfacing Manual provides comprehensive guidance on the configuration and interfacing of Programmable Machine Controllers (PMC) with CNC systems. It covers topics such as I/O device interfacing, basic instructions, mode selection, axis control, and functional instructions, along with detailed signal address specifications. The manual serves as a resource for understanding the sequence control operations essential for machine tools.

Uploaded by

yout40931
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views137 pages

Basic CNCPMC Interfacing Manual

The Basic CNC/PMC Interfacing Manual provides comprehensive guidance on the configuration and interfacing of Programmable Machine Controllers (PMC) with CNC systems. It covers topics such as I/O device interfacing, basic instructions, mode selection, axis control, and functional instructions, along with detailed signal address specifications. The manual serves as a resource for understanding the sequence control operations essential for machine tools.

Uploaded by

yout40931
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 137

Basic CNC/PMC interfacing Manual

Basic CNC/PMC 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

3.2 Graphic Symbols..................................................................... 39


3.3 Examples using basic instructions ....................................... 40
3.3.1 Example: 1 ............................................................... 40
3.3.2 Example: 2 ............................................................... 40
3.3.3 Example: 3 ............................................................... 41
3.4 Cycle start operation .............................................................. 43
3.5 Feed hold operation ................................................................ 44
3.6 Single Block operation ........................................................... 45
3.7 Machine lock - all axes ........................................................... 47
3.8 DRY Run operation ................................................................. 48
3.9 BLOCK SKIP Function ............................................................ 49
4 Mode selection techniques ............................... 50
4.1 Mode selection logic ............................................................... 51
4.1.1 Procedure: ............................................................... 51
4.1.2 Signals for mode selection .....................................51
4.1.3 Mode selection signals and corresponding
check signals .......................................................... 52
4.1.4 Mode selection ........................................................ 52

5 Axis Selection Procedure.................................. 58


5.1 Axis selection – related signals ............................................. 59
5.1.1 Signal addresses for axis selection ....................... 59
5.1.2 Explanation of signals ............................................ 59
5.2 Axes selection logic ................................................................ 60
5.2.1 X axis selection ....................................................... 60
5.2.2 Z axis selection........................................................ 61
5.3 AXIS CONTROL ....................................................................... 62
5.3.1 JOG OVERRIDE CONTROL.....................................63
5.3.2 Use of CODB (Binary Code Conversion: SUB 27)
instructions ............................................................. 64
5.3.3 Manual feed rate override signal *JV0 to
*JV15<G0010,G0011> ............................................. 65
3
Basic CNC/PMC interfacing Manual

5.3.4 Axes control logic ................................................... 67


5.4 Incremental jog feed amount selection signals
(Incremental feed signals) ..................................................... 71
5.4.1 Incremental Jog feed control logic ........................ 71

6 Functional instructions ..................................... 74


6.1 END1(1st Level Sequence Program End:SUB 1) .................. 75
6.2 END2 (2nd Level Sequence Program End: SUB 2) ............... 76
6.3 END3 (3rd Level Sequence Program End: SUB 48) .............. 77
6.4 6.4 END (End of a Ladder Program: SUB 64) ........................ 78
6.5 Variable timer .......................................................................... 79
6.6 Fixed timer ............................................................................... 81
6.7 Variable counter ...................................................................... 83
6.8 Fixed counter........................................................................... 86
6.9 MOVB (Transfer of 1 Byte: SUB 43) ....................................... 87
6.10 MOVE (Logical Product Transfer: SUB 8) ............................. 88
6.11 DISPB (Display Message: SUB 41) ........................................ 90
6.12 NUMEB (Definition of Binary Constants: SUB 40) ................ 95
6.13 NOT (Logical NOT: SUB 62) .................................................... 96
6.14 ADDB (Binary Addition: SUB 36) ........................................... 98
6.15 SUBB (Binary Subtraction: SUB 37) .................................... 100
6.16 DECB (Binary Decoding: SUB 25) ........................................ 101
6.16.1 M code decoding operation: ................................. 102
6.17 CODB instruction .................................................................. 106
6.18 ROTB (Binary Rotation Control: SUB 26) ............................ 107
6.19 COMPB (Comparison Between Binary Data: SUB
32) ........................................................................................... 111
6.20 COIN (Coincidence Check: SUB 16) .................................... 113
6.21 DIFU (Rising Edge Detection: SUB 57) ................................ 115
6.22 DIFD (Falling Edge Detection: SUB 58) ............................... 116
7 Spindle direction selection and speed
control ...............................................................117
7.1 Spindle rotation direction selection .................................... 118
7.2 Spindle speed control ........................................................... 121
8 Special functions ............................................. 123
8.1 Spindle contour control function ......................................... 124
8.2 Servo Spindle function: ........................................................ 127
4
Basic CNC/PMC interfacing Manual

8.3 PMM axis configuration ........................................................ 130

5
Basic CNC/PMC interfacing Manual

1 Introduction to PMC

6
Basic CNC/PMC interfacing Manual

1.1 Programmable machine controller

The programmable machine controller (PMC) is a programmable controller built


into a CNC to perform sequence control for a Machine tool (spindle rotation, tool
change, machine operator's panel control, and so on).

Sequence control is to perform control steps successively in a predetermined


sequence or according to the logic operation. Programs for performing sequence
control for machine tools are called sequence programs. Generally, sequence
programs coded in the Ladder language are used.

7
Basic CNC/PMC interfacing Manual

1.2 Basic Configuration of PMC

Fig.1 Basic configuration of PMC


The sequence program reads input signals, performs operations, and outputs results
in a predetermined sequence.

PMC Signal Addresses

Fig.2 PMC signal addresses

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.

Table 1: Address Symbols and signal types

(1) Addresses of signals between the PMC and CNC (F and G)


These addresses are assigned to interface signals between the CNC and PMC.
The relationships between the signals and addresses are defined by the CNC.
F indicates an input signal from the CNC to PMC.
G indicates an output signal from the PMC to CNC.

(2) Addresses of signals between the PMC and machine (X and Y)


I/O signals exchanged with an externally connected machine can be assigned
to any addresses within an available range to control the machine.
X indicates an input signal from the machine to PMC.
Y indicates an output signal from the PMC to machine.

9
Basic CNC/PMC interfacing Manual

(3) Addresses of internal relays and extra relays (R and E)


These addresses are used to temporarily store operation results during
sequence program execution processing.
The address locations of internal relays also include a reserved area used by
the PMC system software. The signals in the reserved area cannot be written by
sequence programs.
(4) Signal addresses for message display (A)
Instruction “DISPB” used in sequence programs include addresses to display a
message on the CNC screen. These addresses are used by such instructions.
(5) Nonvolatile memory addresses
The contents of these address locations are not erased even when the power
is turned off.
These addresses are used for management of the data items listed below.
These data items are called PMC parameters.
(a) Variable timer (T)
(b) Counter (C)
(c) Keep relay (K)
A reserved area used by the PMC system software is partly
included.
(d) Data table (D)
(6) Other addresses
(a) Label number (L)
Sequence program instructions include an instruction to cause a jump to a
specified position in the middle of processing. This address indicates the jump
destination used by this instruction. The contents of L address cannot be
read/written in sequence program.
(b) Subprogram number (P)
In sequence programs, a main program can call subprograms.
P addresses indicate the numbers of these subprograms. The contents of P address
cannot be read/written in sequence program.

10
Basic CNC/PMC interfacing Manual

Graphic Symbols of Contacts and Coils


Table 2: Contacts

Table 3: Coils

These instructions perform a 1-bit operation and are called basic instructions.

11
Basic CNC/PMC interfacing Manual

Processing Priority (1st Level, 2nd Level, and 3rd Level)


A sequence program consists of two operation parts: a high-speed
sequence part called the 1st level, which is executed every several msec, and a
normal sequence part called the 2nd level. When the model used allows use of the
3rd level, the 3rd level sequence part is added.

Fig. 3 Sequence program structure


The 1st level sequence part is a high-speed sequence part that is executed
every ladder execution cycle. The ladder execution cycle is 8 msec, which is set in a
CNC parameter. If the execution of the 1st level program requires a long time, the
overall execution time including the 2nd level (sequence processing time) is
extended. So, the 1st level sequence part should be created so that it can be
processed in a short time where possible. The 2nd level sequence part is executed
every (ladder execution cycle × n) msec (where n is the number by which the 2nd
level is divided). The 3rd level sequence part is executed when the PMC is idle.

12
Basic CNC/PMC interfacing Manual

(1) Division of the 2nd level program


The 2nd level program must be divided to execute the 1st level program. The
order of sequence program execution is illustrated in above fig.3, where the number
of divisions is assumed to be n. After the last division (division n) of the 2nd level
program is executed, the sequence program is executed from the beginning.
Therefore, when the number of divisions is n, the execution cycle of the overall
sequence program is expressed as the ladder execution cycle × n msec.
As the amount of the 1st level sequence part increases, the amount of the 2nd
level sequence portion executed within the ladder execution cycle decreases. As a
result, the number of divisions n increases, which increases the overall execution
time including the 2nd level (sequence processing time). Therefore, the 1st level
sequence program part should be minimized where possible. The division number of
2nd level may be indefinite because of changing of the working condition of
functional instructions in 1st level and 2nd level.

(2) 1st level sequence part


Only high-speed sequence processing such as processing of a pulse signal
with a short signal width in time is performed. These signals include emergency stop
and feed hold signals.

Fig. 4 Scanning sequence


(3) 3rd level sequence part
The 3rd level sequence processing is performed during the remaining time
from the end of the last division (n) of the 2nd level until the 1st level processing
restarts. It is possible to program the 3rd level, but the execution cycle period of time

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.

Basic specifications of PMC


System timers
Four signals can be used as system timers.
Their specifications are as follows.

Fig.5 System timers – output signals

14
Basic CNC/PMC interfacing Manual

Table 4: Basic specifications of PMC

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.

3 This area is used to specify the precision of a variable timer.


- We should not modify the value of timer and precision except for writing
same value when working the timer.
- We should not set the value other than the following range.
- If above rules are violated, the working of the timer is not guaranteed.
- Other than the range from T9000 to T9999 are reserved.

The value of precision


0: Default (8msec or 48msec)
1: 1msec
2: 10msec
3: 100msec
4: 1sec
5: 1min

16
Basic CNC/PMC interfacing Manual

Internal Relay Addresses (R)

The following table lists the number of signals (bytes) that can be used as
internal relays.

Table:5 Relay addresses

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).

Table: 6 Message addresses

17
Basic CNC/PMC interfacing Manual

System Keep Relay Addresses (K)

Table: 7 Keep relay address

Data Table Addresses (D)

PMC sequence control sometimes requires a sizable amount of numeric data


(hereinafter referred to as data table). If the contents of a data table can be set or
read freely, they can be used as various PMC sequence control data, such as tool
numbers of tools on the ATC magazine.
Data set in data tables can also be easily read and written with the
sequence program using functional instructions such as data search (DSCHB) and
index modification data transfer (XMOVB).

Table: 8 Data table addresses

18
Basic CNC/PMC interfacing Manual

Subprogram Number Addresses (P)

These addresses are used to specify jump destination subprogram


labels in the CALL, CALLU and CM instructions.

Table :9 Address of Subprogram number

Label Number Addresses (L)

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).

Table: 10 Address of Labels

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

Keep relay addresses

Table: 11 Keep relay addresses


K0 – K99 are called as user defined keep relays. It can be used to enable or
disable some special features. The Machine tool builder can develop common
logic including standard functions like turret indexing, pallet changing etc. as a sub
programs, which can be enabled or disabled by means of Keep relays.. In that
particular machine if that specific function is available, that can be enabled by
corresponding keep relay.

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

2 Interfacing I/O devices

22
Basic CNC/PMC interfacing Manual

2.1 I/O LINK CONNECTION

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.

Fig.7 Group/base/slot concepts

1) The I/O Link consists of one master and multiple slaves.


Master: CNC
Slaves: I/O Unit-MODEL A, Power Mate, operator's panel connection unit and
other devices

2) Up to 16 groups of slaves can be connected to one I/O Link.


Group numbers 0 to 15 are sequentially assigned. Number 0 is assigned to
23
Basic CNC/PMC interfacing Manual

the group nearest to the master.


The number of connected slaves in a group differs depending on the types of slaves.
Numbers of Input Points and of Output Points of the I/O Link

Table: 12

Table: 13

24
Basic CNC/PMC interfacing Manual

2.2 Setting the connection location

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.)

Assignment method (Type I)

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

For the slot number, always assign 1.

Table 14: Module Name


Examples of Assignment

1. To connect Power Mate i-D with 256/256 points in group 1:


Enter 1.0.1.OC03I for input and 1.0.1.OC03O for output.

2. To connect Power Mate i-D with 224/2224 points in group 2:


Enter 2.0.1. /28 for input and 2.0.1. /28 for output.

3. To connect an I/O Link β amplifier in group 1:


Enter 1.0.1.OC02I for input and 1.0.1.OC02O for output.

Fig.8 Group/base/slot examples


Note
For details of interfacing of other I/O devices please refer the manual “Ladder
Language Programming” .of corresponding system.
26
Basic CNC/PMC interfacing Manual

2.3 Interfacing I/O Devices

Fig.9 Interfacing of I/O devices

27
Basic CNC/PMC interfacing Manual

2.4 Connection of I/O units with 0i Systems

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

Fig. 9 DI/DO mapping

28
Basic CNC/PMC interfacing Manual

2.4.1 I/O unit configuration

Fig. 10 I/O unit for 0i

29
Basic CNC/PMC interfacing Manual

2.4.2 2.5.2. Pin addresses of I/O unit

Fig. 11 I/O unit pin details

30
Basic CNC/PMC interfacing Manual

2.5 CONNECTION TO STANDARD MACHINE


OPERATOR'S PANEL

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

Operator's panel with switches such as an emergency stop switch, memory


protect switch, and rotary switch for override together will form sub panel.

Fig. 12 FANUC machine operator panel

31
Basic CNC/PMC interfacing Manual

2.5.1 Keyboard of main panel

I/O address of Key switches and LED on the keyboard of Main panel are as
follows.

Fig. 13 I/O addresses of MOP


From the above two tables of previous page, it is easy to find the address of the
each button. The row and column name of the button should be matched in the
first table and we can fine the address.

For Example to find the address of the Remote button, the row/column
number is (A4)

m : specifies the input starting address of the MOP (Assume as 16)


n : specifies the output starting address of the MOP(assume as 16)
So that for Remote button the address will be X20.3 and Y16.3

Fig.14 FANUC MOP switches/LED


32
Basic CNC/PMC interfacing Manual

2.5.2 Override signals

When a Sub panel is used, gray code is output from each rotary switch
according to the following table:

Rotary switch (SA1)

Fig. 15 Rotary switch –SA1 addresses


Here,Xm+0.5 is a parity bit.

Rotary switch (SA2)

Here, Xm+1.2 is a parity bit.


Fig.16 Rotary switch SA2 addresses

33
Basic CNC/PMC interfacing Manual

2.5.3 I/O Mapping for Machine operator panel

Fig. 17 I/O mapping for MOP

By using the above details we can find the input/output


addresses for various switches and LEDs which can be used for creating
logic for the CNC.

34
Basic CNC/PMC interfacing Manual

3 Basic Instructions

35
Basic CNC/PMC interfacing Manual

3.1 Introduction to ladder

3.1.1 Procedure to enable the cursor over the ladder (PMC-1)

1. Press the function key SYSTEM in the MDI unit


2. Press the soft key right arrow 3 times.
3. Press the soft key PMCLAD
4. Press the soft key Ladder
5. Press the soft key operate
6. Press right arrow soft key
7. Press setting soft key
8. Make SHOW CURSOR option as on.
9. Press the soft key EXIT

Now the cursor will appear over Ladder.

3.1.2 Procedure to create a new Net in the existing ladder


(PMC-1)

1. Press the function key SYSTEM in the MDI unit


2. Press the soft key right arrow 3 times.
3. Press the soft key PMCLAD
4. Press the soft key Ladder
5. Press the soft key operate
6. Place the cursor on the existing Net which should be successive to the new
Net.
7. Press the soft key EDIT
8. Press the soft key create
9. Insert necessary input and output coils
10. Press the right arrow soft key 2 times.
11. Press the soft key EXIT
12. Press the right arrow soft key 3 times.
13. Press the soft key EXIT
14. Press the soft key YES
15. Again press the soft key YES

Now the new Net will be in Ladder.

3.1.3 Procedure to search an input address (PMC-1)


1. Press the function key SYSTEM in the MDI unit.
2. Press the soft key right arrow 3 times.
3. Press the soft key PMCLAD
36
Basic CNC/PMC interfacing Manual

4. Press the soft key Ladder


5. Press the soft key operate
6. Type the address to be found, for example X20.0
7. Press the soft key search
Now the cursor will be on the input X20.0. If the searched address is not
in the ladder, then the message “The address in not found” will be
displayed.

3.1.4 Procedure to search an output address (PMC-1)


1. Press the function key SYSTEM in the MDI unit.
2. Press the soft key right arrow 3 times.
3. Press the soft key PMCLAD
4. Press the soft key Ladder
5. Press the soft key operate
6. Press the soft key SEARCH
7. Type the address to be found, for example G8.4
8. Press the soft key w-search
Now the cursor will be on the output G8.4. If the searched address is not
in the ladder, then the message “The address is not found” will be
displayed. The output coil can also be found using SEARCH Soft key
instead of W-SEARCH.

3.1.5 Procedure to search the functional instructions (PMC-1)


1. Press the function key SYSTEM in the MDI unit.
2. Press the soft key right arrow 3 times.
3. Press the soft key PMCLAD
4. Press the soft key Ladder
5. Press the soft key operate
6. Press the soft key SEARCH
7. Type the name of the functional instruction to be found. For example TMR
8. Press the soft key F-SRCH
9. Now the cursor will be in the first TMR instruction present in the ladder.
10. Press the soft key F-Search continuously until the required TMR
instruction will be displayed.

3.1.6 Use of Collective monitor screen

Collective monitor is the screen on which the selected Net functions can be
visualized.

1. Press the function key SYSTEM present in the MDI unit.


2. Press the soft key right arrow 3 times.

37
Basic CNC/PMC interfacing Manual

3. Press the soft key PMCLAD


4. Press the soft key Ladder
5. Press the soft key operate
6. Press the soft key SEARCH
7. Place the cursor over the line to be monitores.
8. Press the soft key PICKUP
9. Press the right arrow soft key
10. Press the soft key EXIT
11. Press the soft key list
12. Place the cursor over COLLECT
13. Press the soft key ZOOM

Now we can visualize the Nets which we have selected.

To clear the entries of collective monitoring screen


14. Press the right arrow key
15. Select DELALL
16. Press the soft key YES
Now the Nets present in the collective monitoring screen will be cleared.

3.1.7 The important points to be considered for creating the


ladder

1. The number of nets in the 1st level should be as min. as possible..


2. The number of interlock coils should be as min. as possible. If it is
required we can provide intermediate relay and the interlocks can be inserted in the
next net.
3. Sub program should be used as much as possible which will lead to
reduction in scanning time of the second level.
4. Output coil addresses should not be used more than once in the entire
logic.
5. Symbol descriptions should be used as much as possible for input contacts
and output coils by which the logic can be understood easily.
6. Messages should be created as much as possible like turret indexing is
under progress; Pallet changing is under progress, etc.

38
Basic CNC/PMC interfacing Manual

3.2 Graphic Symbols

Table 15 :Contacts

Table 16: Coils

39
Basic CNC/PMC interfacing Manual

3.3 Examples using basic instructions

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.

Consider the input address is X10.0. Output address is Y20.0

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.

Consider the input address is X15.0. Output address is Y25.0

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.

Fig. 18 Hydraulic circuit for chuck control

A, B = Push buttons (corresponding inputs X1.0 &X2.0)


S1, S2 = Solenoids (corresponding outputs Y1.0 &Y2.0)

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

Consider the following logic.

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

3.4 Cycle start operation

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

3.5 Feed hold operation

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

3.6 Single Block operation

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.

So, the logic should be function as follows

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.

Consider the following Nets

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

G46.1 = G signal for single block operation


Y16.4 = the output LED address of single block in machine operator panel

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

3.7 Machine lock - all axes

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.

X21.1 is the input address for Machine lock button


Y17.1 is the output address.
R11.0 and R11.1are intermediate relays
G44.1 is the G signal for selecting the machine lock operation.

47
Basic CNC/PMC interfacing Manual

3.8 DRY Run operation


If this input is selected, axes movement will be as per the dry run feed rate
which is mentioned in the parameter 1410.
If this option is not selected, the time taken for the simulation of the part
program and the movement of axes during some checking function will be same as
program execution time. So, by selecting this function, we can reduce the idle time
of the machine.
The logic for this operation will be same like single block and machine lock
operation which is shown as follows

X21.2 is the input address for Machine lock button


Y17.2 is the output address.
R53.0, R53.1, R53.2 are intermediate relays
G46.7 is the G signal for selecting the dry run operation.

48
Basic CNC/PMC interfacing Manual

3.9 BLOCK SKIP Function

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

X20.5 is the input address for Machine lock button


Y16.5 is the output address.
R51.0, R51.1, R51.2 are intermediate relays
G44.0 is the G signal for selecting the block skip lock operation.

49
Basic CNC/PMC interfacing Manual

4 Mode selection techniques

50
Basic CNC/PMC interfacing Manual

4.1 Mode selection logic

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.

3. Whenever a particular mode is selected in MOP, the status of the


corresponding input address will be changed.

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.

4.1.2 Signals for mode selection

Fig.19 Signals used for mode selection

Signal for checking incremental feed selection MINC<F0003.0>


Signal for checking manual handle feed selection MH<F0003.1>
Signal for checking jog feed selection MJ<F0003.2>
Signal for checking manual data input selection MMDI<F0003.3>
Signal for checking DNC operation selection MRMT<F0003.4>
Signal for checking memory operation selection MMEM<F0003.5>
Signal for checking program edit selection MEDT<F0003.6>
TEACH IN selection check signal MTCHIN<F0003.7>
Signal for checking manual reference position return selection
MREF<F0004.5>

51
Basic CNC/PMC interfacing Manual

4.1.3 Mode selection signals and corresponding


check signals
(A hyphen (-) indicates that the mode is not related to the status of the signal.)
Table 17: MODE SELECTION

4.1.4 Mode selection

Step 1: Find the input/output (X/Y) addresses of each mode


Assume Input and output starting address of Machine operator panel is 16
Then, the input and output address for the mode selection button as follows
Mode Input address Output address Intermediate relays
Auto(Mem) X20.0 Y16.0 R0.0
Edit X20.1 Y16.1 R0.1
MDI X20.2 Y16.2 R0.2
Remote X20.1 Y16.3 R0.3
Reference X22.4 Y18.4 R0.4
Jog X22.5 Y18.5 R0.5
Inc Jog X22.6 Y18.6 R0.6
Teach X22.7 Y18.7 R0.7
Table :18 I/O addresses for mode selection

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

EDIT mode (Net 1)

Here X20.1 is the input address for EDIT button available in MOP

X20.0, X20.2, X20.3, X22.4,X22.5,X22.6 and X20.7 are corresponding input


addresses of AUTO, MDI, RMT, REF, JOG, INC and HNDL mode.

Y16.1 is the output address of LED over EDIT button present in MOP

Auto Mode (Net 2)

R0.0 – intermediate relay for Auto mode input signal


Y16.0 – Output LED address of Auto mode

MDI Mode (Net 3)

53
Basic CNC/PMC interfacing Manual

R0.2 – intermediate relay for MDI mode input signal


Y16.2 – Output LED address of MDI mode
RMT Mode (Net 4)

R0.3 – intermediate relay for RMT mode input signal


Y16.3 – Output LED address of RMT mode

REF Mode (Net 5)

R0.4 – intermediate relay for Auto mode input signal


Y16.4 – Output LED address of Auto mode

JOG Mode(Net 6)

R0.5 – intermediate relay for Jog mode input signal


Y16.5 – Output LED address of Jog mode

54
Basic CNC/PMC interfacing Manual

INC Mode (Net 7)

R0.6 – intermediate relay for INC mode input signal


Y16.6 – Output LED address of INC mode

HNDL Mode(Net 8)

R0.7 – intermediate relay for HNDL mode input signal


Y16.7 – Output LED address of HNDL mode

55
Basic CNC/PMC interfacing Manual

Creating G signals using intermediate relays of different modes


(Net 9)

(Net 10)

56
Basic CNC/PMC interfacing Manual

(Net 11)

(Net 12)

(Net 13)

Table 18: Mode selection


57
Basic CNC/PMC interfacing Manual

5 Axis Selection Procedure

58
Basic CNC/PMC interfacing Manual

5.1 Axis selection – related signals

5.1.1 Signal addresses for axis selection

Fig.20 Signal addresses for axis selection

5.1.2 Explanation of signals

Address Signal Name Symbol


G100.0~G100.4 Feed axis and direction selection + J1~+J5
signals
G102.0~G102.4 Feed axis and direction selection -J1~-J5
signals
G010,G011 Manual feed rate override signals *JV0~*JV15
G012 Feed rate override signals *FV0~*FV7
Table 19: Explanation of signals

59
Basic CNC/PMC interfacing Manual

5.2 Axes selection logic

X25.4/Y21.4 = Input/output address of MOP for X axis selection button


X25.6/Y21.6 = Input/address address of MOP for Z axis selection button
X27.0 = Input address for direction + button
X27,2 = Input address for direction - button

5.2.1 X axis selection

R10.0 = an intermediate relay for X axis selection

60
Basic CNC/PMC interfacing Manual

5.2.2 Z axis selection

R10.1 is an intermediate for Z axis

61
Basic CNC/PMC interfacing Manual

5.3 AXIS CONTROL

Table 20: Axis selection


+J1 = 1st axis positive direction (X axis )
+J2 = 2nd axis positive direction (Z axis)
ROV1, ROV2 = Rapid override
RT = Rapid traverse
- J1 = 1st axis negative direction (X axis )
-J2 = 2nd axis negative direction (Z axis)
MP1, MP2 = Incremental distance selection
*JV0 - *JV15 = Jog override selection in percentage

62
Basic CNC/PMC interfacing Manual

5.3.1 JOG OVERRIDE CONTROL

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.

Fig. 21 MOVE instruction


The data present in the intermediate address R5 is in gray format,

63
Basic CNC/PMC interfacing Manual

5.3.2 Use of CODB (Binary Code Conversion:


SUB 27) instructions

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.

Fig. 22 CODB instruction


Control conditions
(a) Reset (RST)
RST=0: Do not reset.
RST=1: Reset error output W1 (W1=0).

(b) Activate command (ACT)


ACT=0: Do not execute CODB instruction
ACT=1: Execute CODB instruction.

Parameters

(a) Format designation


It designates binary numerical size in the conversion table.
1: Numerical data is binary 1-byte data.
2: Numerical data is binary 2-byte data.
4: Numerical data is binary 4-byte data.

(b) Number of conversion table data

It designates size of conversion table. 256 (0 to 255) data can be made.

(c) Conversion input data address


Data in the conversion data table can be taken out by specifying the table
number. The address specifying the table number is called conversion input data
address

64
Basic CNC/PMC interfacing Manual

(d) Conversion data output address

Address to output data stored in the specified table number is called


conversion data output address.

5.3.3 Manual feed rate override signal *JV0 to


*JV15<G0010,G0011>

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.

Table 21: Jog over-ride function

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 %

120% = 0.01% X 12000

Step 1: Find the binary value of 120


12000 = 10111011100000

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

Step3: Complement the result obtained


1101 0001 0001 1111

Step4: Move MSB 8 bits to G11 and LSB 8 Bits to G10


The above data in G10 and G11 will result into 120% of feed rate. By using the
above procedure we can calculate the values of G10 and G11 for other
percentages.

66
Basic CNC/PMC interfacing Manual

The results for the other percentages will be as follows

% 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

5.3.4 Axes control logic


Net1: X16 data is moved to R5 without parity bit.

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

5.4 Incremental jog feed amount selection signals


(Incremental feed signals)
MP1, MP2<G0019.4,5>

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.

Table 23: Incremental feed selection

5.4.1 Incremental Jog feed control logic

Incremental Input switch Output LED Intermediate


distance (micron) address address relays
1 X23.0 Y19.0 R9.0
10 X23.1 Y19.1 R9.1
100 X23.2 Y19.2 R9.2
1000 X23.3 Y19.3 R9.3

Table 24: I/O addresses for incremental feed selection

Net 1: For 1 micron inc. selection

71
Basic CNC/PMC interfacing Manual

Net 2: For 10 micron inc. selection

Net 3: For 100 micron inc. selection

Net 4: For 1000 micron inc. selection

R0.0 = Inc. jog mode


R0.1 = Handle mode
Selection of MP1, MP2 signals

72
Basic CNC/PMC interfacing Manual

G19.4 and G19.5 are G signals for incremental feed selection


Incremental MP1(G19.4) MP2(G19.5)
distance (micron)
1 0 0
10 0 1
100 1 0
1000 1 1
Table 25: status of G19.4 and G19.5 for feed selection

73
Basic CNC/PMC interfacing Manual

6 Functional instructions

74
Basic CNC/PMC interfacing Manual

6.1 END1(1st Level Sequence Program End:SUB 1)

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.

Fig. 23 END1 instruction

75
Basic CNC/PMC interfacing Manual

6.2 END2 (2nd Level Sequence Program End: SUB 2)

We should specify this instruction at the end of the 2nd level sequence.

Fig. 24 END2 instruction

76
Basic CNC/PMC interfacing Manual

6.3 END3 (3rd Level Sequence Program End: SUB 48)

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.

Fig. 25 END3 instruction

77
Basic CNC/PMC interfacing Manual

6.4 6.4 END (End of a Ladder Program: SUB 64)


The END functional instruction designates the end of a ladder program. It must
be placed at the end of the ladder program.

Fig. 26 END instruction

78
Basic CNC/PMC interfacing Manual

6.5 Variable timer

Fig. 27 Timer instruction

This is an on-delay timer.


Since we set the time in nonvolatile memory (T address) using the timer screen,
we can change the set time without changing the ladder diagram.

How to access the timer screen

Now the timer screen will appear


Fig. 28 Timer screen

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.

Fig. 29 functioning of timer


Control condition

ACT = 0: Turns off W1


ACT = 1: Starts the timer

EXAMPLE

Fig. 30 Example for TMR instruction

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

6.6 Fixed timer

TMRB (Fixed On-delay Timer: SUB 24)

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.

The data type in this instruction is binary type.

Fig. 31 Fixed timer instruction

Control condition

ACT = 0: Turns off W1.


ACT = 1: Starts the timer.

The timer numbers and the setting time range are as shown below.

Table 26: Timer addresses

The maximum setting time is approximately 546 minutes.

Timer relay (W1)

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

Fig. 32 Example for fixed timer


Y0.0 = Hydraulic motor control
X1.1 = Hydraulic motor on Feedback signal

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

6.7 Variable counter

CTR (Counter: SUB 5)

CTR is used as a counter. Counters are used for various purposes in NC


machine tools. Numerical data such as preset values and count values can be used
with either BCD format or binary format by a system parameter of PMC.

Fig. 33 Variable counter instruction

Control conditions

(a) Specify the initial value. (CNO)


CNO = 0: Begins the value of the counter with 0.
0, 1, 2, 3, ....., n.
CNO = 1: Begins the value of the counter with 1 (0 is not used).
1, 2, 3, ....., n.

(b) Specify up or down counter. (UPDOWM)


UPD = 0: Up counter.
The counter begins with 0 when CNO = 0 and with 1 when CNO = 1.
UPD = 1: Down counter.
The counter begins with the preset value.

(c) Reset (RST)


RST = 0: Releases reset.
RST = 1: Enables reset. The counter present value will be reset.

(d) Count signal (ACT)


ACT = 0: Counter does not operate. W1 does not change.
ACT = 1: Count is made by catching the rise of ACT.
83
Basic CNC/PMC interfacing Manual

Now the COUNTER screen will appear

Fig. 34 Counter screen

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.

Fig.35 Example for Counter instruction


As per the above ladder, whenever M30 will be executed by the CNC,
R200.3 will become high by which counter value will be incremented by 1. When
the count value reaches preset value, the output Y6.1 will be energized. For the
above application, the pre set value can be changed by the user in the counter
screen.

85
Basic CNC/PMC interfacing Manual

6.8 Fixed counter

CTRB (Fixed Counter: SUB 56)

Fig. 36 Fixed counter instruction

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

6.9 MOVB (Transfer of 1 Byte: SUB 43)

The MOVB instruction transfers 1-byte data from a specified source address to
a specified destination address.

Fig. 37 MOVB instruction


Control condition
(a) Execution specification
ACT = 0: No data is transferred.
ACT = 1: One-byte data is transferred.
Parameters
(a) Transfer source address
It specifies the source address of the data to be transferred.

(b) Transfer destination address


Specify the destination address to which data should be transferred

87
Basic CNC/PMC interfacing Manual

6.10 MOVE (Logical Product Transfer: SUB 8)

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.

Fig. 38 MOVE instruction

Execution command

ACT = 0: MOVE instruction not executed.


ACT = 1: Executed.

88
Basic CNC/PMC interfacing Manual

Example of using the MOVE instruction

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.

Fig.39 Example for MOVE instruction

89
Basic CNC/PMC interfacing Manual

6.11 DISPB (Display Message: SUB 41)

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.

Fig. 40 Creating Operator Messages

(i) Message display request memory

The message display request memory consists bits at A addresses on each


PMC model. One bit corresponds to one type of message data. If we want to
display a message on the CNC screen, we have to set the corresponding display
request memory 1and 0 to erase the message of CNC screen.

90
Basic CNC/PMC interfacing Manual

(ii) Message display status memory

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.

(iii) Message data table

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.

Fig. 41 DISPB instruction


Control conditions

ACT=0: Do not display messages on the CNC screen.


ACT=1: Display the messages on the CNC screen.

Parameter (0)

If this value is zero, there will be no message display.

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

Message Number Alarm/message Display contents


1000-1999 Alarm Alarm no. and alarm message, CNC will
turn to alarm state
2000-2099 Operator Message no. and message will be
message displayed
2100 - 2999 Operator Only message will be displayed
message
Table: 27 Classification of Alarm/Message numbers

How to access the Message screen

92
Basic CNC/PMC interfacing Manual

Fig. 42 Message screen

In the above screen we should write the alarm/message with proceeding


number. The proceeding number decides whether the command should be treated
as message or alarm

Example
Consider the lubrication level sensor input is X40.0. The output address used to
create message “Lubrication level low” is A0.0

Consider the following two Nets.


For example, consider No. of messages = 100
Assign the address for ACT which is always on.

Fig. 43 Example for DISPB instruction

Enter the message in the message screen as follows

93
Basic CNC/PMC interfacing Manual

Fig. 44 Message Screen with an Example

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

Fig. 45 Alarm Screen

94
Basic CNC/PMC interfacing Manual

6.12 NUMEB (Definition of Binary Constants:


SUB 40)

This instruction defines 1, 2, or 4-bytes long binary constant. Data entered in


decimal during programming is converted into binary data during program execution.

Fig. 46 NUMEB instruction


(a) Format specification
It specifies data length (1, 2, or 4 bytes).
0001: Binary data of 1 byte length
0002: Binary data of 2 bytes length
0004: Binary data of 4 bytes length

(b) Constant
IT is used to define constants in decimal format.

(c) Constant output address


It specifies the address of the area for output of the binary data.

95
Basic CNC/PMC interfacing Manual

6.13 NOT (Logical NOT: SUB 62)

The NOT instruction inverts each bit of the contents of address A, and stores the
result at address B.

Fig. 47 NOT instruction


Control conditions
(a) Input signal (ACT)

ACT=0: The NOT instruction is not executed.


ACT=1: The NOT instruction is executed.

(a) Format specification


It is used to specify the data length (1, 2, or 4 bytes).

(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

Examples for NUMEB an NOT operation


Net1

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

6.14 ADDB (Binary Addition: SUB 36)

This instruction performs binary addition between 1-, 2-, and 4-byte data.

Fig.48 ADDB instruction

Control conditions

(a) Reset (RST)


RST=0: Release reset
RST=1: Resets error output W1. In other words, makes W1=0.

(b) Command (ACT)


ACT=0: Do not execute ADDB. W1 does not change now.
ACT=1: Execute ADDB.

Parameters

(a) Format specification


It is used to specify data length (1, 2, and 4 bytes) and the format for the addend
(constant or address).

Fig. 49 Format specification for ADDB instruction

98
Basic CNC/PMC interfacing Manual

(b) Augend address


It specifies the address containing the augend.

(c) Addend data (address)


Specification in (a) determines the format of the addend.
(d) Result output address
The result of the operation will be specified in this address.

Error output (W1)

W1=0: Operation correct


W1=1: Operation incorrect

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.

Operations output register (R9000)

This register is set with data on operation. If register bit is on, they signify the
following operation data:

Fig. 50 Result of ADDB instruction

99
Basic CNC/PMC interfacing Manual

6.15 SUBB (Binary Subtraction: SUB 37)

This instruction subtracts one data from another, both data being in the binary
format of 1, 2 or 4 bytes.

Fig.52
Control conditions

(a) Reset (RST)


RST=0: Release reset
RST=1: Resets error output W1. (Set W1 to 0.)
(b) Command (ACT)
ACT=0: Do not execute SUBB. W1 does not change now.
ACT=1: Execute SUBB

Error output (W1)

W1=0: Operation correct


W1=1: Operation incorrect

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

6.16 DECB (Binary Decoding: SUB 25)

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.

Fig.53 DECB instruction

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

(a) Format specification

101
Basic CNC/PMC interfacing Manual

(b) Code data address


It specifies the starting number of the list of numbers to be decoded.

(c) Number specification decode designation


It specifies the signal on which code data is available.

(d) Decode result address


Specifies an address where the decoded result shall be output.

Fig.54 Working of DECB instruction

6.16.1 M code decoding operation:

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:

M code decoding M03 S1000


Whenever M03 code is executed by the CNC, the following actions will be
performed
1. CNC will generate one strobe signal (F7.0). It can be used to enable
the DECB instruction.
2. The equivalent binary number for M03 code will be available on F10 as
0000 0011
3. Now, by using the DECB instruction, we can enable one bit of R
address. The bit address depends on the equivalent decimal value of
data present in F10. In our example R address is R20. The decimal
equivalent of F10 is 3. So, as per this instruction, R20.3 will become
high. Refer network 1.
4. So, R20.3 can be used to enable G signal which should be high for
spindle on clockwise rotation (G70.5) Refer network 2.
5. Once, the spindle starts rotating by the signal G70.5, It should be used
to enable G4.3 signal by which CNC makes strobe signal as zero and
will start execution of next block of part program.

Net1

0001 = code data is 1 byte length


F0010 = Code data address
0000000000 = M code starting data. Here M00 is the starting M code to be
decoded
R20 = decoded data output

103
Basic CNC/PMC interfacing Manual

Net2

R20.3 will become high when M03 is executed.


R20.4 will become high when M04 is executed.
R20.5 will become high when M05 is executed.
F1.1 is the flag for RST button present in the MDI unit.
X27.0 is the input address of CW button, X27.1 is the input address of spindle stop
button and X27.2 is the input address of CCW button present in the machine
operator panel Y20.3 is the output address of CW LED present in the machine
operator panel.

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.

2. We can use F7.0 signal to enable DECB instruction.

3. In DECB instruction, as per the content of F10, the equivalent bit of output
address will be enabled (R20.4)

4. Now, R20.4 can be used to enable the G signal of spindle on counter


clockwise (G70.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

Example 3 – Procedure to create user defined M codes

Consider the example of M40.

In DECB instruction, consider M code starting data as 31, code data is of 2 byte
length and output address as R25.

1. If M40 is executed by the CNC, the equivalent binary of 40 will be present in


the F10.

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

6.17 CODB instruction

Refer the section 5.3.2

106
Basic CNC/PMC interfacing Manual

6.18 ROTB (Binary Rotation Control: SUB 26)

This instruction is used to control rotating elements including the tool post, ATC
(Automatic Tool Changer), rotary table, etc.

Fig. 55 ROTB instruction


Control conditions

(a) Specify the starting number of the rotor. (RNO)


RNO=0: Begins the number of the position of the rotor with 0.
RNO=1: Begins the number of the position of the rotor with 1.

(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.

(c) Specify the operating conditions. (POS)


POS=0: Calculates the goal position.
POS=1: Calculates the position one position before the goal position.

(d) Specify the position or the number of steps. (INC)

INC=0: Calculates the number of the position.


If the position one position before the goal position is to be calculated, we
should specify INC=0 and POS=1
INC=1: Calculates the number of steps.
If the difference between the current position and the goal position is to be
calculated, we should specify INC=1 and POS=0.
107
Basic CNC/PMC interfacing Manual

(e) Execution command (ACT)


ACT=0: The ROT instruction is not executed. W1 does not change.
ACT=1: Executed.
.
Parameters
Format
It is to specify data length (1, 2, or 4 bytes). We should use the first digit of
the parameter to specify the number of bytes.
1 : 1 byte
2 : 2 bytes
4 : 4 bytes

Rotor Indexing Number

We should specify the address which contains the number of indexing should be
performed

Current Position Address

We should specify the address which contains the current position of the rotor

Goal Position Address

We should specify the address which contains the goal position (or command
value), for example the address storing the CNC output T code.

Operation Result Output Address

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.

Rotating Direction Output (W1)

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

Example of using the ROTB instruction

Fig. illustrates a ladder diagram for a 12-position rotor to be controlled for


rotation via the shorter path and for deceleration at the position one position before
the goal.

• 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

The above net is to R228.0 to keep always on.

Net2

D0000 = No. of indexing (Max. no. of tools)


R0230 = No. of indexing required to reach one position before the goal
position

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

6.19 COMPB (Comparison Between Binary Data:


SUB 32)

This instruction compares 1, 2, and 4 byte binary data with one another. Results of
comparison are set in the operation output register (R9000).

Fig. 56 COMPB Instruction

Control condition

(a) Command (ACT)

ACT = 0: Do not execute COMPB.


ACT = 1: Execute COMPB.

Parameters
(a) Format specification

(b) Input data (address)


Indicates the address which should be compared .

(c) Address of data to be compared


Indicates the address in which the comparison data is stored.

111
Basic CNC/PMC interfacing Manual

Operation output register (R9000)

The following table shows the relationship among the [input data], [data
compared], and operation output register.

Table 26: outputs of COMPB instruction

Example for COMPB instruction

Refer 6.17 ROTB instruction

112
Basic CNC/PMC interfacing Manual

6.20 COIN (Coincidence Check: SUB 16)

This instruction is used to check whether the input value and comparison value
coincide. The value in this instruction will be in BCD. format.

Fig. 57 COIN Instruction

Control conditions

(a) Specify the data size.


BYT = 0: Process data (input value and comparison values) is BCD two digits
long.
BYT = 1: Process data (input value and comparison values) is BCD four digits
long.

(b) Execution command

ACT = 0: The COIN instruction is not executed. W1 does not change.


ACT = 1: The COIN instruction is executed and the result is output to W1.

Parameters
(a) Specification of input data format
0: Specifies input data as a constant.
1: Specifies input data as an address.

(b) Input data


The input data can be specified as a constant or an address storing it. The selection
is made by a parameter of format designation.

(c) Comparison data address


It is used to specify the address storing the comparison data.

113
Basic CNC/PMC interfacing Manual

Comparison result output (W1)


W1 = 0: Input data ≠ Comparison data
W1 = 1: Input data = Comparison data

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

6.21 DIFU (Rising Edge Detection: SUB 57)

The DIFU instruction sets the output signal to 1 for one scanning cycle on a rising
edge of the input signal.

Fig. 58 DIFU instruction


Control conditions
(a) Input signal (ACT)
On a rising edge (0 → 1) 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 cycle of the ladder level where
this functional instruction is operating.

115
Basic CNC/PMC interfacing Manual

6.22 DIFD (Falling Edge Detection: SUB 58)

The DIFD instruction set the output signal to 1 for one scanning period on a
falling edge of the input signal.

Fig. 58 DIFD instruction

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

7 Spindle direction selection and


speed control

117
Basic CNC/PMC interfacing Manual

7.1 Spindle rotation direction selection

7.1.1 G signals for Spindle rotation selection

Spindle stop *SSTP G29.6


Spindle CW SRVA G70.4
Spindle CCW SFRA G70.5

7.1.2 Logic for direction selection

Net1

For function of DECB instruction, refer chapter 6

As per the above DECB instruction,


If we command M03(For spindle on clockwise), R20.3 will become high.
If we command M04(For spindle on counter clockwise), R20.4 will become high.
If we command M05(For spindle stop), R20.5 will become high.

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

7.2 Spindle speed control

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

Table 28: The values of G30 for spindle override

Spindles override: G30 (0 to 254%)

Rotary switch (SA2) for Spindle override

Table 28: Input addresses and values for Spindle override


Here, Xm+1.2 is a parity bit.
m = Starting input address of Machine operator panel (Assume m=16). So, if
we rotate spindle override switch, then the status of input signals X16.6, X16.7,
X17.0, and X17.1 will change. X17.2 is a parity bit which can be omitted for
calculating spindle speed.

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

8.1 Spindle contour control function


The Cs contour control function positions the serial spindle using the spindle motor
in conjunction with a dedicated detector mounted on the spindle.

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.

Switching between spindle speed control and Cs contour control:


Cs contour control change signal CON<G27.7>:
This signal specifies that the spindle switched between the spindle speed control
and Cs contour control modes.
When G027.7 is low, the spindle will work in speed control mode.
When G027.7 is set to high, the spindle is regarded as Cs contour control axis.

Cs contour control change completion signal FSCSL<F044.1>:


This signal posts that the spindle has switched to Cs contour control mode.
This signal is set to 1 when the spindle switches to Cs contour control mode.

124
Basic CNC/PMC interfacing Manual

Ladder Diagram:

Setting of Parameters for Cs contour control function:


1) P8133#SCS =1 To enable Cs contour control function
2) Set the following Parameters
P8130 = Enter No. of control axis including the spindle axis
P1020 = 67 To configure the spindle axis as C axis
P1023 = Enter -1 corresponding to C axis(Spindle axis)
P1825 =3000 Loop gain
P1826=10 In position width
P1828=8193 Position deviation limit during movement
P1829=100 Position deviation limit during stop
Set the parameters available in Servo setting screen
P2000=0 Axis Initialization
P2020= Enter motor id (enter any no. other than 0)
P1820=2 Enter CMR value
P2084=9 Enter numerator value of Flexible feed gear ratio
P2085=25 Enter denominator value of Flexible feed gear ratio
P2023, P2024 & P1821 Enter the value same as Servo axis
P1420= Enter feed rate value for Spindle axis
3) Power off/On

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

8.2 Servo Spindle function:

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.

1. Command with a Program


2. Command with a signal

1. Command with a program:


This function can be used to specify the ‘S’ spindle rotation command for a Servo
motor spindle in the SERVO speed control mode. For rotation control of a Servo
motor, specify G96.4 to start the SERVO speed control mode. Once the SERVO
speed control mode is specified, the S command is valid for the Servo motor until
the SERVO speed control mode is released. Do not specify a positioning command
in the SERVO speed control mode. Otherwise, alarm PS0445 is issued. Before
positioning operation, release the SERVO speed control mode. To release the
SERVO speed control mode, specify the spindle indexing command G96.1/G96.2.

2. Command with a Signal:


SERVO speed control mode signal <Gn521> can also be used to start and cancel
the SERVO speed control mode. The SERVO speed control mode is started or
canceled on a rising or falling edge of the SERVO speed control mode signal. The
SERVO speed control mode status can be checked using the SERVO speed control
mode in-progress signals (SERVOREV1 to SERVOREV5 <Fn521.0 to Fn521.4>).
When the signal is set to 0 during rotation, spindle indexing is performed, then the
SERVO speed control mode is canceled.

127
Basic CNC/PMC interfacing Manual

SERVO speed control mode signals SRVON1 to SRVON6 <Gn521.0 to


Gn521.5>:
These signals switch the respective axes to the SERVO speed control mode.
Setting these signals to "1" cause the respective axes to enter the SERVO
speed control mode.
Resetting these signals to "0" cause the respective axes to exit the SERVO
speed control mode.
Resetting the signals to 0 during axis rotation causes the respective
axes to start spindle indexing, to stop at the origin, and to exit the
SERVO rotation mode.
SERVO reverse signals SERVORVS1 to SERVORVS6 <Gn523.0 to Gn523.5>
These signals cause the respective axes to reverse their rotation direction in the
SERVO speed control mode.
Setting these signals to "1" cause the respective axes to reverse their rotation
direction.
Resetting these signals to "0" cause the respective axes to resume their normal
rotation direction.

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

8.3 PMM axis configuration

Procedure For Configure PMM Axis:


Hardware:
 Connect I/O Link cable from system JD1A to JD1B in Amplifier
 Amplifier should be supplied with 3 phase 200 V and 24 V in Appropriate
connectors
 Make Hardware Wired inputs on the Amplifier like *ESP, *RILK, *OT1, *OT2
is to be high, these come on the JA35 (EXI/O connector) on the amplifier
 The power supplies to the beta amplifier should be switched on first and then
the CNC system to be made on.
 Ensure the Encoder SD and SD* connection for Pulse coder if it is not
connected for PMM axis

I/O Module Assignment:

 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

Setting of PMM parameters:


 12#1 = 0 for Automatic initialization
 30 = 0
 125 = 158 (Motor ID Refer Servo parameter manual for Motor ID)
 32 = 2 (CMR standard value 2)
 105 = 10000(Number of Numerator Pulses per revolution)
 106 = 1 (Number of denominator Pulses per revolution)
 31 = 111 (direction of travel)
 180 = 10000(Reference Counter Capacity)
 11#2 =1 for disabling ILK input. With P11# 2 = 1 Connector JA35 pin no. 6
will be treated as Dec input
 3#1=1 if clamping/unclamping is not done mechanically on the axis after
every movement
 Made one Power OFF Cycle ,Axis will get initialized

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

Starting Ladder Program:


 Make *ESP(Yn+1.1) and *ILK(Yn+1.3) as high on ladder

 Do the Mode selection with MD1,MD2,MD4 (Yn+0.0, Yn+0.1, Yn+0.2)

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

Function code table:

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

You might also like