F118_Udc - Panasonic FP Series Programming Manual

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Counter instructions

F118_UDC

DOWN counting if the trigger UpDirection is in the OFF state. UP counting if the trigger
Description
UpDirection is in the ON state.
CountTrigger: Adds or subtracts one count at the rising edge of this trigger.
Reset_Preset: The condition is reset when this signal is on.
The area for the elapsed value d becomes 0 when the rising edge of the trigger is detected (OFF
 ON). The value in s_PresetValue is transferred to d when the falling edge of the trigger is
detected (ON  OFF).
s_PresetValue: Preset (Set) value or area for Preset (Set) value.
d: Area for count (elapsed) value.
PLC types
Availability of F118_UDC (see page 1320)
Data types
Variable
UpDirection
CountTrigger
Reset_Preset
s_PresetValue
d
The variables s and d have to be of the same data type.
Operands
For
UpDirection,
CountTrigger,
Reset_Preset
s_PresetValue
d
In this example the function has been programmed in ladder diagram (LD) and structured text
Example
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
708
UP/DOWN counter
Data type
Function
BOOL
sets counter to count up (ON) or down (0FF)
BOOL
starts counter
BOOL
resets counter
16-bit area or equivalent constant for counter preset value
ANY16
16-bit area for counter elapsed value
Relay
X
Y
R
L
WX
WY
WR
WL
-
WY
WR
WL
T/C
Register
T
C
-
-
-
SV
EV
DT
LD
FL
SV
EV
DT
LD
FL
Constant
-
dec. or hex.
-

Advertisement

Table of Contents
loading

Table of Contents