Cvi ( Converts A Character String, Which Was Converted By The Mki$ Function, Back To An Integer ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
CVI
Function
• Converts a character string, which was converted by the MKI$ function, back to an integer.
CVI ( <character string expression> ) [, S] )
Syntax
character string expression
A%=CVI(MI$)
Examples
B%=CVI(MI$, S)
• The CVI function converts the character string, which was converted by the MKI$ function,
Description
back to the original numeric value.
• Since all the data, which is written into the random access file, has to be a character string,
an integer is converted into a 2-byte character string by the MKI$ function before written
into a file. Conversely, the 2-byte character string has to be converted back to the original
integer when this data is read from the file and to treat as an integer. The CVI function is
used for this purpose.
• The CVI function can convert only the character string, which was converted by the MKI$
function, into an integer. 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 MKI$ 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 an integer.
11 - 40
ConVert to Integer
• • • •
• • • •
• • • •
Original character string
L
1)
H
2)
REMARK
See the MKI$ function.
Specify the character string that was converted by
the MKI$ function.
Converts the character string (MI$), which was
converted by the MKI$ function, back to the original
integer and assigns it to A%.
After replacing the contents of the character string
MI$, converts it back to the original integer and
assigns it to B%.
Converts to an
integer.
2)
1)
MELSEC-Q
%
11 - 40

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents