Panasonic FP Series Programming Manual page 340

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

SUB_TIME
SUB_TIME subtracts the value of the second input variable from the value of the first input variable
Description
and writes the result 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 SUB_TIME (see page 1331)
PLC types
Data types
Data type
TIME
TIME
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.
In this example the input variables (minuend and subtrahend) have been declared. Instead, you
may enter constants directly at the input contacts of a function.
Body
Subtrahend is subtracted from minuend. The result will be written into result.
LD
ST
When programming with structured text, enter the following:
result:= SUB_TIME(minuend, subtrahend);
Subtract TIME
I/O
Function
1st input
minuend
2nd input
subtrahend
output
result
Timer instructions
339

Advertisement

Table of Contents
loading

Table of Contents