Converting String Type To Word (Signed), Double Word (Signed) Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Converting string type to word (signed), double word (signed)
type
STR_TO_INT(_E), STR_TO_DINT(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
STR_TO_INT_E
EN
ENO
s
d
The following function(s) can go in the dotted squares.
STR_TO_INT, STR_TO_INT_E, STR_TO_DINT, STR_TO_DINT_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_STRING)
Output argument
ENO
d
Processing details
■Operation processing
• STR_TO_INT, STR_TO_INT_E
Converts string type data input to (s) into word (signed) type data, and outputs the operation result from (d).
High-order byte
String 1st word
ASCII code of ten-thousands place
2nd word
ASCII code of hundreds place ASCII code of thousands place
3rd word
ASCII code of units place ASCII code of tens place
4th word
00
(Indicates the end of the character string.)
H
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: '-32768' to '32767'
• STR_TO_DINT, STR_TO_DINT_E
Converts string type data input to (s) into double word (signed) type data, and outputs the operation result from (d).
High-order byte
String 1st word
ASCII code of billions place
2nd word
ASCII code of ten-millions place ASCII code of hundred-millions place
3rd word
ASCII code of hundred-thousands place ASCII code of millions place
4th word
ASCII code of thousands place ASCII code of ten-thousands place
5th word
ASCII code of tens place
6th word
00
H
Indicates the end of the character string.
LCPU
ST
ENO:=
(EN, s, d);
STR_TO_INT_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
Execution result (TRUE: Normal, FALSE: Error)
Output
s
Low-order byte
Sign data
s
Low-order byte
Sign data
ASCII code of hundreds place
ASCII code of units place
Data type
Bit
String(6)/(11)
Bit
Word (signed), double word (signed)
d
Word (signed) type
d
Double word (signed) type
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
81

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents