Jump to content

Absolute encoder and oplc V350-35-T2


Recommended Posts

  • MVP 2023

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.

Link to comment
Share on other sites

  • MVP 2023
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.

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...