Mitsubishi QD51 Programming Manual page 321

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Reads AnACPU floating point real numbers from D0 and D1 and convert them into single-
precision real numbers
30 DIM TBL%(5),A%(3)
40 TBL%(0)=255
50 TBL%(1)=1
60 TBL%(2)=2
70 TBL%(3)=18
80 TBL%(4)=0
90 TBL%(5)=2
100 PCRD TBL%( ),A%( )
105 A!=0
110 ZMOVE TO A!,0 FROM A%( ),0,4
120 B!=CVS(MKSMBF$(A!))
130 PRINT "Floating point real number from D0, D1-->";B!
140 END
11 - 151
REMARK
See the CVDMBF, CVSMBF, and MKDMBF$ functions.
:
' Defines array
:
' Sets communication station number to
local station
:
' Specifies to read the device memory data
:
' Specifies the word unit
:
' Specifies the data register
:
' Specifies the starting device number to be
read
:
' Specifies the number of points to be read
:
' Starts reading
:
' Stores dummy in A!
:
' Stores data read from A!
:
' Executes conversion
MELSEC-Q
11 - 151

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents