Panasonic FP Series Programming Manual page 925

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Timer instructions
Data types
Variable
Data type
BOOL
start
INT, WORD
SV
BOOL
T
INT, WORD
EV
Operands
For
X
start
-
T
-
SV, EV
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 used for programming the function block TM_1s_FB are
declared in the POU header. This also includes the function block (FB) itself. By declaring the FB
you create a copy of the original FB. This copy is saved under Alarm_Control, and a separate
data area is reserved.
This example uses variables. You may also use constants for the input variables.
Body
As soon the variable Start_contact becomes TRUE, the timer Alarm_control will be started. The
variable EV of the timer is set to the value of SV. As long as Start_contact is TRUE, the value 1 is
subtracted from EV every 1s. When EV reaches the value 0 (after 10 seconds as SV = 10 with the
timer type TM_1s_FB), the variable Alarm_Relay_2 becomes TRUE.
As soon as the value of the variable EV of the timer is smaller than or equal to 5 (after 5s) and EV
is unequal 0, Alarm_Relay_1 is set to TRUE.
924
Function
start contact
set value
timer contact
elapsed value
Relay
T/C
Y
R
L
T
Y
R
L
-
WY
WR
WL
SV
Register
Constant
C
-
-
-
-
-
-
-
EV
DT
LD
FL
-
-
-

Advertisement

Table of Contents
loading

Table of Contents