Panasonic FP-E Programming Manual page 532

Fp series
Table of Contents

Advertisement

High−level Instructions
Explanation of example
The program on the preceding page shows an example in which initial values are set, and when the target
value is 0, external output Y50 goes on.
This can be used, for example, in programs such as those that cause a display lamp to light when the work
being added or subtracted has reached a certain quantity.
1)
When the trailing edge of rest input X2 is detected (on → off), data (target value) in data register DT10 is
transferred to DT0.
2)
One is subtracted from value of DT0 when the count input R1 turns on while R0 is in the off state.
(DOWN counter operation)
One is added to DT0 when the count input R1 turns off while the UP/DOWN input R0 is in the on state.
(Up counter operation)
3)
If the counter elapsed value area DT0 = K0, external output Y50 turns on.
on
R2
off
on
R0
off
on
R1
off
on
Y50
off
Value
of DT0
Preset
Reset
Description
The counter is switched between an incremental count (addition) or decremental count (subtraction) by
turning the relay specified for up/down input on or off.
When the up/down input is on, the incremental counter (+1) is effective, and when it is off, the decremental
counter (−1) is effective. The elapsed value is stored in the area specified by the D.
The preset value in S is transferred to D when the trailing edge of the reset input is detected (on → off). Set
value range K-32768 to K32767 (H8000 to H7FFF)
When the count input is switched from off to on (the reset input is in "off" state), the value specified for the D is
initialized, and the counting operation begins.
The elapsed value area of D is cleared when the reset input turns on.
The results of the counting operation can be determined by comparing the elapsed value of D with the
specified value, using the data comparison instruction.
The data comparison instruction should be executed immediately following execution of F118 (UDC)
instruction.
3 − 268
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
Time

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents