Mitsubishi QD51 Programming Manual page 430

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
(1) Program example for a format 1 control table
100 ' A program example that writes data to device memory of the PLC CPU
110 DIM TBL%(10),A%(20)
120 TBL%(0)=255
130 TBL%(1)=1
140 TBL%(2)=2
150 TBL%(3)=3
160 TBL%(4)=0
170 TBL%(5)=1
180 A%(0)=&H5
190 PCWT TBL%( ),A%( )
200 END
11 - 260
• The following processing is performed if file registers are specified as the device
memory to be written to:
(1) If the file registers have never been changed in the PLC CPU, data is written to
the file registers of block number 0.
(2) If the block number of the file registers has been changed in the PLC CPU, data
is written to the file registers of the new block number.
1) When the block number has been changed using the RSET instruction of the
microcomputer program package of the type SW GHP-UTLPC-FN1 utility
software package or the type SW SRX-FNUP software package.
2) When the block number has been changed using the RSET instruction.
Processing cannot be performed normally with processing code 1 if the block number of the file
registers has been changed to 29 or greater using the RSET instruction. In this case, use
processing code 4 (writing to extension file registers) instead.
:
'Defines arrays
:
'Specifies the station number to
communicate with to the local station
:
'Specifies to write to device memory
:
'Specifies word units
:
'Specifies internal relays M
:
'Specifies the device number
:
'Specifies the number of words to be
written
:
'Turns M1 and M3 ON and all others OFF
:
'Executes the write operation
MELSEC-Q
11 - 260

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents