Jump to content

Recommended Posts

Posted

Hi,

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 

 

 

 

Posted (edited)

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

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

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