Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1002

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions store the indirect address of the device specified by (s), and stores it in the device specified by (d). The
address stored in the devices specified by (d)+0 and (d)+1 is used for indirect addressing of the device in the program.
ADRSET
MOV
(1) The address of W100 is stored in D100 and D101.
(2) The data (address of W100) stored in D100 and D101 is specified.
(3) "1234" is written to W100.
• Digit specification of bit device or bit specification of word device in (s) is not permitted
• For the indirect specification of devices, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
• Index specification of labels is not supported. When using a label by specifying it in (d), follow the method below.
Label
Global label specifying a device
Automatic assignment global label/
local label
Operation error
There is no operation error.
7 APPLICATION INSTRUCTIONS
1000
7.24 Indirect Address Read Instructions
W100
D100
K1234
@D100
D0
D1
(2)
Address of
D100
W100
D101
Description
When using it as an indirect address, use the indirect specification of the device specified in the global label.
■Example of ST
ADRSET(TRUE , intVar , gvAddr); // Read the intVar indirect address to gvAddr.
INC (TRUE , @D0);// Use the indirect specification of device D0 specified for gvAddr.
Transfer the indirect address to the device and use the indirect specification of the transfer destination device.
■Example of ST
ADRSET(TRUE , intVar , lvAddr); // Read the intVar indirect address to lvAddr.
DMOV(TRUE , lvAddr , D0);// Transfer the indirect address, which has been read to lvAddr, to the device.
INC (TRUE , @D0);// Use the indirect specification of the device to which the indirect address was transferred.
(1)
(3)
Device area
W100
1234

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents