Mitsubishi QD51 Programming Manual page 568

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
W@
Variable
• Reads or writes word information in extension registers (ED).
W@(<device>,<device number>)
Syntax
device
device number
A=W@(ED,50)
Examples
A%=W@(ED,50)
W@=(ED,80)=1234
W@=(ED,80)=A
• The W@ variable reads or writes word information of devices.
Description
• Specify the following device type for <device>.
Extension registers • • • ED
• Specify a device number in the following range for <device number>.
ED • • • from 0 to 1023
• If the data to be written is not an integer constant or integer variable, the type is converted
into integer and the resulting value is written.
• In order to read in units of 32 bits, assign data to an integer array variable, convert it into
32-bit data using the CIDB and CISN instructions, and then read the resulting value.
Example
11 - 398
Word@
• • • •
Specify the device to be read or written.
• • • •
Specify the number of the device to be read or
written.
• • • •
Reads the data in the extension register ED50 and
assigns it to the single-precision variable A.
• • • •
Reads the data in the extension register ED50 and
assigns it to the integer variable A%.
• • • •
Writes 1234 to the extension register ED80.
• • • •
Writes the data of the single-precision variable A to
the extension register ED80.
100 DIM A%(1)
100 A%(0)=W@(ED,100)
120 A%(1)=W@(ED,101)
130 B#=CIDB(A%(0))
• • • •
Reads the 32 bits of data stored into
• • • •
ED100 and ED101 to A%(0) and
A%(1), respectively, as two 16-bit
data values.
• • • •
Converts the data in A%(0) and
A%(1) to 32-bit data and assigns it
to B#.
MELSEC-Q
11 - 398

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents