Rotary Encoder/incremental

baden

Member
Join Date
Jun 2002
Posts
13
Hello, I am working with a omron E6C2-CWZ5B rotary encoder (differential phase A, B and Z, 360 P/R). I am having trouble with it finding degrees accurately within a program. I have an omron cpm2a and am applying the high speed counter. I have set up a comparison table starting in dm0100. The table tells it to stop sending an on setting out to a rapid valve at 10 degrees and then to stop sending an on setting out to a creep valve at 2 degrees. That works fine, but where it actually stops is variable. I have a startup function to find the z phase in the clockwise direction and then go back to 0 degrees. Once I do that I tell it to go to 90 degrees. Once it hits 80 degrees it shuts off the rapid valve and at 88 degrees it shuts off the creep valve. This is how I think I have it set up.
Now when I tell it to go to 90 it does stop the rapid and creep but in the wrong places. As in it will shut it off at the approximately 15 degrees instead of 90. Or it will shut off at approximately 30 degrees.
Does it all have to do with how I find the Z phase pulse?

I am extremely new to this and if you need more information please tell me.
 
Let me make sure I understand you correctly: Your control logic appears to work correctly however when on the machine, your resulting control is not accurate. Is this a far assesment?

If so, you may be looking a mechanical back-lash sort of issue.

Steve
 
Ok. I am just moving the encoder physically with my hand. I have not set it up on any machine and I do not have it connected to any valves yet. I have though been looking at my outputs on the controller itself. From there I assess if the valves are on or off.
Another question has come up amidst all of this. I have a range comparison table. I reset the values in the table by use of the move command. So I have only two subroutines. One subroutine for my creep valve shut off and one subroutine for my rapid valve shut off. But once I have moved the bits my valves are still shut off.
Example:
I want to go to 90 degrees. I am at 0 degrees. Currently my comparison table says to shut off the valves when it is between 0 and 2 degrees for the creep and between 0 and 10 degrees for the rapid. So I use the move command to change it to shut off the rapid valve when it reaches 80 degrees and shut off the creep valve when it reaches 88 degrees. But when I do this my valves stay off after the movement of the bits. I am really confused on why this is happening. It is definitely in how I set up the range comparison table, but I do not know where to look to. Any help would be great.
 
First thing first.

Test your logic. Instead of having the encoder do the variation, use another DM and write online to it. You'll be able to see exactly if the logic works.

Then increment this value with two timers. One fast adding 1 to a DM and one slow adding 1 to the same DM. Stop adding when on target. This will tell you if the logic works.

By doing this you'll be ashure of the logic. It cannot miss a count because those will be increment only after each scan. So this simulation is not speed related.

Then if all works, look at the high speed acquisition of movement. Ho! Are you shure the speed of the CPM2A can take the speed of the encoder... This should have been looke at pryor to testing.

Do this and come back for more...

PS: Don't forget Bit n.00 in the Cmp Table logic.
 
Thanks for the help pierre. You really helped me out. But the only thing that I have left is to figure out how to get my z phase HOME position designator to turn on. I have it set up in the programming package but it just will not recognize that it is there. If anyone has suggestions on how to get my z phase to reset my zero please let me know.
 
Try to latch the Z phase perminately on, to determine it is being read by the PLC input.
If remember how long the pulse is on for.
 

Similar Topics

Hi, Everyone I am interfacing rotary encoder(incremental encoder) with PLC. This encoder using for speed measurement (RPM). The encoder is giving...
Replies
6
Views
4,530
Hi guys! I know the Siemens S7-1200 has pulse inputs but I was wondering if you can connect a standard incremental encoder in quadrature mode...
Replies
3
Views
4,017
Hi. I'm a begginer with the PLC staff. Could you please show me an example program /with a scheme/ for a simple project using a rotary encoder...
Replies
5
Views
7,942
Hi, I am working on a project to upgrade a control cabinet for assembly machine. We are thinking also to replace some CAM_SWITCHES with OMRON...
Replies
12
Views
9,134
Hello Guys, In order to measure the length of a product using a photo-eye and a Timer .. It's not a reliable operation even if you got it right...
Replies
32
Views
10,299
Back
Top Bottom