Panasonic FP Series Programming Manual page 916

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

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_1ms_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 1ms. When EV reaches the value 0 (after 1 second as SV = 1000 with
the timer type TM_1ms_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 500 (after 0.5s) and
EV is unequal 0, Alarm_Relay_1 is set to TRUE.
LD
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
Timer instructions
-
-
-
915

Advertisement

Table of Contents
loading

Table of Contents