7.1 M-code Output Function. Mitsubishi MOTION CONTROLLERS Q172DCPU


Add to my manuals
448 Pages

advertisement

7.1 M-code Output Function. Mitsubishi MOTION CONTROLLERS Q172DCPU | Manualzz

7 AUXILIARY AND APPLIED FUNCTIONS

7. AUXILIARY AND APPLIED FUNCTIONS

This section describes the auxiliary and applied functions for positioning control in the

Multiple CPU system.

7.1 M-code Output Function

M-code is a code No. between 0 and 32767 which can be set for every positioning control. During positioning control, these M-codes are read using the Motion SFC program to check the servo program during operation and to command auxiliary operations, such as clamping, drill rotation and tool replacement.

(1) Setting of M-codes

M-code can be set using MT Developer at the creation and correction of the servo program.

(2) Storage of M-code and read timing

(a) M-codes are stored in the M-code storage register of the axis specified with the positioning start completion and specified points (at the speed switching control or constant-speed control).

During interpolation control, the M-codes are stored in all axes which perform interpolation control.

(b) When the M-code is read at the positioning start completion, use the positioning start complete signal (M2400+20n) as the reading command.

7

7 - 1

7 AUXILIARY AND APPLIED FUNCTIONS

(c) When the M-code is read at positioning completion, use the positioning complete signal (M2401+20n) as the read command.

At the position control or speed control

V

Dwell time

PLC ready flag (M2000)

OFF

Servo program start

Start accept flag (M2001+n)

OFF

Positioning start complete signal (M2400+20n)

Positioning complete signal (M2401+20n)

M-code

OFF

OFF

At the speed switching control

V

ON

ON

ON

ON

Storage of setting M-code No.

P1 (Speed-switching point)

P2 (Speed-switching point)

P3 (Stop) t

ON

PLC ready flag (M2000)

OFF t

Servo program start

Start accept flag (M2001+n)

OFF

Positioning start complete signal (M2400+20n)

Positioning complete signal (M2401+20n)

M-code

OFF

OFF

ON

ON

ON

Storage of setting M-code No.

(3) Resetting of M-codes

M-codes can be reset by setting of the M-code output devices to zero.

Use this method during positioning control to perform operations unrelated to the servo program, such as when it has been difficult to output the M-code during the previous positioning control.

However, M-code is set55 during the speed switching control or constant-speed control, the M-code output of the servo program takes priority.

7 - 2

7 AUXILIARY AND APPLIED FUNCTIONS

(4) Program example

(a) The Motion SFC program to read M-codes is shown as the following conditions.

1) Axis used No. ......................................... Axis 3

2) Processing at the positioning start by M-code

.................... M-code No. is output as BCD code to Y110 to Y11F

3) Processing at the positioning completion by M-code a) M-code = 3......................................... Y120 turns on b) M-code = 5......................................... Y121 turns on c) M-code is except for (3 or 5) ............. Y122 turns on

(b) Motion SFC program with the above conditions are shown below.

System Configuration

Q61P Q03UD

CPU

Q172D

CPU

QY40 QY40 Q172D

LX

PY000 to

PY00F

PY010 to

PY01F

[F10]

[F20]

Motion SFC program

Reading of M-codes

#0=0

#1=0

#2=0

SET M2042

[G10]

PX000*M2455

[K100] CPSTART1

Axis 3

Speed 1000PLS/s

INC-1

Axis 3, 200000PLS

M-code 3

INC-1

Axis 3, 300000PLS

M-code 5

INC-1

Axis 3, 400000PLS

M-code 4

CPEND

P0

[G20]

[F30]

D53==3

#0=BCD(D53)

DOUT Y110, #0

SET Y120

1)

1)

[G30] D53==5 M-code (5) for axis 3 ?

All axes servo ON command turns on

Stand by until PX000 and Axis 3 servo ready turns on

[F40] #1=BCD(D53)

DOUT Y110, #1

SET Y121

After M-code storage area for axis 3 is changed into BCD code, it is output to Y110 and Y121 turns on.

1 axis constant-speed control

Axis used . . . Axis 3

Speed . . . 1000PLS/s

1 axis linear positioning control

Axis used . . . Axis 3

Positioning . . . 200000PLS address

M-code output . . . 3

1 axis linear positioning control

Axis used . . . Axis 3

Positioning . . . 300000PLS address

M-code output . . . 5

1 axis linear positioning control

Axis used . . . Axis 3

Positioning . . . 400000PLS address

M-code output . . . 4

[G40]

[G50]

!M2003

M-code (except 3 or 5) for axis 3 ?

(D53==3)+(D53==5)

[F50]

After M-code storage area for axis 3 is changed into BCD code, it is output to Y110 and

Y122 turns on.

#2=BCD(D53)

DOUT Y110, #2

SET Y122

P0

END

M-code (3) for axis 3 ?

After M-code storage area for axis 3 is changed into BCD code, it is output to Y110 and Y120 turns on.

7 - 3

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement

Table of contents