Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 22 of 29

AnS(H) CPU User's Manual: APPENDICES, pages 167 to 176

Pages 167 to 176 of 242, from AnS(H) CPU User's Manual

The original document is the PDF (3.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Mitsubishi A1S38

Page 167

APPENDICES

X

Y

M

L

S

B

F

T

C

D W R A0 A1 Z

V

Constant

Pointer

Levle

K

P

N

H

I n

Index

Word device

Subset

Available device Bit device

Number of steps

Automatic refresh parameter setting ............. RRPA Digit designation

1.1.3

MELSEC-A

Carry flag

Error flag

M9012

M9011

20

D

Command LEDA/LEDB

RRPA

SUB n

LEDC

D

LEDA·······Executed while ON LEDB·······Executed at leading edge LEDC······ Device number designated SUB·········Constant designated

LEDR

Automatic Refresh Parameter Data

(1)

Data to be set n

Head I/O number of object master module

D

Head number of devices which stores link parameters

Automatic refresh parameter setting items D +0

RX's head number

D + 1

AnSHCPU side refreshed device code

D + 2

AnSHCPU side refreshed device's head number

D + 3

Number of refresh points

D + 4

RY's head number

D + 5

AnSHCPU side refreshed device code

D + 6

AnSHCPU side refreshed device's head number

D + 7

Number of refresh points

D + 8

RW's head number

D + 9

AnSHCPU side refreshed device code

D +10

AnSHCPU side refreshed device's head number

D +11

Number of refresh points

D +12

SB's head number

D +13

AnSHCPU side refreshed device code

D +14

AnSHCPU side refreshed device's head number

D +15

Number of refresh points

D +16

SW's head number

D +17

AnSHCPU side refreshed device code

D +18

AnSHCPU side refreshed device's head number

D +19

Number of refresh points

APP - 11

RX refresh range setting

RY refresh range setting

RW refresh range setting

SB refresh range setting

SW refresh range setting

Page 168

APPENDICES

MELSEC-A (2)

Points for automatic refresh parameter area Automatic refresh parameter data occupies 20 points from D1 +0 to D1 +19. When there is a device on which automatic refresh will not be performed (RX, RY, RW, SB, SW), set "0" to its refreshed device code or number of refresh points.

(3)

Automatic refresh parameter settings

Item

Set data

Setting end

RX's head number

Set the head number of RX on the master/local module side.

RY's head number

Set the head number of RY on the master/local module side.

System User RWr : System

RW's head number

Set the head number of RW on the master/local module side.

SB's head number

Set the head number of SB on the master/local module side.

System

SW's head number

Set the head number of SW on the master/local module side.

System

RWw : User

Set the AnSHCPU side device with the following device code : AnSHCPU side refreshed device code

Device name

X

Y

M

B

T

C

D

W

R

Device code

1

2

3

4

5

6

7

8

9

User

0 : No automatic refresh setting AnSHCPU side refreshed Set the head device number on the AnSHCPU side. device's head number Number of refresh points

Set the number of points on which automatic refresh will be performed. 0 : No automatic refresh setting

APP - 12

User User

Page 169

APPENDICES

MELSEC-A

Functions

(1)

Set the devices and numbers of points on which automatic refresh will be performed between the AnSHCPU and master/local module. When the FROM/TO instruction is used to read/write data from/to the master/local module, the RRPA instruction need not be executed.

AnSHCPU Designation of device code

Master module

Designation of device's head number RX area

D +1,

RX

D +2

D +0

Refresh

[ D +3] points

RY

RY area D +5,

D +6

D +4

Refresh

[ D +7] points

RW

RW area D +9,

Refresh

D +10

D +8

RWr

RWr [ D +11] points

RWw

RWw SB

SB area D +13,

D +14

D +12

Refresh

[ D +15] points

SW

SW area D +17,

D +18

D +16

Refresh

[ D +19] points

(2)

When the RRPA instruction is executed, the automatic refresh settings are registered to the AnSHCPU and automatic refresh is performed between the AnSHCPU and master/local module.

(3)

The following table indicates whether refreshed devices may be set or not.

Refreshed device

Device code

Setting RX

RY

RW

SB

SW

X *1

1

ϒ

ϒ

ϒ

ϒ

ϒ

Y *1

2

ϒ

ϒ

ϒ

ϒ

ϒ

M (L, S)

3

ϒ

ϒ

ϒ

ϒ

ϒ

B *2

4

ϒ

ϒ

ϒ

ϒ

ϒ

T

5

ϒ

ϒ

ϒ

ϒ

ϒ

C

6

ϒ

ϒ

ϒ

ϒ

ϒ

D

7

ϒ

ϒ

ϒ

ϒ

ϒ

W *2

8

ϒ

ϒ

ϒ

ϒ

ϒ

R

9

ϒ

ϒ

ϒ

×

×

ϒ : May be set, × : Cannot be set

APP - 13

Page 170

APPENDICES

MELSEC-A REMARKS *1 : Set the range which is not being used by the main base, extension base and data link. *2 : Set B and W in the range not used by data link.

(4)

If the automatic refresh parameters are changed (RRPA instruction is executed) during RUN, new data is not used for control. When the AnSHCPU is switched to STOP/PAUSE, then to RUN, the new automatic refresh parameters are used for refreshing.

(5)

Set RWr and RWw areas in the RW area. Since the RWw area is set after the RWr area reserved for 64 stations, set RWw as shown below. RW area

RWr

Points for 64 stations [ D +11] points

RWw

(6)

Instructions for setting refreshed device in SB and SW (a)

In SB and SW, set refreshed devices within the specified number of points starting from the head number. SB0000 to SB003F are refreshed from the AnSHCPU to the master module, and SB0040 to SB00FF are refreshed from the master module to the AnSHCPU.

(b)

File registers (R) cannot be specified as refreshed devices in SB and SW. If file registers are set in SB or SW and written to the AnSHCPU, an instruction code error occurs and the AnSHCPU is inoperative.

(c)

The device range set for refreshed devices in SB or SW should not be specified as a latch range.

(d)

The SB and SW refresh ranges set with the RRPA instruction during power-on cannot be changed.

APP - 14

Page 171

APPENDICES Execution Conditions

MELSEC-A As shown below, when the LEDA instruction is used, the RRPA instruction is executed every scan while the write command is ON. When the LEDB instruction is used, the RRPA instruction is executed only one scan on the leading edge (OFF → ON) of the write command. Instruction Execution Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Sequence program flow

Write command

ON OFF

RRPA (with LEDA)

RRPA (with LEDB)

Operation Errors

Any of the following conditions will result in an operation error and the error flag (M9011) switch on. Description

Error code D9008

D9092

50

503

The device code specified is 0 or other than 1 to 9 The head number of a bit device is not a multiple of 16 The number of refresh points is not a multiple of 16

Program Example

The following program sets the automatic refresh parameters to the master module of CC-Link allocated to I/O numbers 000 to 01F. (1)

Automatic refresh parameter settings and data storage devices Setting item

RX's head number

Set data

Data storage device

0

D1000

AnSHCPU side refreshed device code

X (1)

D1001

AnSHCPU side refreshed device's head number

A0H

D1002

Number of refresh points

32

D1003

RY's head number

0

D1004

AnSHCPU side refreshed device code

Y (2)

D1005

AnSHCPU side refreshed device's head number

A0H

D1006

Number of refresh points

48

D1007

RW's head number

0

D1008

D (7)

D1009

AnSHCPU side refreshed device code AnSHCPU side refreshed device's head number

160 (A0H)

D1010

Number of refresh points

272

D1011

SB's head number

0

D1012

M (3)

D1013

AnSHCPU side refreshed device code AnSHCPU side refreshed device's head number Number of refresh points SW's head number

160 (A0H)

D1014

256

D1015

0

D1016

AnSHCPU side refreshed device code

W (8)

D1017

AnSHCPU side refreshed device's head number

A0H

D1018

Number of refresh points

256

D1019

APP - 15

Page 172

APPENDICES

MELSEC-A (2)

Program example 0

X0020

P H 0000

D1000

RX's head number (0) setting

P H MOV 0001

D1001

"X" setting

MOV

P H MOV 00A0 D1002

A0H (XA0) setting

P K MOV 32

D1003

32 points setting

P H MOV 0000

D1004

RY's head number (0) setting

P H MOV 0002

D1005

"Y" setting

P H MOV 00A0 D1006

A0H (YA0) setting

P K MOV 48

D1007

48 points setting

P H MOV 0000

D1008

RW's head number (0) setting

P H MOV 0007

D1009

"D" setting

P H MOV 00A0 D1010

160 (D160) setting (160=A0H)

P K MOV 272

D1011

272 points setting

P H MOV 0000

D1012

SB's head number (0) setting

P H MOV 0003

D1013

"M" setting

P H MOV 00A0 D1014

160 (M160) setting (160=A0H)

P K MOV 256

D1015

256 points setting

P H MOV 0000

D1016

SW's head number (0) setting

MOV

P H 0007

D1017

"W" setting

MOV

P H 00A0 D1018

A0H (WA0) setting

MOV

P K 256

256 points setting

LEDB

D1019

RRPA SUB

K 0 RRPA instruction designation

LEDC D1000 LEDR CIRCUIT END

APP - 16

Page 173

APPENDICES

X

Y

M

L

S

B

F

T

C

D W R A0 A1 Z

V

Constant

Pointer

Levle

K

P

N

H

I

Index

Word device

Subset

Available device Bit device

Number of steps

Read from automatic updating buffer memory ······ RIFR Digit designation

1.1.4

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2 n3

29

D n4

Data to be set n1

Command LEDA/LEDB

RIFR

SUB n1

LEDC/SUB n2

LEDC/SUB n3

LEDC

D

LEDC/SUB n4

LEDA·······Executed while ON LEDB·······Executed at leading edge LEDC······ Device number designated SUB·········Constant designated n3

LEDR

Functions

(1)

n2

Head I/O number of object master module Read destination designation • Intelligent device station : Station numbers 1 to64 (only when the host station is the master station) • Random access buffer : FFH Intelligent device station's sending/receiving buffer address specified in master station (Specify the offset address)

D

Device which will store the read data n4

Number of points read : 1 to 8192

Reads the points of data specified at n4 from the automatic updating buffer memory address specified at n3 for the station having the station number specified at n2 in the master module specified at n1 and stores that data into the devices starting from the one specified at D . RIFR instruction execution range

AnSHCPU

Mater station

Intelligent device /local station n2 n1

RIFR instruction n3

D

Specified device n4

APP - 17

Automatic updating buffer memory

Transferred when data is updated

Page 174

APPENDICES

Execution Conditions

MELSEC-A (2)

When executed, the RIFR instruction reads data from the automatic updating buffer of the master module.

(3)

Up to 8192 points may be read by the RIFR instruction.

(4)

To set the number of automatic updating buffer memory points, make the automatic updating buffer size setting using the network parameter instruction (RLPA instruction).

As shown below, when the LEDA instruction is used, the RIFR instruction is executed every scan while the read command is ON. When the LEDB instruction is used, the RIFR instruction is executed only one scan on the leading edge (OFF → ON) of the read command. Instruction execution Step 0

Instruction execution END

Step 0

Instruction execution END

Step 0

Instruction execution END

Step 0

Instruction execution END

Step 0

Sequence program flow

Read command

ON OFF

RIFR (with LEDA)

RIFR (with LEDB)

Operation Errors

Either of the following conditions will result in an operation error and the error flag (M9011) switch on. Description

Error code

The buffer address specified is outside the range of automatic updating buffer memory designation range.

D9008

D9092

50

503

The number of refresh points is greater than 8192.

Program Examples

The following program reads 11 points of data to D100 and thereafter from 400H of the automatic updating buffer memory set to station number 1 in the master module of CC-Link allocated to I/O numbers 000 to 01F. 0

X0020

LEDB RIFR SUB

H 0000

SUB

K 1

SUB

H 0400

LEDC

D100

SUB

K 11 LEDR

CIRCUIT END

APP - 18

RIFR instruction designation

Page 175

APPENDICES

X

Y

M

L

S

B

F

T

C

D W R A0 A1 Z

V

Constant

Pointer

Levle

K

P

N

H

I

Index

Word device

Subset

Available device Bit device

Number of steps

Write to automatic updating buffer memory ............RITO Digit designation

1.1.5

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2 n3

29

D n4

Data to be set n1

Command LEDA/LEDB

RITO

SUB n1

LEDC/SUB n2

LEDC/SUB n3

LEDC

D

LEDC/SUB n4

LEDA·······Executed while ON LEDB·······Executed at leading edge LEDC······ Device number designated SUB·········Constant designated n3

LEDR

Functions

(1)

n2

Head I/O number of object master module Write destination designation • Intelligent device station : Station numbers 1 to 64 (only when the host station is the master station) • Random access buffer : FFH Intelligent device station's sending/receiving buffer address specified in master station (Specify the offset address)

D

Device which will store the written data n4

Number of points written : 1 to 8192

Writes the points of data specified at n4 from the devices beginning with the one specified at D to the automatic updating buffer memory addresses beginning with the specified one at n3 for the station having the station number specified at n2 in the master module specified at n1 . RITO instruction execution range

AnSHCPU

Mater station

Intelligent device /local station n2 n1

RITO instruction n3 D

Specified device n4

APP - 19

Automatic updating buffer memory

Transferred when data is updated

Page 176

APPENDICES

Execution Conditions

MELSEC-A (2)

When executed, the RITO instruction writes data.

(3)

Up to 8192 points may be written by the RITO instruction.

(4)

To set the number of automatic updating buffer memory points, make the automatic updating buffer size setting using the network parameter instruction (RLPA instruction).

As shown below, when the LEDA instruction is used, the RITO instruction is executed every scan while the write command is ON. When the LEDB instruction is used, the RITO instruction is executed only one scan on the leading edge (OFF → ON) of the write command. Instruction Execution Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Instruction Execution END

Step 0

Sequence program flow

Write command

ON OFF

RITO (with LEDA)

RITO (wth LEDB)

Operation Errors

Either of the following conditions will result in an operation error and the error flag (M9011) switch on. Description

The buffer address specified is outside the range of automatic updating buffer memory designation range. The number of refresh points is greater than 8192.

APP - 20

Error code D9008

D9092

50

503