EasyManuals Logo

Panasonic FP Series User Manual

Panasonic FP Series
1345 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #231 background imageLoading...
Page #231 background image
Conversion instructions
230
Part II IEC Instructions
Example 2
This example illustrates how you create a STRING[7] with 4 positions before and 2 positions after
the decimal point out of the data type REAL.
The example is programmed in LD and IL. The same POU header is used for both programming
languages.
POU header
In this example, both an input variable input_value of the data type REAL and an output variable
result_string of the data type STRING[7] are declared.
Body
In carrying out the operation in question, the standard function MID is attached to the function
REAL_TO_STRING. MID creates a central sector in the character string from position P (INT
value) with L (INT value) characters.
In the example, the INT constant 7 is entered at the L input of MID, which determines the length of
the result string. The INT constant 4 at input P determines the position at which the central sector
begins. Out of the variable input_value = -123.4560166, the STRING ' -123.4560166' results
from the data type conversion. The MID function cuts off the STRING at position 4 and yields the
result_string '-123.45'.
LD

Table of Contents

Other manuals for Panasonic FP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Panasonic FP Series and is the answer not in the manual?

Panasonic FP Series Specifications

General IconGeneral
MountingDIN rail
TypePLC
Communication InterfaceRS-232, RS-485, Ethernet (depending on model)
Input Voltage100-240V AC or 24V DC (depending on model)
Output TypeRelay, Transistor
I/O PointsVaries by model
Operating Temperature0°C to 55°C
DimensionsVaries by model
WeightVaries by model

Related product manuals