Rpm calculation instruction list program – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 487

Advertising
background image

Appendix E
Application Example Programs

E–44

RPM Calculation Instruction List Program

File 2, Rung 0

Ensures that the measurement value is initialized each RRUN mode entry.

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
20 |–] [– LD
1’st pass
S1/15 0

106 MOV SRC C0.ACC 0000H
last timeout value storage register
DEST N0 0000H

7 RES C0

85 CLR
Counts last rate measurement period
DEST N1 0000H

85 CLR
Frequency in Hertz
DEST N4 0000H

85 CLR
RPM based on counts per turn register N7:2
DEST N5 0000H

File 2, Rung 1

Sets the rate measurement period. In this case, we are calculating a new
rate value once every 100ms. Value N7:1 is updated once every 100ms with
the number of counts that have occurred in the last 100ms period. Note
that the preset value must divide evenly into 100 in order to accurately
determine frequency and RPM (determined later in this program).

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
21 |–]/[– LDI
Rate Period Expiration Bit
T0/DN 0

0 TON Counts last rate measurement period

Rate Period Expiration Bit
TIMR T0
BASE 0.01
PRE 10
ACC 0000H

Advertising