HSC, new interrupt after Z-phase reset

3 posts in this topic


I have encoder and count pulses in mode "Differential Phase Input" - Linear mode

Every one turn I have Z-phase reset and counter starts from 0

I set some target value comparison table from D1000 for @CTBL #0000 #0000 D1000 

and it works just one to reach target value  

After PLC start and HSC reach target value for Interrupt 01 I get subroutine working, but even I reset HSC using Z-phase signal and PV goes to 0 still interrupt is activated.

I would like to start and stop interrupt during one turn of encoder and make it every one turn

Thanks for clue 




Share this post

Link to post
Share on other sites

linked threads are just for beginner. This is clear for me.

I tested some solution and it more less works.

Now I have A531.00 set to ON and hardware signal Z-phase reset encoder 

I checked that if I want to start counting pulses to target value for CTBL and get another interrupt output ON I have to initiate CTBL once again after encoder reset

The problem is timing. I set new CTBL declaration when Z-phase signal (0.04) goes off - but I make it from ladder and cycle is 7.3ms.

How I have to implement this to avoid delay from cycle time

thanks in advance 


I tried to set CTBL in subroutine (interrupt task 141) from Interrupt in direct mode ( CIO 0.05). My idea was to connect Z-phase to CIO0.04 ( encoder reset) and CIO0.05 - CTBL registration), but in such a configuration CTBL doesn't work 

Edited by pszczepan

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