![FATEK FBs Series Manual Download Page 230](http://html1.mh-extra.com/html/fatek/fbs-series/fbs-series_manual_3764826230.webp)
Advanced Function Instruction
7 -6 6
FUN 83
SPD
SPEED DETECTION
FUN 83
SPD
S : Pulse input point for speed detection
TI : Sampling duration
(units in mS)
D : Register storing results
X
WX
WY
WM
WS TMR CTR
HR
IR
OR
SR
ROR DR
K
Range
Ope-
rand
X0
∣
X7
WX0
∣
WX240
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3840
∣
R3903
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
1
∣
32767
S
○
TI
○
○
○
○
○
○
○
○
○
○
○
○
○
D
○
○
○
○
○
○
○
○
○
*
○
*
○
z
This instruction uses the interrupt feature of the 8 high speed input points (X0~X7) on the PLC main unit to
detect the frequency of the input signal. Within a specific sampling time (TI), it will calculate the input pulse
count for S input point, and indirectly find the revolution speed of rotating devices (such as motors).
z
While use this instruction to detect the rotating speed of devices, The application should design to generate
more pulse per revolution in order to get better result, but the sum of input frequency of all detected signals
should under 5KHz, otherwise the WDT may occur.
z
The D register for storing results uses 3 successive 16-bit registers starting from D (D0~D2). Besides D0
which is used to store counting results, D1 and D2 are used to store current counting values and sampling
duration.
z
When detection control "EN" = 1, it starts to calculate the pulse count for the S input point, which can be
shown in D1 register. Meanwhile the sampling timer (D2) is switched on and keeps counting until the value of
D2 is reach to the sampling period (TI). The final counted value is stored into the D0 register, and then a new
counting cycle is started again. The sampling counting will go on repeating until "EN" = 0.
z
Because D0 only has 16 bits, so the maximum count is 32767. If the sampling period is too long or the input
pulse is too fast then the counted value may exceed 32767, under that case the overflow flag will set to 1, and
the counting action will stop.
z
Because the sampling period TI is already known and if every revolution of attached rotating device produces
"n" pulses, then the following equation can be used to get the revolution
speed :
)
rpm
(
10
×
TI
×
n
60
×
)
0
D
(
=
N
3
X20
EN
83.SPD
S :
D :
R 0
TI :
1000
X 0
OVF
z
In the above example, if every revolution of the rotating
device produces 20 pulses (n = 20), and the R0 value is
200, then the revolution per minute speed "N" is as
rpm
200
=
10
×
1000
×
60
60
×
)
200
(
=
N
:
follows
3
1000mS
1000mS
1000mS
R1a
R1b
R1c
a
b
c
R1a
R1b
R1c
1000
0
0
X0
R2
R1
R0
X20