Mitsubishi Electric MELSEC-Q/L Programming Manual page 84

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

Advertisement

The value to be input to (s) is string type data within the following range.
ASCII code: '30H' to '39H', '20H', '2DH', and '00H'
String type data: -2147483648 to 2147483647
■Operation result
• Function without EN/ENO
The following table shows the operation results.
Operation result
No operation error
Operation error
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
Operation error
• An operation error occurs in the following cases.
Error
Description
code
4100
The input value is other than '30H' to '39H', '20H', '2DH', and '00H' of ASCII
code.
When the STR_TO_INT(_E) instruction is used, the input value is outside the
range of -32768 to 32767.
When the STR_TO_DINT(_E) instruction is used, the input value is outside
the range of -2147483648 to 2147483647.
Program example
■STR_TO_INT(_E)
The program which converts string type data input to (s) into word (signed) type data, and outputs the operation result from
(d).
• Function without EN/ENO (STR_TO_INT)
[Structured ladder/FBD]
[ST]
g_int1 := STR_TO_INT(g_string1);
• Function with EN/ENO (STR_TO_INT_E)
[Structured ladder/FBD]
[ST]
g_bool3 := STR_TO_INT_E(g_bool1, g_string1, g_int1);
5 APPLICATION FUNCTIONS
82
5.1 Type Conversion Functions
(d)
Operation output value
Undefined value
ENO
TRUE (No operation error)
*1
FALSE
(d)
Operation output value
Undefined value
Q00J/
QnH
QnPH
Q00/
Q01
QnPRH
QnU
LCPU

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents