11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Converts 2-word integer in D0, D1 to a double precision real number
20 DIM TBL%(5),A%(1)
30 TBL%(0)=255
40 TBL%(1)=1
50 TBL%(2)=2
60 TBL%(3)=18
70 TBL%(4)=0
80 TBL%(5)=2
90 PCRD TBL%(),A%()
100 A#=CIDB(A%(0))
110 PRINT "D0,D1value-->";A#
120 END
11 - 22
REMARK
See the CSNI instruction, CIDB function, CISN function, PCRD instruction, PCWT
function, and Chapter 4.
:
' Defines arrays
:
' Sets the communication station number to
the local station
:
' Specifies readout of the device memory
:
' Specifies word as the unit
:
' Specifies the data register
:
' Specifies the starting device number to be
read
:
' Specifies the readout count
:
' Executes the read operation
:
' Converts into a double precision real
number
MELSEC-Q
11 - 22