6 POSITIONING CONTROL

(b)PLC program

PLC program example for position follow-up control is shown below.

PLC program

0

SM400

 

 

 

 

 

 

 

 

 

 

 

MOVP

K2

D51

Substitutes 2 for D51 after program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

start.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MOVP

K2

D61

Substitutes 2 for D61 after program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

start.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5

X0

 

 

 

 

 

 

 

 

 

 

 

 

PLS

M10

Starts by turning X0 on.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

DMOV K150000 D1000

Substitutes 150000 for D1000 .

 

X1

 

 

 

 

 

 

 

 

 

 

 

DMOV K0

D1300

Substitutes 0 for D1300 .

14

 

 

 

 

 

 

 

 

 

 

 

 

 

M3240

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RST

M20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RST

M30

 

18

M10

M0

 

 

 

 

 

 

 

 

 

 

 

Reads data of D1000 for Multiple CPU

 

 

 

 

 

 

 

 

 

 

SP.DDWR

H3E1

D50

D1000

D4000 M0

system No.2 by turning M10 on, and

 

 

 

 

 

 

 

 

 

 

M0

M1

 

 

 

 

 

 

 

 

 

 

 

writes to D4000 of CPU No.2.

30

 

 

 

 

 

 

SP.SFCS H3E1

K150

M2

D1100

Starts the Motion SFC program No.150.

 

 

 

 

 

 

 

 

 

 

 

M2

M3

 

 

 

 

 

 

42

 

 

 

 

 

 

 

 

 

SET

M20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

After the Motion SFC program No.150

M20

M4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

45

 

 

 

 

 

SP.DDRD

H3E1

D60

D40

D1200 M4

is started, reads data of D40 for Multiple

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CPU system No.2 and stores in D1200

 

 

 

 

M2441

M2442

 

 

 

 

 

self CPU.

 

 

 

 

 

 

 

RST

M20

 

 

 

 

 

 

 

 

 

 

D= D1200 D1000

 

 

Resets M20 and sets M30 at the axis 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

positioning completion and D1200 =

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SET

M30

D1000.

66

M30

M6

 

 

 

 

 

SP.DDWR

H3E1

D50

D1300

D4000

M6

Reads data of D1300 for Multiple CPU

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

system No.2 by turning M30 on, and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RST

M30

writes to D4000 of CPU No.2.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

81

 

 

 

 

 

 

 

 

 

 

 

 

 

 

END

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Note): The CPU shared memory setting example for position follow-up control is shown next page.

6 - 163