Omron vs Encoder

Mr_B

Member
Join Date
May 2005
Posts
79
Hi Guys, I'm trying to understand how an incrementel encoder works on a Omron CQM1H CPU51.

We have this set-up in our plant but I'm struggling to understand the working of it.

The encoder is connected B, A, C to 000.04, 000.05, 000.06 in that order. When I search for these inputs in the program, they can't be found. What I did find is that the value is read from IR 230 and 231. I saw the value change there when the encoder is moving.

I also found that IR 000 and 0001 is somehow used for the High Speed Counter. There are INI and CBTL instructions as well. I am struggling a bit on my own. Can someone please explain to me what I'm missing.

Where does the 3 bits of the encoder go to in the PLC.

Thanks in advance.
 
Okay, so far I found that bits 000.04 --- 000.06 are dedicated to pulse for the high speed counter.

Is it right then to assume that if u connect an encoder to these 3 Inputs, the value will be available in IR 230-231?

and also, does it matter where u connect A, B and Z/C to?
 
The connection diagram will show A, B and Z at 00.04, 00.05 and 00.06. A will lead B during normal direction movement. Just like feeding a drive, you must have the sequence correct. There are relationships that if you did not have right, you would need to do additional code so the information processes correctly.

Encoder information is not used like normal I/O bits. The encoder information is sent to dedicated data memory, DM or data, D addresses. From these addresses you then MOV the information to the instruction you will use to process the information. Instructions would be compares, to get equal to, less than or greater than bits for controlling the logic.

You may be using the encoder data to determine linear speed, RPM, distance measurement, and/or DIRECTION which is why connections are important.

You being connected B, A and Z could be a result of reverse rotation that was corrected with a wire change at a terminal strip. Most encoders have A, A not, B, B not, Z and Z not. I have seen many plugs done at the PLC and Encoder and the wires changed at a terminal strip to get the correct signal to the measureing device, PLC or drive inputs.
 
I also found that IR 000 and 0001 is somehow used for the High Speed Counter. There are INI and CBTL instructions as well. I am struggling a bit on my own. Can someone please explain to me what I'm missing.

In the case of INI and CTBL, you will find these to be control codes to the instructions. The software interprets these as input channels but they are really just control codes.
 
Thanks for the reply guys. Just another "simple" question. Seeing that bits 0.4 to 0.6 is used for an encoder. How do you 'tell' the PLC it is an encoder and not just normal inputs?

I guess this is where the INI and CBTL instructions comes in ???

Am I right?
 
You are correct. The actual input address does not need to be "programmed" for things to work.

You should be able use the memory locations in the INI and CBTL instructions.

For example, look at the CBTL instruction, the TB can be a memory address or the IR address.

Just curious, what are you doing or trying to do with the encoder signal(s)?
 
No Leadfoot, the encoder is allready in use. We have a saw and the encoder measures the depth of the cut. All is working fine. I was just looking into the PLC to see how the encoder is set up and used.

Obviously there's Compare instructions and the are compared to a value in 230 but I could not understand how the value gets to 230. I could not find any MOV instructions that writes to 230. That is till I found that the High Speed Counter's value, when using port 0, is available in 230.

The TB value of the CBTL instruction is DM0050 by the way.

Your replies is much appreciated.
Thanks again and feel free to reply futher. Evey bit helps. It's not always easy to teach yourself with the books ;)
 
Is 230 a DM? The value may be placed there by an operator input or as the result of another instruction.

You can do control F and put in that address and you should be able to go to everywhere it is used. After the first location shows up, usually the symbols list, just hit the enter button and it will move to every location.

By all means down load the info Jay posted. There is just about every way you can use a counter. You may need to look at them all but I am sure you will find the instructions being used in your PLC. Then you have many, many examples for future programming jobs.
 
Yes Leadfoot. You are correct. I did a little research. There are 2 ways to get the data (PV) of a High Speed Counter from port 0 (bits 4-6).

(1) it is stored in SR 230 and 231

(2)or using the PRV(62) instruction.

In our program we get it from SR 230 and 231. So if all your settings in the DM area is accordingly, the value is available in SR 230/231.

I downloaded Jay's stuff just now. Will go through it, and yes, I know about "control-F" ;) always using it but u can't find 0.4-0.6 if u use it as a High Speed Counter. I went through the Cross Reference and there's nothing.

Later.
 
Thanks for the reply and answer on the SR address. I am amazed at the different ways you can use the counter and addressing of instructions.

Yeah, if you do not use an address it does not show up with control F.

I have done a CJ1 with a CTO21 high speed counter and CPM2C using the 0.0 as the counter input. Like you I had read, re-read everyting in the manuals. Usually after I read an OMRON manual my brain really hurts.
 
Talk about brain hurting. I have to read one sentence like 5 times. Seriously, befor understanding and sometimes I don't. :)
 

Similar Topics

I am providing 24 volts on encoder input but getting the 24 volts on encoder output.The output voltage is not changing,so I want to ask what will...
Replies
4
Views
2,344
Dear all PLC's master, I'm trying to connect CPM1A to rotary encoder (Omron E6B2) using PRV with this code (0 0 DM100), but i can't read the...
Replies
11
Views
6,149
Hi All, Need some help regarding MicroLogix 1400 HSC, Can I use Omron Encoder : E6B2-CWZ6C 600P/R... I badly need help.. Thank you very...
Replies
12
Views
4,339
hi i am a beginner, can any one help me to use encoder or a proximity counter to calculate the positioning of belts.
Replies
16
Views
6,644
Help needed, Is there anyone who ever write code for OMRON Rotary Encoder with MicroChip's PIC16Fxxx series. I'm seriously needed. Thompson Soe...
Replies
0
Views
3,450
Back
Top Bottom