moosetracks

1734-VHSC Rate, and Counts

6 posts in this topic

Back in the old SLC days the encoder cards had the option to show a rate (hz) and a count.  With the 1734 I can only have one or the other.  I have an encoder on a motor driving a belt conveyor.  I want to know the speed of the conveyor with a decent update rate, as well as an accurate measurement.   With a one second timer comparing the change in counts the calculations aren't very accurate.  The longer we wait between updates the better it gets.  

I'm sure the variation is caused by update rates.

What logic would you guys use to get an feet per min number without just averaging a big sample?

 

 

Share this post


Link to post
Share on other sites

What processor?  If you're using Logix 5000, try putting your code in a high priority periodic task instead of using timer instructions. 

 

We have some machines that handle metal strip and we need to know elapsed distance and speed.  The resolvers we're using only present their speed down to 1 RPM, which equates to 1 ft/min, which isn't nearly good enough since our strip is running anywhere from 20 to 40 in/min.  Putting code in a 100ms periodic task to look at the current count minus previous count, averaging over 20 samples, works very well for us.

Share this post


Link to post
Share on other sites

Its a 5000.  The only issue that I have with that is we have a several copies of the same program running with their own program tags, and just map the IO.  So we kinda need to keep all the logic in the same program or use we have to deal with controller tags sending data into program tags.   I don't think I can put a periodic task inside of a program?

Share this post


Link to post
Share on other sites

No, the program is within the task.  To do this you would need at least some controller-scoped tags so the program in the continuous task and the  program within the periodic task can share information.

If you're just looking for a conveyor speed off an encoder, though, it can still be almost self-contained.  The encoder is coming in as controller-scoped hardware tags, right?  You can then have the speed measurement code be complete self-contained except for the final speed which is a global tag.

Share this post


Link to post
Share on other sites

Yes that is doable.  I just wished I could come up with something since I have so many of these to keep track of.  

 

Share this post


Link to post
Share on other sites

I use a Periodic Task, with a program that uses a GSV to grab the CST timestamp from the controller.

I don't even have to rely on the Periodic Task's accuracy:  because I copy the CST timestamp in microseconds, I have a very accurate value for the time elapsed since I grabbed the last number of counts.    If you have elapsed time and increment in counts, then you can calculate a counts/time value.

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