Mitsubishi QD51 Programming Manual page 460

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 the sequence program stored in a memory card to the PLC CPU
110 '(Capacity of the main sequence program: 8 k steps)
120 DIM TBL%(10),A%(100)
130 OPEN "0:PROG8.DAT" FOR INPUT AS #1
140 FOR J=&H0 TO, &H1FC0 STEP 64
150 FOR I=0 TO 63
160 INPUT #1,A%(I)
170 NEXT I
180 TBL%(0)=255
190 TBL%(1)=8
200 TBL%(2)=1
210 TBL%(3)=J
220 TBL%(4)=64
230 PCWT TBL%( ),A%( )
240 NEXT J
250 CLOSE
260 END
11 - 290
Use the data read from the PLC CPU by using the PCRD instruction for the sequence program
to be written. If other data is written, the PLC CPU cannot operate normally.
:
'Defines arrays
:
'Opens the file
:
'Reads from the file
:
'Specifies the station number to
communicate with to the local station
:
'Specifies to write the sequence program
:
'Specifies to write to the main sequence
program area
:
'Specifies the head step number to be
written
:
'Specifies the number of steps to be written
:
'Executes the write operation
:
'Closes the file
MELSEC-Q
11 - 290

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents