Mitsubishi QD51 Programming Manual page 213

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Converts a single precision real number to a floating decimal point real number for AnACPU, and
writes to D0, D1.
20 DIM TBL%(5),A%(1)
30 A!=5.6767
50 A$=MKS$(A!)
70 B!=CVSMBF(A$)
90 ZMOVE TO A%(),0 FROM B!,0.4
100 TBL%(0)=255
110 TBL%(1)=1
120 TBL%(2)=2
130 TBL%(3)=18
140 TBL%(4)=0
150 TBL%(5)=2
160 PCWT TBL%(),A%()
170 END
11 - 43
REMARK
• The values from the CVSMBF function has no meaning on AD51H-BASIC.
• See the CVDMBF, MKDMBF$ and MKSMBF$ functions.
:
' Defines arrays
:
' Defines a single precision real number
:
' Converts into a character string
:
' Converts into the IEEE (AnACPU) format
:
' Stores in array A%
:
' Sets the communication station number to
the local station
:
' Specifies writing to the device memory
:
' Specifies word as the unit
:
' Specifies the data register
:
' Specifies the device number
:
' Specifies the number of processing items
:
' Executes the write operation
MELSEC-Q
11 - 43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents