Panasonic FP Series Programming Manual page 226

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

DINT_TO_STRING_
LEADING_ZEROS
This function converts a value of the data type DINT (positive value) to a value of the data type
Description
STRING. It generates a result string in decimal representation that is right aligned. It is filled with
leading zeros up to the maximum number of characters defined for the string.
Example
Explanation
Function used
String1:=DINT_TO_STRING(12345678)
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.
Availability of DINT_TO_STRING_LEADING_ZEROS (see page 1319)
PLC types
 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
Data types
Data type
DINT
STRING
DOUBLE INTEGER into STRING
String1
defined as
STRING[2]
STRING[4]
STRING[6]
STRING[8]
STRING[10]
STRING[12]
and so on...
I/O
Function
input
input data type
output
conversion result
Result
'78'
'5678'
'345678'
'12345678'
'0012345678'
'000012345678'
Conversion instructions
225

Advertisement

Table of Contents
loading

Table of Contents