Sign in to follow this  
Followers 0
drews1f

1769-HSC Getting the RPM

3 posts in this topic

Hi there, We are using a CompactLogix PLC with a 1769-HSC card to acquire the RPM of a moving headstock. For several years we have done this using a clumsy piece of ladder logic. Upon revisiting the manual it appears you can calculate the RPM directly to the Local:1:I.Ctr0CurrentRate value. We are using a 500 PPR rotary encoder but we are having no luck getting this to work. Can anyone offer some guidance on what configuration settings we should be using to achieve the RPM value? Thanks

Share this post


Link to post
Share on other sites
Depending of your required resolution, first set "Counter x Cyclic Rate Update Time" to your desired (1-32767) miliseconds value. This is the interval the module will calculate the Number of Pulses / (Chosen) Update Period. When done defining the sample period just implement a simple CPT ladder logic in order to obtain the RPM value. (Too bad the HSC module doesn't support 32 bit resolution... ...You could've set the "Counter x Cyclic Rate Update Time" to 60000 then just divide the result by the encoder PPR... ) For example, if you have a 500 PPR encoder connected to one of the 1769-HSC counters, set the "Counter x Cyclic Rate Update Time" to 1000 (1 second) then divide "Counter x Current Rate" by the encoder PPR (500) the result of which would be multiplied by 60. The computed result of ("Counter x Current Rate"/500) X 60 is the RPM for the chosen counter update period. If higher/lesser resolution is needed, you could reduce/increase the "Counter x Cyclic Rate Update Time" and then reflect the new scaling within the Multiplier Term. The HSC counter calculates the rate via the formulae Current Rate =1000 x ? count/CyclicRateUpdateTime x Scalar Hence, if you want to do everything at the module level, without any programming "supervision", set your "Counter x Scalar" to (Encoder PPR/60), set the "Counter x Cyclic Rate Update Time" to 80 ms ;the "Counter x Current Rate" will return your desired RPM. Edited by dmargineau

Share this post


Link to post
Share on other sites
Thanks for the post! My real problem was that Encoder PPR/60 was 8.3 and the scalar value only accepts a whole number. To get around it I multiplied the 8.3 by 10 and set scalar to 83. Cyclic Rate Update time was set to 100ms. Then i just used some ladder logic to multiply the CurrentRate value by 60 to get the pulses per minute, that value is then divided by the PPR value (500 in this case) and then this value is further divided by the gear ratio to achieve the RPM. Thanks for putting me on the right track.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0