Sign in to follow this  
Followers 0
axledeep

CPM1A High Speed Counter - Decrement

3 posts in this topic

Hi all, I'm in the process of converting a Shihlin AX0N PLC to Omron CPM1A. The AX ladder uses an HSC at input x000 similar to Omron's version of HSC's. The HSC in the AX can be setup for increment OR decrement counting. And in my case, it is setup for decrement. The Omron doesn't seem to allow for decrement unless you have some type of 2-phase encoder. All I have is one pulse (proportional to rpm) from the machine. I tried running the Omron HSC by pulsing the B-phase (input 01) but it seems that I have to have the A-phase in order for the CPM1A to interpret the direction. So, is there any way to use the CPM1A HSC in decrement mode? Any work-arounds? I'm not sure what max pulse frequency I will be needing but from what I can tell, it will be minimum 500Hz. I was thinking about using the standard counters, but my cycle time is about 2ms right now and I may end up missing some pulses if I have to go higher than 500Hz. Fun fun fun. Axle

Share this post


Link to post
Share on other sites
1: Set the counter to incrementing mode. 2. Use the PRV(92) instruction to read the counter value. 3. Subtract the counter value from #99999999 or whatever is the max value of your counter. 4: The result will then be decrementing.

Share this post


Link to post
Share on other sites
At first, I didn't think that would do the trick in my particular situation but after banging my head against the wall a few times and a couple of hours later, I made your idea work. Thanks much Jay! Regards Axle

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