Sign in to follow this  
Followers 0
Yair

Input Interrupts in CP1L-M40CDR

19 posts in this topic

I'm trying to setup input 0.05 as input interrupt. But I get Error Flag after MSKS(690) and input interrupt doesn't work What is wrong?? I copy the program from the book W451-E1-03_PROGRAMMING MANUAL Error Flag ER ON if N is not within the specified range. For input interrupts: ON if S is not within the specified range of 0000 to 0003. For scheduled interrupts: ON if S is not within the specified range of 0000 to 270F hex when the scheduled interrupt interval is in 10 or 1 ms units or 0005 to 270F hex when the interval is in 0.1 ms units. OFF in all other cases. CP1L_INPUT_INT.cxp

Share this post


Link to post
Share on other sites
Cannot open the file with my version of CX-Programmer. Did you: - Create the interrupt task itself? - Declare the input being used for interrupt in the PLC settings? - Restart the power after changes in the PLC settings? Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
Please re-submit the CXP file. I cannot open it either.

Share this post


Link to post
Share on other sites
I will post the CXP at sunday. Yes and the interrupt task doesn't work when input 0.05 go from off to On. please give your comment.

Share this post


Link to post
Share on other sites
Verify this- in your case input 5 must be declared for interrupt use in the PLC settings.

Share this post


Link to post
Share on other sites
As you can read in the manual. input CIO 0.05 IS INPUT INTERRUPT 1 40CDR PLC SETTINGS CX PROJECT INSIDE THE ZIP FILE CP1L.ZIP

Share this post


Link to post
Share on other sites
Cannot open the file at home, but why are you declaring in the PLC settings input IN1 for interrupt, not input IN5 ? Edited by Sergei Troizky

Share this post


Link to post
Share on other sites
Setting the Input Functions in the PLC Setup

Share this post


Link to post
Share on other sites
Have you made an upload of the PLC settings to see if they are set like you transferred them ? You could also check if the interupt selection you set in the PLC settings dialogue is actually reflected in the system area, but I don't know which locations and which values they should be.

Share this post


Link to post
Share on other sites
Still cannot see the file since my version does not support CP1L. But once again, the interrupt is only called 1 but works with input 5, so mark input 5 for interrupt use in the PLC settings.

Share this post


Link to post
Share on other sites
As I read it, you select the interupt number in the PLC settings rather than the input number, as the input number is L/H processor specific. So that would mean Yair has correctly selected IN1 which would be interupt number 1 (and not input 1!) which is used in conjunction with input CIO0.05. Have checked the CXP file with my interupt n00b view but can't find anything wrong, I just wonder if the correct system memory area is set when selecting IN1, perhaps there is a bug in the PLC settings dialogue ? Have you tried setting all inputs as interrupt ? See attached appendix from CP1L getting started guide : A_4_3_Using_Interrupt_Inputs_to_Accelerate_Processes.pdf According to the CP1L Operation manual appendix on PLC settings areas, adress 60 (is this CIO?) bit 0 should be set when interrupt number 1 is activated as the picture from Yair above. But right under the name IN1 it says (CIO0.01) ? Is this a typo or what Pages_from_W462_E1_02_CP1L_OperManual.pdf

Share this post


Link to post
Share on other sites
Hi All The first MSKS isn't required if it's a rising edge you're looking for. I had trouble with a CP1H interrupts a while ago. Where the manual suggests 110 (or 10) and 100 (or 6), one of them DOESN'T work. Can't remember which Never used CP1L interrupts yet, so can't comment specifically... Edited by ParaffinPower

Share this post


Link to post
Share on other sites
In my CP1H the manual example works as is. I've never worked with CP1L yet. By the way, Yair, are you sure the interrupt task is not being executed? Edited by Sergei Troizky

Share this post


Link to post
Share on other sites

Thanks all The interrupt is working I don't know what was worng but now it is working. Thanks ParaffinPower you are right. I uploded the cxp file if anyone want to use it. In order to open this file CXP Version 7.1 is required . CP1L_INPUT 0.05 AS interrupt CP1L_INPUT_INT.cxp

IN5.JPG

Share this post


Link to post
Share on other sites
I had same phenomena than you. So I decide to power OFF then ON and now this is working fine. JPV

Share this post


Link to post
Share on other sites

Thanks - got me started - biggest hint was to power cycle when it wasn't working - after that bingo

 

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
Sign in to follow this  
Followers 0