jesuscardenas Posted December 29, 2022 Report Posted December 29, 2022 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 kratmel Posted December 29, 2022 MVP 2023 Report Posted December 29, 2022 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 Joe Tauser Posted December 30, 2022 MVP 2023 Report Posted December 30, 2022 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.
jesuscardenas Posted December 30, 2022 Author Report Posted December 30, 2022 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"
jesuscardenas Posted December 30, 2022 Author Report Posted December 30, 2022 En efecto busco que ese valor de captura sea el mismo,que no tenga variacion [La cual la tuve con un encoder incremental utilizando el reservado numérico para generar 0-360 grados
MVP 2023 Joe Tauser Posted December 30, 2022 MVP 2023 Report Posted December 30, 2022 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.
John_R Posted December 30, 2022 Report Posted December 30, 2022 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now