Jump to content

Encoder A, B counter works fine, how to process 120 degree Z pulse?

Recommended Posts

  • MVP 2023


In my last application I use V130-33-TR20 PLC.

Applying an interrupt  (1.25ms), I was able to get a system that controls the clutches to drive the mechanism.

As always happens in the process of modernization of the old production machine - it had to work at low speeds provided by the manufacturer, but as a result, customers wanted to triple this speed.

Accordingly, the applied control algorithm began to give unpredictable failures at increased speed.

After analyzing the problem, I realized that the encoder used in the machine has three additional Z pulses per revolution.

Z pulse has a length equal to one pulse of the encoder (1000ppr used).

Accordingly, the interrupt method (Immediate read input) used to interrogate this
Z pulse sometimes does not "see" a too narrow pulse at increased speed.

My idea is to use another HSC (MI1) channel for find Z pulse (count it) in interrupt routine.


So my question is:

What other tricks can be used to ensure the recording of a short  Z encoder pulse?


P.S. The accuracy of the definition does not play a decisive role. (+-50  main encoder pulse possible).

However, skipping the definition of this pulse leads to damage to one part produced by the machine. 

Link to comment
Share on other sites

  • MVP 2023

I've been chasing the Z pulse problem for many years without a good solution.  Your use of the second HSC as shown above is definitely workable.

Without a Z input built into the HSC you really can't get great precision on the reset as you mention. 

Google up "24V pulse stretcher".  There aren't a lot of commercial products out there that will do this, but we've gone as far as roll our own circuits mounted in relay housings and wired to regular inputs when we don't  have that second HSC available.  The 1.25 ms interrupt works for any of the on-board inputs.

Joe T.

Link to comment
Share on other sites

  • MVP 2023

Thanks Joe, i have on shelf one of

1 hour ago, Joe Tauser said:

24V pulse stretcher

I was already thinking about testing this device.

However, in the process of analyzing the already assembled circuit, I came to the conclusion

that I can rearrange the input signals and try to use the third counter, which is on board the applied PLC.

Then now i have two possible solution and can test it on machine.

I wonder if there are any other options?

Link to comment
Share on other sites

  • MVP 2023

I'm prepared to look silly.  🤪

I hardly ever work with this stuff, mostly just an occasional tinker.   My likely incorrect understanding of the Z is for resetting counts. 

If that is so, would another alternative be to fit a "made to measure" lobe to the shaft, that is registered more easily by the plc at the same exact rotation point?  A rising edge read from an inductive, reading a sharp edged lobe that has enough arc length to ensure the on time is readable, might be a fairly simple thing to implement.   If such a lobe caused an inbalance issue, it could be done as the same thing 180° apart. 

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023

Now i found one more solution that can be tested.

I can connect only A signal of my encoder - Pin I2 and use reset pin I3 for evaluate Z as reset signal for HSC.

Problem with 4 times lower accuracy but maybe stable with reset counter after 120 degree.

But in PLC pdf i can't find minimal reset pulse duration parameter. :(




Link to comment
Share on other sites

  • MVP 2023
12 minutes ago, Ausman said:

fit a "made to measure" lobe to the shaft

Thanks Aus.

I think about it,  but  shaft is used for drive floating overtaking hooks. It can be installed in different position on all shaft length.

The main problem is the customer - he needs more speed without any additional modifications of the machine :).   


Link to comment
Share on other sites

Hi kratmel,
Is it really existing "120 degree Z pulse" encoder?
Can you share model and maker?
More strange is, that 1000 ppr divided by 3 eq. 333.(3).
So for each rotation there is 1 pulse error.
And there are no 999 ppr encoders.
Or I lost something?

Link to comment
Share on other sites

  • MVP 2023

This is realy old SIKO IG 11 series abx-1000-3-pp

It is also strange for me 1000x4=4000 increments. 

But it is present on Jagenberg macnine cirquit diagram = 1000ppr.


Main goal - start-stop overtaking hooks on Startposition - 150 pulse after Z pulse (120degree) and 1_Stopposition - 1200-1300 pulse after Zpulse.

Than if Z pulse losted - machine do not stop in Start position.

Than 1 ppr error is not problem. Main problem -  do not lost every Z pulse.

Link to comment
Share on other sites

  • MVP 2023
On 5/22/2021 at 11:07 PM, Joe Tauser said:

HSC as shown above is definitely workable

Report - use HSC (#3) for count Z pulse works fine in this application. Tested for long time (approx 8 hour) - machine not stopped and all parts is OK. 

Link to comment
Share on other sites

  • MVP 2023

Thanks John_R, my prog it is something like your sample.

Then i see great idea with MI55 to MI56 copy for save frequency.

If counter MI0 is reseted - frequency information reseted also. So you idea with buffered frequency is useful.



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.

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...