Cvs - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS

CVS

Function
• Converts a character string, which was converted by the MKS$ function, back to a single
precision real number.
CVS ( <character string expression> ) [, S] )
Syntax
character string expression
A!=CVS(MS$)
Examples
B!=CVS(MS$, S)
• The CVS function converts the character string, which was converted by the MKS$
Description
function, back to the original numeric value.
• Since all the data, which is written into the random access file, has to be a character string,
a single precision real number is converted into a 4-byte character string by the MKS$
function before written into a file. Conversely, the 4-byte character string has to be
converted back to the original single precision real number when this data is read from the
file and to treat as a real number. The CVS function is used for this purpose.
• The CVS function can convert only the character string, which was converted by the MKS$
function, into a single precision real number. If other character stings are specified in
<character string expression>, normal data will not be returned or an "Illegal function call"
error occurs.
• The data, which was converted to a character string by the MKS$ function, can be used for
the data communication in addition to writing to a random access file.
• When the [, S] option is specified, the character string subject to the conversion is
rearranged as follows, then converted it into a single precision real number.
11 - 41
ConVert to Single
• • • •
• • • •
• • • •
Original character string
1)
L
Lower word
2)
H
L
3)
Higher word
4)
H
REMARK
See the MKS$ function.
Specify the character string that was converted by
the MKS$ function.
Converts the character string (MS$), which was
converted by the MKS$ function, back to the original
single precision real number and assigns it to A!.
After replacing the contents of the character string
MS$, converts it back to the original single precision
real number and assigns it to B!.
4)
3)
2)
1)
MELSEC-Q
Converts to a single
precision real number.
!
11 - 41

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents