Panasonic FP Series Programming Manual page 221

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Conversion instructions
INT_TO_STRING_
LEADING_ZEROS
The function INT_TO_STRING_LEADING_ZEROS converts a value of the data type INT (positive
Description
values) to a value of the data type STRING.
Generates a result string in right-aligned decimal representation, filled with leading spaces up to
the predefined maximum number of characters.
Example:
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Data types
Data type
INT
STRING
Explanation
Function used
String1:=INT_TO_STRING(25)
PLC types Availability of INT_TO_STRING_LEADING_ZEROS (see page 1327)
 When using the data type STRING with small PLCs like FP-e or FP0,
make sure that the length of the result string is equal to or greater than
the length of the source string.
 For further information refer to the online help: Upgrade Problems with
Data Type STRING
220
INTEGER into STRING
I/O
Function
input
input data type
output
conversion result
String1
defined as
STRING[1]
STRING[2]
STRING[3]
STRING[4]
STRING[5]
STRING[6]
STRING[7]
STRING[8]
and so on...
Result
'5'
'25'
'025'
'0025'
'00025'
'000025'
'0000025'
'00000025'

Advertisement

Table of Contents
loading

Table of Contents