Milosh

Detect wire break on omron absolute encoder

11 posts in this topic

Hi all.

How to detect on 10bit gray code absolute enncoder that one wire is broken?

It is wired to plc digital input card.

Is the solution to use timer and check every wire if signal not change during defined time interval then set error...or something similar?

Share this post


Link to post
Share on other sites

I haven't tried this but maybe you could use the GRY(474) instruction. Have a look at the instruction reference. There are many reasons it would set the ER flag.

Share this post


Link to post
Share on other sites

Thanks, but I can't use this instruction with plc  I have. It is cs1d and gry instruction is not supported.

 

Share this post


Link to post
Share on other sites

I think I answered too soon. Are you reading High Speed inputs from the encoder? (A, B and Z pulses).

Share this post


Link to post
Share on other sites

Thanks for reply. 

I have 10bit omron encoder with gray code. Every of this bits goes to one digital input on digital input module. 

 

Share this post


Link to post
Share on other sites
1 hour ago, Sergei Troizky said:

Does the encode make full turn during operation?

Yes, encoder makes full turnduring operation.

 

Share this post


Link to post
Share on other sites
On 11/10/2017 at 4:17 PM, Milosh said:

Hi all.

How to detect on 10bit gray code absolute enncoder that one wire is broken?

It is wired to plc digital input card.

Is the solution to use timer and check every wire if signal not change during defined time interval then set error...or something similar?

You are correct. I would determine the maximum time to make one complete revolution. 
I would turn on 10 bits in a register. As each wired input turns on, I would reset the corresponding bit in register. After the time for one revolution, compare the register to 0. If equal then the wires are good.

Note: This will work as long as the inputs can be read each scan.

Regards,
Garry

Share this post


Link to post
Share on other sites

Milosh, is it important to detect a broken wire as soon as possible, that is after one full turn, or you can afford several full turns before it is detected?

Share this post


Link to post
Share on other sites

Thanks all for reply.

Sergei: Yes, I would like to have possibility to detect broken wire as soon as possible.

gclshortt: Sometimes the encoder will not move for full turn. Operater can start machine, and very fast can stop. In that case encoder would not make full turn.

Also sorry for my previuos wrong answer, about full turn.

I thinking about this solution: when machine started, encoder turning, for every wire (signal) I need to check if state changes during defined time interval.

If state changes everything is ok, but if not I shoult to stop the machine and set error flag.

But I need 10 flags for errors, and 10 timers to detect that. I'm just looking for some easiest solution.

Share this post


Link to post
Share on other sites
On 11/14/2017 at 3:14 AM, Milosh said:

Yes, I would like to have possibility to detect broken wire as soon as possible.

Then, the most straightforward way is to utilize the major property of the Gray code: any transition may be in a single bit only. Compare every new value with the previous one for changed bits. If more than one bit changed simultaneously, the  sequence is abnormal, and may indicate wiring problem. However, the method assumes reading of every change. If the lower bits are too fast, use interrupt, or simply exclude them, and verify at least the  rest. The lower bits can be verified by some other method.

1 person likes this

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