11 - 150 11 - 150
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
MKSMBF$
Function
MaKe Single Microsoft Binary Format $
• Converts data of floating point real numbers used by the AnA/AnU/AnUSCPU (IEEE format
single-precision internal expression) into a character string that can be converted to a
numeric value using the CVS function.
MKSMBF$ ( <numeric expression> )
Syntax
numeric expression
• • • •
Specify a numeric value of floating point real
numbers used by the AnA/AnU/AnUSCPU (IEEE
format single-precision internal expression).
Examples
A!=CVS(MKSMBF$(B!))
• • • •
Converts value B!, which is a floating point real
number used by the AnA/AnU/AnUSCPU (IEEE
format single-precision internal expression) into an
internal expression of an AD51H-BASIC single-
precision real number and stores it in A!.
Description
• The MKSMBF$ function converts data of floating point real numbers used by the
AnA/AnU/AnUSCPU (IEEE format single-precision internal expression) into a character
string that can be converted to a numeric value using the CVS function in AD51H-BASIC.
• The AnA/AnU/AnUSCPU internal expression (IEEE format single-precision internal
expression) and the AD51H-BASIC internal expression for real numbers are different. The
MKSMBF$ function converts between the two.
• Be sure to specify a numeric value of AnA/AnU/AnUSCPU internal expression (IEEE
format single-precision internal expression) for the <numeric expression>. Conversion will
not be performed correctly with other numeric values.
• The MKSMBF$ function only performs data conversion for single-precision real numbers.
• When reading an AnA/AnU/AnUSCPU floating point real number with the PCRD
instruction, store the data in integer arrays. Then assign the data to a single-precision real
number variable, and then convert with the MKSMBF$ function.
PCRD Instruction
AnA/AnU/AnUSCPU
%(1)
%(0)
Integer value 16 bits x 2
2 bytes x 2
Transfers using the
ZMOVE instruction.
ZMOVE TO ! , 0
FROM %( ), 0, 4
Single-precision real number
32 bits = 4 bytes
!
Converts this value
with MKSMBF$ function.
• Other than converting AnA/AnU/AnUSCPU floating point data, the MKSMBF$ function is
used, for example, to convert system data that performs internal expression of IEEE
format single-precision numeric values.