11 - 296 11 - 296
MELSEC-Q
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)
:
'Defines arrays
130 OPEN " 0:PROG9.DAT" FOR INPUT AS #1
:
'Opens the file
140 FOR J=&H0 TO &H1F80 STEP 128
150 FOR I=0 TO 127
160 INPUT #-,A%(I)
:
'Reads from the file
170 NEXT I
190 TBL%(0)=256
:
'Specifies a format 2 control table
200 TBL%(1)=1
:
'Specifies network number 1
210 TBL%(2)=1
:
'Specifies station number 1
220 TBL%(4)=9
:
'Specifies to write the microcomputer
program
230 TBL%(5)=1
:
'Specifies to write to the main
microcomputer program area
240 TBL%(6)=J
:
'Specifies the head address to be written
250 TBL%(7)=64
:
'Specifies the number of bytes to be written
260 PCWT TBL%( ),A%( )
:
'Executes the write operation
270 NEXT J
280 CLOSE
:
'Closes the file
290 END
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...