Panasonic FP Series Programming Manual page 267

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

String instructions
RIGHT
RIGHT copies, starting from the right, n characters of the string of the first input variable to the
Description
output variable. You define the number of characters to be delivered n by the second input
variable.
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 RIGHT (see page 1330)
PLC types
 If the number of characters to be delivered is greater than the input
string, the complete string will be copied to the output variable
(output_string).
 If the output string is longer than the length defined for the output
variable in the field "Type", only as many characters are copied from
the left as the output variable can hold. The special internal relay
R9009 (%MX0.900.9) is set.
 The number of steps may vary depending on the PLC and parameters
used, see also Table of Code Intensive Instructions in the online help.
(up to 200 steps)
Data types
Data type
STRING
INT
STRING
Error flags
No.
IEC address
%MX0.900.7
R9007
%MX0.900.8
R9008
%MX0.900.9
R9009
In this example, the same POU header is used for all programming languages. For an example
Example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables which are required for programming the function are declared in the
POU header.
266
Copy characters from the right
I/O
Function
1st input
input string
2nd
number of input string's characters that are copied, from the right
input
output
copied string
Set
permanently
for an instant
for an instant
If
 input string is longer than the length
defined for the input variable in the field
"Type"
 output string is longer than the length
defined for the output variable in the field
"Type"

Advertisement

Table of Contents
loading

Table of Contents