Applications
5-6
Series
505 High Speed Counter
and Encoder Module User
’
s Manual
5.3 Tank Filling Example5.3.1
Description The
HSC module measures the volume of liquid and control the filling
valve. (See Figure 5-6.) A flow meter
, generating 200 pulses per gallon, is
connected to the HSC channel 2, input A. Output 2 controls the filling
valve. In this example, the HSC operates in the pulse counter mode.
Solution
A count of 100,000 pulses is required to fill the tank to 500 gallons. As this
would overflow the HSC, the following RLL is used to count 10 sets of
10,000 pulses before closing the filling valve. In this program, output 1 is
used to indicate 10,000 pulses. Since the HSC runs asynchronous to the
PLC, the program accumulates overcounts for each loop and adjusts the
final loop to reach the exact count. The program utilizes the fact that the
HSC WX’
s are read before the WY’
s are written in an I/O cycle.
Several V memory locations are used in the program, their initial values
are:
V200 = 10,000 =
channel 2, preset 1
V201 = 30,000 =
channel 2, preset 2 initial value
V100 = 0
(overcounts will be accumulated here)
Y20
Input A
Output 2
HSC Channel 2
Figure 5-6 T
ank Filling Application