Mitsubishi QD51 Programming Manual page 414

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
(3) Program example for a format 3 control table
100 'A program example that reads the device memory of the Q/QnA series PLC CPU
110 DIM TBL%(20),A%(10)
120 TBL%(0)=256
130 TBL%(1)=1
140 TBL%(2)=1
150 TBL%(4)=516
160 TBL%(5)=&H3E3
170 TBL%(6)=&H101
180 TBL%(7)=&H1
190 TBL%(8)=0
200 TBL%(9)=168
210 D!=0
220 GOSUB 430
230 TBL%(10)=L%
240 TBL%(11)=H%
250 TBL%(12)=0
260 TBL%(13)=0
270 TBL%(14)=144
280 D!=0
290 GOSUB 430
300 TBL%(15)=L%
310 TBL%(16)=H%
320 TBL%(17)=0
330 TBL%(18)=0
340 TBL%(19)=168
350 D!=8000
360 GOSUB 430
370 TBL%(20)=L%
380 TBL%(21)=H%
390 TBL%(22)=0
11 - 244
:
'Defines the arrays
:
'Specifies a format 2 control table
:
'Specifies network number 1
:
'Specifies station number 1
:
'Specifies to read random devices of a
Q/QnA series PLC CPU
:
'Specifies the requested CPU (PLC No.4)
:
'Reads one bit device point or one word
device point
:
'Reads one double-word device point
:
'Fixed value
:
'Specifies data registers (D)
:
'Specifies device number 0
:
'Stores the lower digit of the device number
:
'Stores the higher digit of the device
number
:
'Specifies word units as processing unit
:
'Fixed value
:
'Specifies internal relays (M)
:
'Specifies device number 0
:
'Stores the lower digit of the device number
:
'Stores the higher digit of the device
number
:
'Specifies bit units as processing unit
:
'Fixed value
:
'Specifies data registers (D)
:
"Specifies device number 8000
:
'Stores the lower digit of the device number
:
'Stores the higher digit of the device
number
:
'Specifies double-word units as processing
unit
MELSEC-Q
11 - 244

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents