Mitsubishi Electric MELSEC-Q/L Programming Manual page 91

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

Advertisement

■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• 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
These functions consist of the following instructions.
STR_TO_WORD(_E): HABIN
STR_TO_DWORD(_E): DHABIN
• In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and the corresponding error
code is stored to SD0.
Error
Description
code
4100
The ASCII code for each number specified for (s) is outside the range of 30H
to 39H, 41H to 46H.
4101
The device specified for (s) exceeds the corresponding device range.
Program example
■STR_TO_WORD(_E)
The program which converts string type data input to (s) into word (unsigned)/16-bit string type data, and outputs the
converted data from (d).
• Function without EN/ENO (STR_TO_WORD)
[Structured ladder/FBD]
[ST]
g_string1 := "0012"
g_word1 := STR_TO_WORD(g_string1);
• Function with EN/ENO (STR_TO_WORD_E)
[Structured ladder/FBD]
[ST]
g_string1 := "0012";
g_bool3 := STR_TO_WORD_E(g_bool1, g_string1, g_word1);
ENO
TRUE
*1
FALSE
(d)
Operation output value
Undefined value
Q00J/
QnH
QnPH
QnPRH
Q00/
Q01
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
QnU
LCPU
89

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents