plcguy98

slc500 speed / velocity calculation

4 posts in this topic

does anyone have any example code or experience using the RHC and TDF commands? i need to calculate speed based off of and input pulse. i know what the diameter, tooth count and pitch are of the gear i'm measuring and also have to relate this to the diameter of another gear. i'm hoping Ken Roach has some words of wisdom, i do appreciate advice from anyone. Thanks in advance.

Share this post


Link to post
Share on other sites

You mentioned two instructions that are specific to the MicroLogix 1100/1400 operating system;   Read High-Speed Clock (RHC) reads the fast free-running clock in the controller, and Compute Time Difference (TDF) that calculates the number of "clicks" between two timestamps captured by the RHC.

Is there a reason you don't want to use one of the hardware High-Speed Counters in the controller ?

I haven't actually ever used those instructions, but I can think of how to use them.

Are you literally counting gear teeth with a proximity sensor ?   What kind of tooth count and RPM will you be trying to measure ?  What's the response speed of the sensor itself ?

Share this post


Link to post
Share on other sites
On 10/22/2018 at 3:37 PM, Ken Roach said:

You mentioned two instructions that are specific to the MicroLogix 1100/1400 operating system;   Read High-Speed Clock (RHC) reads the fast free-running clock in the controller, and Compute Time Difference (TDF) that calculates the number of "clicks" between two timestamps captured by the RHC.

-the instruction set manual says its for 503-505 and 1100/1400

Is there a reason you don't want to use one of the hardware High-Speed Counters in the controller ?

-its really over kill, this is less than and up too 150 pulses per minute and its cheap.

I haven't actually ever used those instructions, but I can think of how to use them.

- Yea i figured it out in 500 emulator.... However when i tried in a real processor it all went to hell. I ended up using a TON as a fee running clock and a RES command to reset it. I tested the results and its a ton easier to understand and it works really well.  It appears to be very responsive and accurate from the testing ive done.

Are you literally counting gear teeth with a proximity sensor ?   What kind of tooth count and RPM will you be trying to measure ?  What's the response speed of the sensor itself ?

-yup, literally counting gear tooth pulses, we call it a "poor mans encoder". Little trick i leaned back when i first got into controls. Really, the biggest reason is this just needs to be simple, its going in a foundry, ive never had an encoder hold up worth a dang on an ingot line. And really you would be amazed at just how easy, and reliable of a solution this is.

 

Share this post


Link to post
Share on other sites
Quote

And really you would be amazed at just how easy, and reliable of a solution this is.

I built "poor man's encoders" when I first got into controls as well.

I stopped doing it after 1998, when an operator who had tried to repair one of those arrangements while the sprocket was still running shook my hand with his three remaining fingers and told me it wasn't my fault.

If you're building solid equipment and writing programs that are reliable, accurate, and easy to understand, that's good.     

 

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