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

The text of a manual · part 25 of 29

AnS(H) CPU User's Manual: APPENDICES, pages 197 to 206

Pages 197 to 206 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 197

APPENDICES Execution Conditions

MELSEC-A When the LEDA instruction is used, the RDGET instruction is executed every scan while the read command is ON. When the LEDB instruction is used, the RDGET 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 RDGET instruction. Therefore, execute the next RDGET instruction after the completion device has switched on. (The RDGET instruction executed before the completion of RDGET instruction execution is ignored.) END processing

END processing

END processing

END processing

Sequence program flow RDGET instruction execution complete

Executed RDGET instruction

ON Completion device

OFF ON

On-completion status display device

OFF

Abnormal completion Normal completion

1 scan During processing of RDGET instruction

Operation Error

Data can be read by RDGET 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 +3 is outside the range 0 to 480.

Program Example

D9008

D9092

50

503

The following program reads 1 point of data from the remote device station having station number 1 and connected to the master module of CC-Link allocated to I/O numbers 000 to 01F. This program assumes that control data are stored in D1000-D1003. 0

X0020

LEDA RDGET SUB

K 0

SUB

K 1

LEDC

D1000

LEDC

L1000

RDGET instruction designation

LEDR CIRCUIT END

APP - 41

Page 198

MEMO

APP - 42

Page 199

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

1.1.11

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2

26

D1 D2

Command LEDA/LEDB

RDPUT

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 written data

D2

Bit device number which is switched on on completion of execution

Control data setting items D1 +0

RWw1

RY

D1 +1

RWr2

RX

D1 +2

Set value

D1 +3

Number of points written

D1 +4 to

Written data storage area

D1 +n

(2)

Data to be set

Control data

Stores data written to remote device station on completion of RDPUT instruction execution. [Number of points specified at D1 +3]

Control data settings Item

Set data

Setting range

Setting end

RY

Write request

0 to 127

User *

2

RWw

Write request

0 to 15

User *

2

RX

Write completion

0 to 127

User *

2

RWr

Write completion

0 to 15

User *

2

Set value

Specify the writing set value allocated to the remote device station

*1

User

Number of points written

Specify the number of data written (word basis).

1 to 16

User

POINTS (1) *1 : Refer to the manual of the remote device station to which data is written. (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.

APP - 43

Page 200

APPENDICES

MELSEC-A

Functions

(1)

Writes the points of data specified at D1 +3 stored from the devices beginning with the one specified at D1 +4 using RX and RY specified at D1 +0-1 to the link registers in the remote 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 D2 switches on only one scan. On abnormal completion, the bit device at D2 +1 switches on only one scan. RDPUT instruction execution range

AnSHCPU

Remote device station

Master station n1 n2

RDPUT instruction

Write

Remote registers

Specified device

Execution Conditions

(2)

The RDPUT instruction may be executed for two or more remote device stations at the same time. However, this instruction cannot be executed for the same remote 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.

When the LEDA instruction is used, the RDPUT instruction is executed every scan while the write command is ON. When the LEDB instruction is used, the RDPUT 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 RDPUT instruction. Therefore, execute the next RDPUT instruction after the completion device has switched on. (The RDPUT instruction executed before the completion of RDPUT instruction execution is ignored.)

APP - 44

Page 201

APPENDICES

MELSEC-A END processing

END processing

END processing

END processing

Sequence program flow RDPUT instruction execution complete

Executed RDPUT instruction

ON Completion device

OFF ON

On-completion status display device

OFF

Abnormal completion Normal completion

1 scan During processing of RDPUT instruction

Program Example

Data can be written by RDPUT instruction.

The following program writes 1 point of data to the remote device station having station number 1 and connected to the master module of CC-Link allocated to I/O numbers 000 to 01F. This program assumes that control data and written data are stored in D1000-D1004. 0

X0020

LEDA RDPUT SUB

H 0000

SUB

K 1

LEDC

D1000

LEDC

L1000

RDPUT instruction designation

LEDR CIRCUIT END

APP - 45

Page 202

MEMO

APP - 46

Page 203

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

Monitoring of remote device station ....................RDMON Digit designation

1.1.12

MELSEC-A

Carry flag

Error flag

M9012

M9011 n1 n2

26

D1 D2

Command LEDA/LEDB

RDMON

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/local 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

RWw1

RY1

D1 +1

RX1 Set value

D1 +2 D1 +3

RWw2

D1 +4

RWr2

RY2

Set value

D1 +6

Number of points monitored to

Control data

RX2

D1 +5

D1 +7

Monitor data

D1 +n

(2)

Data to be set

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

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

APP - 47

Page 204

APPENDICES

MELSEC-A 3)

Control data settings Item

Set data

RY1 RWw1 RX1

Setting range

Monitoring registration request

0 to 127 *

Monitoring registration request

1

RWw2 RX2

1

User *

2

User *

2

0 to 127 *

1

User *

2

Monitoring execution request

0 to 127 *

1

User *

2

Monitoring execution request

1

User *

2

User *

2

User *

2

0 to 15 *

Monitoring registration completion

RY2

Setting end

0 to 15 *

Monitoring completion

0 to 127 *

RWr2

Monitoring completion

1

Set value

Specify the monitoring set value allocated to the remote device station.

Number of points monitored

Specify the number of data monitored (word basis).

0 to 15 *

1

*1

User

1 to 16

User

POINTS (1) *1 : Refer to the manual of the remote device station from which data is monitored. (2) *2 : The RY1/2, RWw1/2, RX1/2 and RWr2 numbers used are set by the user. Note that RY1/2 and RX1/2 ON/OFF control and RWw1/2 and RWr2 data setting are performed by the system. If the user performs RY1/2 and RX1/2 ON/OFF control and RWw1/2 and RWr2 data setting, the RDMON instruction will not be completed properly. Functions

(1)

Registers monitoring of the remote device station having the station number specified at n2 and connected to the master module specified at n1 , and stores the points of monitor data specified at D1 +6 into the devices starting from the one specified at D1 +7. On completion of monitor data 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. RDMON instruction execution range

AnSHCPU

Master module n1

Remote device station n2

Monitoring request

RDMON instruction

Monitor data D1 +7

Specified device

(2)

D1 +6

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

APP - 48

Page 205

APPENDICES Execution Conditions

MELSEC-A When the LEDA instruction is used, the RDMON instruction is executed every scan while the read command is ON. When the LEDB instruction is used, the RDMON 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 RDMON instruction. Therefore, execute the next RDMON instruction after the completion device has switched on. (The RDMON instruction executed before the completion of RDMON instruction execution is ignored.) END processing

END processing

END processing

END processing

Sequence program flow RDMON instruction execution complete

Executed RDMON instruction

ON Completion device

OFF ON

On-completion status display device

OFF

Abnormal completion Normal completion

1 scan During processing of RDMON instruction

Operation Error

Data can be read by RDMON instruction.

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

Error code

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

Program Example

D9008

D9092

50

503

The following program monitors 1 point from the remote device station having station number 1 and connected to the master module of CC-Link allocated to I/O numbers 000 to 01F. This program assumes that control data are stored in D1000-D1006. 0

X0020

LEDA RDMON SUB

H 0000

SUB

K 1

LEDC

D1000

LEDC

L1000

RDMON instruction designation

LEDR CIRCUIT END

APP - 49

Page 206

APPENDICES

MELSEC-A

Appendix 1.2 Caution when Performing a Write while Running Dedicated Instruction Description of write performed when running.

For LEDA

For LEDB

Normal configuration is written when running.

After write, the previous contact turns on and the instruction is executed.

After write, the instruction is executed when the previous contact is turned from OFF to ON.

LEDA/LEDB was added by mistake.

Error 104 occurs (incorrect configuration).

If the previous contact stays after write, the instruction is not executed, so no process is performed. When the previous contact is turned from OFF to ON, error 104 results.

LEDA/LEDB was deleted by mistake.

The LEDC/SUB/LEDR is processed as a regular instruction.

Same as stated on left.

Error 104 occurs (incorrect configuration).

If the previous contact stays after write, the instruction is not executed, so no process is performed. When the previous contact is turned from OFF to ON, error 104 results.

LEDC/SUB was deleted by mistake.

Error 104 occurs (incorrect configuration).

If the previous contact stays after write, the instruction is not executed, so no process is performed. When the previous contact is turned from OFF to ON, error 104 results.

LEDR was added by mistake.

The latter LEDR is processed as a regular instruction.

The latter LEDR is processed as a regular instruction.

LEDR was deleted by mistake.

Error 104 occurs if LEDR does not exist directly after the deleted LEDR.

Error 104 occurs if LEDR does not exist directly after the deleted LEDR. If LEDR exists, all instructions in between are not executed.

LEDC/SUB was added by mistake.

APP - 50