Panasonic FP Series Programming Manual page 335

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Timer instructions
DIV_TIME_REAL
DIV_TIME_REAL divides the value of the first input variable of the data type TIME by the value of
Description
the second input variable of the data type REAL. The REAL value is rounded off to the nearest
whole number. The result is written into the output 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 DIV_TIME_REAL (see page 1319)
PLC types
Data types
Data type
TIME
REAL
TIME
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 used for programming this function have been declared in the POU
header.
Body
The value of variable input_time is divided by the value of the variable input_real. The result is
written in div_result. In this example the input variables have been declared in the POU header.
However, you may enter constants directly at the contact pins of the function.
LD
ST
When programming with structured text, enter the following:
div_result:=DIV_TIME_REAL(input_time, input_real);
334
Divide TIME by REAL
I/O
Function
1st input
dividend
2nd input
divisor
output
result

Advertisement

Table of Contents
loading

Table of Contents