11 - 224 11 - 224
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
(1) Program example for a format 1 control table
100 DIM TBL%(10),A%(100)
:
' Defines arrays
110 TBL%(0)=255
:
' Specifies the station number to
communicate with to the local station
120 TBL%(1)=22
:
' Specifies to read routing parameters
130 RCRD TBL%(),A%()
:
' Executes the read operation
140 END
(2) Program example for a format 2 control table
100 DIM TBL%(10),A%(100)
:
'Defines arrays
110 TBL%(0)=256
:
'Specifies a format 2 control table
120 TBL%(1)=1
:
'Specifies network number 1
130 TBL%(2)=1
:
'Specifies station number 1
140 TBL%(4)=22
:
'Specifies to read routing parameters
150 PCRD TBL%( ),A%( )
:
'Executes the read operation
160 END