marea01

Omron CJ Series High Speed Counter PRV Instruction Use

14 posts in this topic

Hi,

I have found this forum extremely helpful in the past.  I greatly appreciate in advance any help/direction.

I am having trouble simply placing/invoking a PRV instruction in CX-Programmer.  The program seems to not recognize really any of the High Speed Counter instructions.  (working with a CT021.  I/O table correct, CJ2H CPU67 PLC rack powered on with all green lights.)

Please see attached screenshots for what I mean... the PRV, PRV2, CTBL, SPED, etc instructions just show up red (like they are not understood/recognized PLC instructions/functions) when I try to place in the ladder.  There must be something simple that I am not considering.  Thanks again for any help.

Michael

Capture.PNG

Share this post


Link to post
Share on other sites

What is the Unit/Mach Number of the CT021 module?

gtsuport

Share this post


Link to post
Share on other sites

Just checked the manual.  CT021 does not use the PRV, PRV2 instructions.

Please download and review the W401 manual for instructions on how the module works.

Thanks,

gtsuport

Share this post


Link to post
Share on other sites

Ok.  Thanks.  I see now that should be using the IORD PLC function. 

It is still odd that PRV (and other high speed counter functions) are displaying as not recognized PLC functions in CX-Programmer though...

Share this post


Link to post
Share on other sites

You are using a CJ2H.  The instruction is in red, meaning it is incorrect.

The CJ2M has the MD21x module that would use the PRV and PRV2

gtsuport

Share this post


Link to post
Share on other sites

Ok.  Got it.  Thanks for your replies gtsuport!  I'll keep digging through the manual

Share this post


Link to post
Share on other sites

Ok.  I've been poring over the manual and have now managed to get this counter configured as a Linear counter but when I put in a 24V pulse to Counter 1 input A, it briefly counts up to 1 then resets to 0.  I have Counter 1 configured as a Pulse Up and Down counter.  There is nothing on input B (which would count down on rising edge of 24V input in this case) and I have nothing on Z input (can be configured to reset but I have set in module parameters to serve No Function.) I guess something must be immediately resetting the count but I cannot see what would be doing that.  Any/all help (from gtsuport or others) is greatly appreciated!

1 person likes this

Share this post


Link to post
Share on other sites

What is the Unit/Mach number of the CT021.

That is set with the rotary switch on the front of the module.

gtsuport

Share this post


Link to post
Share on other sites

gtsuport, thank you for your reply.  The machine number is 1.  I solved the issue by discovering that somehow the parameters for the module had gotten changed back to Circular with 0 for Maximum and 0 for Minimum.

Share this post


Link to post
Share on other sites

That's great!  Good job on sorting that out.

Thanks for letting us know.

gtsuport

1 person likes this

Share this post


Link to post
Share on other sites

Now we have a working speed sensor! 

My last question about this is just for curiosity... in the screenshot, RevPerSec never shows a change from 0 even though the program is still correctly doing the math and D220 and RealTimeRPM show correct real-time values... why is this when all the variables (or memory containers) are of type INT in this case?

Capture.PNG

Share this post


Link to post
Share on other sites

Looks like D220 is not getting data.

Checking the manual for the CT021, it looks like #1F01 is not valid.  Should be 1F02 for rate 1.

Give that a try and see what happens.

gtsuport

Share this post


Link to post
Share on other sites

D220 is getting data just fine and shows the pulses per second.  In fact, they all seem to get data just fine and RealTimeRPM, our main data point of concern, gets data and shows it just fine.  The thing I'm curious about is that the variable circled in red- RevPerSec- is not SHOWING it's value in the ladder program in cx-programmer.  It must be getting data still because RealTimeRPM is calculated and shown correctly.  So the only thing I'm curious about is that RevPerSec does not DISPLAY any value other than zero in cx-programmer.  Everything else displays changes in 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