Sign in to follow this  
Followers 0
Sergei Troizky

Encoder Hsc Overcount- Why?

10 posts in this topic

Omron encoder is connected to the CP1H. The high-speed counter is in pulse/direction mode with hardware reset. Input filters disabled. 200 pulses encoder counts up to +/- 205 (software latches has been used to store peak values). Can anybody explain this?

Share this post


Link to post
Share on other sites
Have you checked if he/she is making the I compute x2, in both flanks of the pulse???

Share this post


Link to post
Share on other sites
Sergei - Could you post the settings of the PLC setup. BTW what do you think of the CP1H, I personnaly havn;t used it yet, and unfortunately the pricing is the land of Oz is not as attratcive as i hoped it would be...

Share this post


Link to post
Share on other sites
I am actually just returning to Omron after many years with Mitsubishi (which I still not gonna abandon). Unfortunately I am too busy with everyday projects and cannot dedicate much time to it yet. However, a project is already sold with CP1H specified and must ship in 6 month. I will play little more with these HSC and let know the result. Our supplier matched the CP1H price with the price of the comparable Mitsubishi FX1N unit, which is also lot better than any of the Allen Bradley ML. The CP1H has very impressive specs. The most attractive advantage for our company is the high-speed input and output capabilities. Among Mitsubishi, Allen Bradley and Omron the CP1H is the only unit of such class that allows to start a trapezoidal high-speed positioning pulsetrain and then redefine it's speed and/or target on the fly. In AB this is the ControlLogix class, not ML or SLC. Number and choice of HSCs is also the best among the mentioned brands. Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
Thanks Sergei,,,good luck with it also... Just thinking about it you arn't always executing a PRV instruction to read the counter all the time are you ???

Share this post


Link to post
Share on other sites
Yes, this is exactly what I am doing. But this cannot explain overcount.

Share this post


Link to post
Share on other sites
Yes it can because it is effectively "interupting" the cycle of the CPU carrying out an interrupt to read the count value at that very moment in time. The reading is based on the CPU cycle time then not at when the HSC interupt occurs exactly. If you want to read the counter value when the interupt fires to trigger a subroutine then i would use the PRV in this instance, but if i want to compare the counter value constantly i would tend to use the stored one in standard IO menory for example in a CPM1A i would look at words 248/249 (LSW/MSW).

Share this post


Link to post
Share on other sites
Still do not understand how it explains overcount, not undercount.

Share this post


Link to post
Share on other sites
When you "hardware reset" the count has already passed 200 ??? Maybee not a HSC issue but a PLC scan speed.

Share this post


Link to post
Share on other sites
I had fun and games getting interupts to occur from the HSC of a CJ1M last year, see: http://forums.mrplc.com/index.php?showtopi...=mark+the+spark You mention 'no filters' on your encoder input? Do you have a 2 wire A B or 4 wire A /A B /B encoder? I would always have the filter on and set it to about 1/4 of the max hz you expect your pulses to run at this way you wont have any glitches counted which may well solve your problem. As others have said watch out with the PRV and compare instructions as well as make sure you have a delay between setting any compare table and it's execution. good luck Mark

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