Rpm calculation application example – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual
Page 378
Preface
MicroLogix 1000 Programmable Controllers User Manual
E–28
RPM Calculation Application Example
The following application example illustrates how to calculate the frequency and
RPM of a device (such as an encoder) connected to a high-speed counter. The
calculated values are only valid when counting up. For a detailed explanation of:
•
XIC, XIO, CTU and TON instructions, see chapter 6.
•
LES instruction, see chapter 7.
•
CLR, MUL, DIV, DDV, ADD, and SUB instructions, see chapter 8.
•
MOV instruction, see chapter 9.
RPM Calculation Operation Overview
This is done by manipulating the number of counts that have occurred in the
high-speed counter accumulator (C0.ACC) over time. To determine this you must
provide the following application specific information:
•
N7:2 – Counts per Revolution. (i.e., the number of encoder pulses per
revolution i.e., the number of pulses until reset). This value is entered in whole
counts. For example, you would enter the value 1000 into N7:2 for a 1000
count A/B/Z encoder.
•
T4:0.PRE– The Rate Measurement Period (i.e., the amount of time in which to
sample the accumulation of counts). This value is entered in .01 second
intervals. For example, enter the value 10 into T4:0.PRE for a .1 second rate
measurement period . For an accurate frequency and RPM calculation to occur,
the value entered must divide evenly into 100. For example valid=20,10,5,4,2,1
and invalid=11,9,8,7,6,3.