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

The text of a manual · part 24 of 29

AnS(H) CPU User's Manual: APPENDICES, pages 187 to 196

Pages 187 to 196 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 187

APPENDICES

X

Y

M

L

S

B

F

T

C

D W R A0 A1 Z

V

Constant

Pointer Levle

K

P

H

I

N

Index

Word device

RIRCV Subset

Available device Bit device

Number of steps

Read from intelligent device station buffer memory (with handshake) Digit designation

1.1.8

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2 D1

29

D2 D3

Read command

Data to be set LEDA/LEDB

RIRCV

SUB n1

SUB n2

LEDC

D1

LEDC

D2

LEDC

D3

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

LEDR

Control Data

(1)

Head I/O number of object master module n2

Intelligent device station number : 1 to 64

D1

Device for storing control data and read data

D2

Handshaking link device RX/RY number

D3

Bit device number which is switched on on completion of execution

Control data setting items D1 +0

Completion status

D1 +1

Number of points read

D1 +2

Object area (fixed to 0004H)

D1 +3

Error check

D1 +4

Buffer address

D1 +5 to

Read data storage area

D1 +n

(2)

n1

Control data

Stores data read from intelligent device station on completion of RIRCV instruction execution. [Number of points specified at D1 +1]

Number of control data area points Data read from an intelligent device station is stored into the area after the 5 points of control data [ D1 +0 to D1 +4]. Reserve the control data area for 5 points + [number of points specified at D1 +1] successively.

APP - 31

Page 188

APPENDICES

MELSEC-A (3)

Control data Item

Set data

Setting range

Setting end

Completion status

Status on completion of instruction execution is stored. 0 : No error 1 Other than 0 : Error code *

System

Number of points read

Specify the number of data read (word basis).

1 to 480 *

Object area

Set "0004H" when accessing the buffer memory of an intelligent device station.

0004H

User

Error check

Specify the error check device. 0 : Completion status is used for error check. Other than 0 : RX+1 is used for error check.

0, 1

User

Buffer memory address Specify the head address of the buffer memory.

Read data

2

User

*3

User

System

REMARKS 1) *1 : For error codes at error occurrence, refer to the following manual. Control & Communication-Link System Master. Local Module type AJ65BT11/A1SJ61BT11 User's Manual 2) *2 : Indicates the maximum number of data read. Set a value within the intelligent device station buffer memory capacity and parameter-set receiving buffer area setting range. 3) *3 : Refer to the manual of the intelligent device station from which data is read.

Handshaking Link Devices

(1)

Handshaking link device setting items D2 +0 D2 +1

(2)

RX

RY RWr

Setting of handshaking link devices Item

Set data

Setting range

Setting end

RX

Specify the handshaking RX number of the intelligent device station.

0 to 127

User *

2

RY

Specify the handshaking RY number of the intelligent device station.

0 to 127

User *

2

RWr

Specify the handshaking RWr number of the intelligent device station.

0 to 15 1 FF *

User *

2

POINTS (1) *1 : When FFH is set, no number is specified. (2) *2 : The RX, RY and RW numbers used are set by the user. Note that RX and RY ON/OFF control and RW data setting are performed by the system and cannot be changed by the user. If RX, RY and RW are changed by the user, the RIRVC instruction will not be completed properly.

APP - 32

Page 189

APPENDICES

MELSEC-A

Functions

(1)

Reads the points of data specified at D1 +1 from the buffer memory address specified at [ D1 +3] in the intelligent device station having the station number specified at n2 and connected to the master module specified at n1 , and stores that data into the devices starting from the one specified at D1 +4. On completion of reading, the bit device specified at D2 switches on only one scan. On abnormal completion, the bit device at D2 +1 switches on only one scan. RIRCV instruction execution range

AnSHCPU

Mater module

Intelligent device station n1

Request

RIRCV instruction

Read from buffer memory

D1 +4

Execution Conditions n2

D1

+3 Buffer memory

D1

+1

Interlock signal D2 +0/1 Specified device

(2)

The RIRCV instruction may be executed for two or more intelligent device stations at the same time. However, this instruction cannot be executed for the same intelligent device station in two or more locations at the same time.

(3)

Before executing the RIRCV instruction, set the network parameters using the RLPA instruction (network parameter setting). If the RIRCV instruction is executed without the network parameters set, abnormal completion will occur and "4B00H" will be stored into the completion status.

(4)

No processing will be performed if the number of read points specified at D1 +1 is "0".

When the LEDA instruction is used, the RIRCV instruction is executed every scan while the read command is ON. When the LEDB instruction is used, the RIRCV instruction is executed only one scan on the leading edge (OFF → ON) of the read command. Note that several scans will be required until the completion of read processing by the RIRCV instruction. Therefore, execute the next RIRCV instruction after the completion device has switched on. (The RIRCV instruction executed before the completion of RIRCV instruction execution is ignored.)

APP - 33

Page 190

APPENDICES

MELSEC-A END processing

END processing

END processing

END processing

Sequence program flow RIRCV instruction execution complete

Executed RIRCV instruction

ON Completion device

OFF ON

On-completion status display device

OFF

Abnormal completion Normal completion

1 scan During processing of RIRCV instruction

Operation Error

Data can be read by RIRCV instruction.

The following condition will result in an operation error and the error flag (M9011) switch on. Description

Error code

The number of read points specified at D1 +1 is outside the range 0 to 480.

Program Example

D9008

D9092

50

503

The following program reads data from 400H-405H of the buffer memory of the intelligent device station having station number 1 and connected to the master module of CC-Link allocated to I/O numbers 000 to 01F. The completion status is used for error check. Also RX2, RY2 and RWr2 are used as handshaking link devices. 0

X0020

MOV

P K 6

D221

Setting of the number of read points

MOV

P H 0004

D222

Setting of intelligent device station buffer memory

MOV

P K 0

D223

Setting of error check

P H MOV 0400

D224

Setting of buffer memory head address

P H 0202

D320

RY2, RX2 setting

D321

RWr2 setting

MOV

P K MOV 2 LEDB

RIRCV SUB

H 0000

SUB

K 1

LEDC D220 LEDC D320 LEDC M320 LEDR CIRCUIT END

APP - 34

RIRCV instruction designation

Page 191

APPENDICES

X

Y

M

L

S

B

F

T

C

D W R A0 A1 Z

V

Constant

Pointer Levle

K

P

H

I

N

Index

Word device

Subset

Available device Bit device

Number of steps

Write to intelligent device station buffer memory (with handshake) ..............RISEND Digit designation

1.1.9

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2 D1

29

D2 D3

Command

Data to be set LEDA/LEDB

RISEND

SUB n1

SUB n2

LEDC

D1

LEDC

D2

LEDC

D3

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

LEDR

Control Data

(1)

Head I/O number of object master module n2

Intelligent device station number : 1 to 64

D1

Device for storing control data and written data

D2

Handshaking link device RX/RY number

D3

Bit device number which is switched on on completion of execution

Control data setting items D1 +0

Completion status

D1 +1

Number of points written

D1 +2

Fixed to 0004H

D1 +3

Error check

D1 +4

Buffer address

D1 +5 to

Written data storage area

D1 +n

(2)

n1

Control data

Stores data written to intelligent device station by RISEND instruction. [Number of points specified at D1 +1]

Control data

Item

Set data

Setting range

Setting end

System

Completion status

Status on completion of instruction execution is stored. 0 : No error 1 Other than 0 : Error code *

Number of points written

Specify the number of data written (word basis).

Object area

Set "0004H" when accessing the buffer memory of an intelligent device station.

0004H

User

Specify the error check device. 0 : Completion status is used for error check. Other than 0 : RX+1 is used for error check.

0, 1

User

Buffer memory address Specify the head address of the buffer memory.

*3

User

Written data storage area

User

Error check

APP - 35

1 to 480 *

2

User

Page 192

APPENDICES

MELSEC-A REMARKS 1) *1 : For error codes at error occurrence, refer to the following manual. Control & Communication-Link System Master · Local Module type AJ65BT11/A1SJ61BT11 User's Manual 2) *2 : Indicates the maximum number of data written. Set a value within the intelligent device station buffer memory capacity and parameter-set receiving buffer area setting range. 3) *3 : Refer to the manual of the intelligent device station from which data is read.

Handshaking Link Devices

(1)

Handshaking link device setting items D2 +0 D2 +1

(2)

RX

RY RWr

Setting of handshaking link devices Item

Set data

Setting range

Setting end

RX

Specify the handshaking RX number of the intelligent device station.

0 to 127

User *

2

RY

Specify the handshaking RY number of the intelligent device station.

0 to 127

User *

2

RWr

Specify the handshaking RWr number of the intelligent device station.

0 to 15 1 FF *

User *

2

POINTS (1) *1 : When FFH is set, no number is specified. (2) *2 : The RX, RY and RW numbers used are set by the user. Note that RX and RY ON/OFF control and RWr data setting are performed by the system and cannot be changed by the user. If RX, RY and RW are changed by the user, the RISEND instruction will not be completed properly. Functions

(1)

Writes the points of data specified at D1 +1 from the devices beginning with the one specified at D1 +5 to the buffer memory address specified at [ D1 +4] in the intelligent device station having the station number specified at n2 and connected to the master module specified at n1 . On completion of writing, the bit device specified at D3 switches on only one scan. On abnormal completion, the bit device at D2 +1 switches on only one scan.

APP - 36

Page 193

APPENDICES

MELSEC-A RISEND instruction execution range

AnSHCPU

Master module

Intelligent device station n1 n2

RISEND instruction Request

D1 +5

Execution Conditions

D1 +4

Buffer memory

Interlock signal D2 +0/1 Specified device

D1 +1

(2)

The RISEND instruction may be executed for two or more intelligent device stations at the same time. However, this instruction cannot be executed for the same intelligent device station in two or more locations at the same time.

(3)

Before executing the RISEND instruction, set the network parameters using the RLPA instruction (network parameter setting). If the RISEND instruction is executed without the network parameters set, abnormal completion will occur and "4B00H" will be stored into the completion status.

(4)

No processing will be performed if the number of written points specified at D1 +1 is "0".

When the LEDA instruction is used, the RISEND instruction is executed every scan while the write command is ON. When the LEDB instruction is used, the RISEND instruction is executed only one scan on the leading edge (OFF → ON) of the write command. Note that several scans will be required until the completion of write processing by the RISEND instruction. Therefore, execute the next RISEND instruction after the completion device has switched on. (The RISEND instruction executed before the completion of RISEND instruction execution is ignored.) END processing

END processing

END processing

END processing

Sequence program flow Executed

RISEND instruction execution complete

RISEND instruction ON Completion device

OFF ON

On-completion status display device

OFF

Abnormal completion Normal completion

1 scan During processing of RISEND instruction

APP - 37

Data can be written by RISEND instruction.

Page 194

APPENDICES Operation Error

MELSEC-A The following condition will result in an operation error and the error flag (M9011) switch on. Description

Error code D9008

D9092

50

503

The number of written points specified at D1 +1 is outside the range 0 to 480.

Program Example

The following program writes the number of data written and data "ABCDEFGHIJ" to 200H-205H of the buffer memory of the intelligent device station having station number 1 and connected to the master module of CC-Link allocated to I/O numbers 000 to 01F. The completion status is used for error check. Also RX0, RY0 and RWr0 are used as handshaking link devices. 0

X0020

MOV

P K 6

D201

Setting of the number of written points

MOV

P H 0004

D202

Setting of intelligent device station buffer memory

MOV

P H 0000

D203

Setting of error check

P H MOV 0200

D204

Setting of buffer memory head address

P K 5

D205

Written data "5" setting

P H MOV 4142

D206

Written data "AB" setting

P H MOV 4344

D207

Written data "CD" setting

P H MOV 4546

D208

Written data "EF" setting

P H MOV 4748

D209

Written data "GH" setting

P H MOV 494A

D210

Written data "IJ" setting

P H MOV 0000

D300

RY0, RX0 setting

P H MOV 0001

D301

RWr0 setting

MOV

51

X0020

LEDB

RISEND SUB

H 0000

SUB

K 1

LEDC D200 LEDC D300 LEDC M300 LEDR CIRCUIT END

APP - 38

RISEND instruction designation

Page 195

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 remote device station.......... RDGET Digit designation

1.1.10

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2

26

D1 D2

Command LEDA/LEDB

RDGET

SUB n1

SUB n2

LEDC

D1

LEDC

D2

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

LEDR

Control Data

(1)

n1

Head I/O number of object master module n2

Remote device station number : 1 to 64

D1

Device for storing control data and read data

D2

Bit device number which is switched on on completion of execution

Control data setting items D1 +0

RWw

RY

D1 +1

RWr

RX

D1 +2

Set value

D1 +3

Number of points read

D1 +4 to

Read data storage area

D1 +n

(2)

Data to be set

Control data

Stores data read from remote device station on completion of RDGET instruction execution. [Number of points specified at D1 +3]

Number of control data area points Data read from a remote device station is stored into the area after the 4 points of control data [ D1 +0 to D1 +3]. Reserve the control data area for 4 points + [number of points specified at D1 +3] successively.

APP - 39

Page 196

APPENDICES

MELSEC-A (3)

Control data settings Item

Set data

Setting range

Setting end

RY

Read request

0 to 127

User *

2

RWw

Read request

0 to 15

User *

2

RX

Read completion

0 to 127

User *

2

RWr

Read completion

0 to 15

User *

2

Set value

Specify the reading set value allocated to the remote device station

*1

User

Number of points read

Specify the number of data read (word basis).

1 to 16

User

POINTS (1) *1 : Refer to the manual of the remote device station from which data is read. (2) *2 : The RY, RWw, RX and RWr numbers used are set by the user. Note that RY and RX ON/OFF control and RWw and RWr data setting are performed by the system. The user cannot perform RY and RX ON/OFF control and RWw and RWr data setting. Functions

(1)

Reads the points of data specified at D1 +3 from the link registers in the remote device station having the station number specified at n2 and connected to the master module specified at n1 , and stores that data into the devices starting from the one specified at D1 +4. On completion of reading, the bit device specified at D2 switches on only one scan. On abnormal completion, the bit device at D2 +1 switches on only one scan. RDGET instruction execution range

AnSHCPU

Mater module

Remote device station n1

Request

RDGET instruction

Read D1 +4

Specified device n2

Remote registers

D1 +3

(2)

The RDGET instruction may be executed for two or more intelligent device stations at the same time. However, this instruction cannot be executed for the same intelligent device station in two or more locations at the same time.

(3)

As control data, specify the values given in the manual of the remote device station. If wrong setting is made, the instruction will not be completed.

APP - 40