FX Series Programmable Controlers Applied Instructions 5
5-78
5.6.7 SPD (FNC 56)
Operation:
The number of pulses received at S
1 are counted
and stored in D
+1; this is the current count value.
The counting takes place over a set time frame
specified by S
2 in msec. The time remaining on the
current ‘timed count’, is displayed in device D
+2.
The number of counted pulses (of S
1)fromthelast
timed count are stored in D. The timing chart
opposite shows the SPD operation in a graphical
sense. Note:
À: Current count value, device D
+1
Á: Accumulated/ last count value, device D
Â: Current time remaining in msec, device D+2
Points to note:
a) When the timed count frame is completed the data stored in D
+1 is immediately written to D.
D
+1 is then reset and a new time frame is started.
b) Because this is both a high speed and an interrupt process only inputs X0 to X5 may be
used as the source device S
1. However, the specified device for S1 must NOT coincide with
any other high speed function which is operating, i.e. a high speed counter using the same
input. The SPD instruction is considered to act as a single phase counter.
c) Multiple SPD instructions may be used, but the identified source devices S
1 restrict this to a
maximum of 6 times.
d) Once values for timed counts have been collected, appropriate speeds can be calculated
using simple mathematics. These speeds could be radial speeds in rpm, linear speeds in M/
min it is entirely down to the mathematical manipulation placed on the SPD results. The
following interpretations could be used;
Mnemonic Function
Operands
Program steps
S
1 S2 D
SPD
FNC 56
(Speed
detection)
Detects the
number of
‘encoder’ pulses
inagiventime
frame. Results
canbeusedto
calculate speed
X0 to X5 K, H,
KnX, KnY,
KnM, KnS,
T, C, D, V,
Z
T, C, D, Z (V)
Note:
3 consecutive devices
are used. In the case
of
D= Z monitor D8028,
D8029 and D8030
SPD:
7steps
FX
1S
FX1N FX2N
FX2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
X10
K100X 0 D 0SPD
[ S1 ]
[ S2 ]
[ D ]
2
1
3
X10
S1
S2
S2
Linear speed N (km/h) =
3600 × (D)
n × S
2
× 10
3
Radial speed N (rpm) =
60 × (D)
n × S
2
× 10
3
where n = the number of encoder pulses per revolution of the encoder disk.
where n = the number of linear encoder divisions per kilometer.