RPM via HSC (CompactLogix)

sacsac

Member
Join Date
Jan 2008
Location
Mississippi
Posts
37
Hi all. I'm having some trouble calculating RPM of a motor using an HSC card in a CompactLogix. My original method: Every one second I'd divide the current count of my high speed counter by counts per revolution to get revs per second. Then I'd multiply that by 60 to get RPM and then reset the high speed counter using its SoftPreset bit.

The problem with this was that the counter would reset correctly sometimes, but not every time. It was very inconsistent. So after talking with AB, they said that the SoftPreset bit is not designed for this type of operation. They said it is not scanned quickly enough for this. This SoftPreset bit is meant more for a situation where, for example, parts have been counted and the operator wants to reset his count by pressing a button which triggers the SoftPreset bit.

So, I tried this: I set my high speed counter to reset when it reached a certain count, so I wouldn't be resetting it by the SoftPreset bit. Then I used a normal CTU to count the number of times the HSC reached a certain count (basically just counting revolutions with a CTU). Then every one second, move the CTU accumulator to a internal word, multiply that by 60 to get RPM and reset the CTU. This was also not consistent. It also seemed like I was missing counts this way.

So, I'm not sure where to go from here. Your input would be greatly appreciated.
 
Attached is the generic method I use in Logix PLC's.

It uses a periodic task, the HSC Value, and the HSC Module timestamp to eliminate errors and jitter.

Just posting the code (for rate of both channels) since I'm too lazy to try to explain it.

Clause to prevent pre-emptive clauses: Yes, I know the counter module has a frequency mode, but most often I need the real count, so keep them all set up in encoder mode, and do the rate calculations myself. Using the actual Module Timestamp cleans up almost all problems with this method.
 
Last edited:
I use delta processing in situations like this. Give the counter a large number to rollover at (say 9,999,999). Take a snapshot of the count once a second and multiply the diference between snapshots by 60. Make sure to compensate when the counter does the rollover.
 

Similar Topics

Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
105
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,061
Hi all, I am implementing an incremental encoder sensor (ABZ) to replace the existing "manual" encoder wheel I have in my device. This is a 360...
Replies
0
Views
174
Dear We are working in AB Studio 5000 and the drive is a PowerFlex 755T. For this project I need to control a conveyor to a certain set point...
Replies
2
Views
152
Hello all, Quick question. If motor name plate says 1400 RPM @50 Hz and VFD speed is set to 20Hz does that mean the motor shaft is rotating at...
Replies
3
Views
832
Back
Top Bottom