Converting String Type To Single-Precision Real Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Converting string type to single-precision real type

STR_TO_REAL(_E)
Ver.
High
Basic
Process
performance
This function is used in the Basic model QCPU with a serial number (first five digits) of "04122" or later.
Structured ladder/FBD
STR_TO_REAL_E
EN
ENO
s
The following function(s) can go in the dotted squares.
STR_TO_REAL, STR_TO_REAL_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• Converts string type (decimal form/exponential form) data input to (s) into single-precision real type data, and outputs the
operation result from (d).
High-order byte
String 1st word
ASCII code of 1st character
2nd word
ASCII code of 3rd character ASCII code of 2nd character
3rd word
ASCII code of 5th character
4th word
ASCII code of 7th character
5th word
ASCII code of 9th character
6th word
ASCII code of 11th character
7th word
00
H
5 APPLICATION FUNCTIONS
84
5.1 Type Conversion Functions
LCPU
Redundant Universal
ST
ENO:=
STR_TO_REAL_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_STRING)
Input
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
s
Low-order byte
Sign date
ASCII code of 4th character
ASCII code of 6th character
ASCII code of 8th character
ASCII code of 10th character
(Indicates the end of the character string.)
(EN, s, d);
d
Single-precision real type
Data type
Bit
String (24)
Bit
Single-precision real number

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents