Mksmbf - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS

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.
MKSMBF$ ( <numeric expression> )
Syntax
numeric expression
A!=CVS(MKSMBF$(B!))
Examples
• The MKSMBF$ function converts data of floating point real numbers used by the
Description
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
• 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.
11 - 150
MaKe Single Microsoft Binary Format $
• • • •
• • • •
%(0)
%(1)
Integer value 16 bits x 2
2 bytes x 2
Specify a numeric value of floating point real
numbers used by the AnA/AnU/AnUSCPU (IEEE
format single-precision internal expression).
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!.
Transfers using the
ZMOVE instruction.
ZMOVE TO
! , 0
FROM
%( ), 0, 4
MELSEC-Q
!
Single-precision real number
32 bits = 4 bytes
Converts this value
with MKSMBF$ function.
11 - 150

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents