Jump to content

Recommended Posts

Posted

Hola ,deseo leer los12 bits( paralelo) de un encoder absoluto ,¿es posible hacerlo mediante modulo de entradas digitales ? O debería agregar un módulo de entradas de alta velocidad?

teniendo en cuenta que el eje gira a 1,2 hz(aproximadamente 1 giro por segundo)

  • MVP 2023
Posted

In such conditions, the frequency of the signals arriving at the discrete inputs from the absolute encoder is approximately 5000Hz (1/1.2Hz=0.8s 4096/0.8s=5120Hz).

The operating frequency of discrete inputs is 100Hz (10ms Response time). Therefore, they will not have time to see rapid code changes in standard mode.

It will not be possible to use high-speed inputs because there are only 3 of them in this PLC.

The only way out is to try to quickly read standard inputs using interrupts in the PLC.

Read about it in the help and experiment with the absolute encoder if you have one available.

  • MVP 2023
Posted
19 hours ago, kratmel said:

The only way out is to try to quickly read standard inputs using interrupts in the PLC.

Interrupts won't give instant information in this application.  The fastest interrupt is 1.25 mS and you need to be able to see the on  and the off state of the input so you double the time.  So using interrupts you'll get a maximum input frequency of 1/.0025s = 400 Hz.

The original question was "can I read an absolute encoder?"  The answer is yes, you can.  Since it's an absolute encoder you won't be missing any pulses.  The data you read will be good.

You didn't say what the encoding is, but it's probably Gray Code which you will have to write logic to decode.  You can put this logic in the interrupt routine if it's not too complicated.

The real question is whether a 2.5 ms response time is acceptable for your application.

Joe T.

Posted

En efecto,estoy buscando un encoder absoluto de preferencia de salida binaria.

Lo que busco es capturar el valor del encoder [0-360] en el instante que una bandera en el eje pasa por un sensor inductivo

Este se repite en cada vuelta del eje, es para un proyecto de sincronizacion entre dos ejes

El valor  capturado será usado como posición de sincronizacion" Master"

  • MVP 2023
Posted

Translated - 

In fact, I am looking for an absolute encoder preferably with binary output.

What I'm looking for is capturing the value of the encoder [0-360] at the instant that a flag on the shaft passes through an inductive sensor

This is repeated on each turn of the axle, it is for a synchronization project between the two axles

The captured value will be used as the "Master" synchronization position

In effect, I seek that this capture value is the same, that it does not have variation

[Like the one with an incremental encoder using the numeric reserved to generate 0-360 grads

 

 

If you put the network above in an interrupt subroutine you can read the encoder when the input goes true and do whatever conversion is needed to get a 0-360 output value.

As Kratmel pointed out, a rotation rate of 1.2 rev/sec will present a frequency of 5120 Hz on the LSB, or about .  As I mentioned above, the best you can do is is a 2.5 ms window during which time 13 pulses will pass, giving you a precision of 13 / 4096 = 0.3 %, or  1.14 degrees.  This may or may not be acceptable to you. 

It would probably be easier and more accurate to run a regular single channel or quadrature encoder into the HSC inputs of the PLC, doing a reset in the code on each revolution.  The HSC inputs are rated at 20 kHz input frequency which is more than adequate for what you are trying to do.

 

Joe T.

Posted

And following Joe's recommendation to use a "regular encoder"...
 
You can use an encoder with a 1-ppr "Z-pulse"  to do your count reset in your code.

I have used this bit of logic successfully on machines that run as fast as 80 strokes per minute.

Note that the encoder is configured as "X4", in my example I use a 600-ppr encoder which gives me 2400 counts per revolution.

I typically use the raw 2400 counts in my logic, and scale that for displays or such where I want to see the 360 count.

The One Count Compare logic  on MI 17 proved to be more stable that just trying to reset the encoder count directly from the Z pulse, and eliminates count errors.

 

image.png.15a2a67fd6dc544fa658ff250b62ca9e.png

image.png.82fadccf6c3975eaa4676c3caec4a92b.png

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.