Mitsubishi QD51 Programming Manual page 466

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
(2) Program example for a format 2 control table
100 ' A program example that writes the microcomputer program stored in a memory card to the PLC
CPU
110 ' (Capacity of the microcomputer program: 8 k bytes)
120 DIM TBL%(10),A%(150)
130 OPEN " 0:PROG9.DAT" FOR INPUT AS #1
140 FOR J=&H0 TO &H1F80 STEP 128
150 FOR I=0 TO 127
160 INPUT #-,A%(I)
170 NEXT I
190 TBL%(0)=256
200 TBL%(1)=1
210 TBL%(2)=1
220 TBL%(4)=9
230 TBL%(5)=1
240 TBL%(6)=J
250 TBL%(7)=64
260 PCWT TBL%( ),A%( )
270 NEXT J
280 CLOSE
290 END
11 - 296
:
'Defines arrays
:
'Opens the file
:
'Reads from the file
:
'Specifies a format 2 control table
:
'Specifies network number 1
:
'Specifies station number 1
:
'Specifies to write the microcomputer
program
:
'Specifies to write to the main
microcomputer program area
:
'Specifies the head address to be written
:
'Specifies the number of bytes to be written
:
'Executes the write operation
:
'Closes the file
MELSEC-Q
11 - 296

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents