Mitsubishi QD51 Programming Manual page 368

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
(2) Program example of a format 2 control table
100 ' A program example that loads the microcomputer program and saves it on a memory card
110 ' (Capacity of the microcomputer program: 8 k bytes)
120 OPEN"0:PROG9.DAT"FOR OUTPUT AS #1
130 DIM TBL%(7),A%(127)
140 TBL%(0)=256
150 TBL%(1)=1
160 TBL%(2)=1
170 TBL%(4)=9
180 TBL%(5)=1
190 TBL%(7)=128
200 FOR J=&HO TO &H1F80 STEP 128
210 TBL%(6)=J
220 PCRD TBL%( ),A%( )
230 FOR I=0 TO 127
240 PRINT #1,A%(I)
250 NEXT I
260 NEXT J
270 CLOSE #1
280 END
11 - 198
:
'Opens the sequential file
:
'Defines arrays
:
'Specifies a format 2 control table
:
'Specify network number 1
:
'Specify station number 1
:
'Specifies to load the microcomputer
program
:
'Specifies to load the main microcomputer
program
:
'Specifies the number of bytes to be read
:
'Specifies the starting address of the
program
:
'Executes the load operation
:
'Writes to the sequential file
:
'Closes the file
MELSEC-Q
11 - 198

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents