Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 88

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
Error
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When the value stored in a device specified in
-126
≤ (Value of device specified in
0, ±2
(Error code: K6706)
2) When the range of a device which will store the character string obtained by conversion (device specified
in
) exceeds the range of the corresponding device
d
(Error code: K6706)
3) When the conversion result exceeds the specified total number of digits
(Error code: K6706)
Program example
In this program, float (single precision) data stored in a device specified in
and the data obtained by conversion is output to a device specified in
1) Function without EN/ENO(REAL_TO_STR)
[Structured ladder]
g_real1=-12.34567
[ST]
g_string1 := REAL_TO_STR(g_real1);
2) Function with EN/ENO(REAL_TO_STR_E)
[Structured ladder]
g_bool1
g_real1
[ST]
g_bool3 := REAL_TO_STR_E(g_bool1, g_real1, g_string1);
86
s
REAL_TO_STR
g_string1="-1.23457E+01"
_REAL
REAL_TO_STR_E
g_bool3
EN
ENO
_REAL
g_string1
is outside the following range:
s
128
) ≤ ±2
d
5 Applied Functions
5.1 Type Conversion Functions
is converted into string data,
s
.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents