sacsac
Member
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.
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.