11 - 38 11 - 38
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
CVD
Function
ConVert to Double
• Converts a character string, which was converted by the MKD$ function, back to a double
precision real number.
CVD ( <character string expression> ) [, S] )
Syntax
character string expression
• • • •
Specify the character string that was converted by
the MKD$ function.
A#=CVD(MD$)
• • • •
Converts the character string (MD$), which was
converted by the MKD$ function, back to the original
double precision real number and assigns it to A#.
Examples
B#=CVD(MD$, S)
• • • •
After replacing the contents of the character string
MD$, converts it back to the original double precision
real number and assigns it to B#.
Description
• The CVD function converts the character string, which was converted by the MKD$
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 double precision real number is converted into an 8-byte character string by the MKD$
function before written into a file. Conversely, the 8-byte character string has to be
converted back to the original double precision real number when this data is read from
the file and to treat as a real number. The CVD function is used for this purpose.
• The CVD function can convert only the character string, which was converted by the MKD$
function, into a double 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 MKD$ 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 double precision real number.
Original character string
L
H
L
H
L
H
1)
2)
3)
4)
5)
6)
7)
8)
L
H
Converts into a double
precision real number.
#
8)
7)
6)
5)
4)
3)
2)
1)
Lower word
Higher word
Lower word
Higher word
REMARK
See the MKD$ function.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...