Sign in to follow this  
Followers 0
chelton

Address in CP1L W201.[W202]

7 posts in this topic

I have attached an image of an address entered to a coil in a CP1L processor. It compiles and does not come up with any errors. I can not find anything in the manual about arrays for ladder or offset addresses for the CP1L. What would this address do? Would it be similar to indirect addressing in an AB?

Share this post


Link to post
Share on other sites
Very close. Try the syntax W201.00[W202]. In your watch window (Alt+3) type in your addresses to view the results. I'm not sure why it compiles with the incorrect syntax. In CX Programmer, go to Help > Help Contents then type in "Indirection" to learn more.

Share this post


Link to post
Share on other sites
syntax is correct. it offsets bit from w200.00 for a number in w202 e.g. if W202 = 6, the w200.6 would be set ON if conditions on the left TRUE. not sure if it's working on simulation though.

Share this post


Link to post
Share on other sites
This is correct in a CJ2 I can enter W201.00[w202] and it works as an offset, but it shows an error in a CP1L

Share this post


Link to post
Share on other sites
This is what I was hoping, but after more testing it appears to be just a bug. The value of W202 does not seem to have an effect, the bit referenced seems to be always bit 00. I have tried both on a live plc and in simulation. When the rung evaluates true output 200.00 turns on no matter what Value is in W202

Share this post


Link to post
Share on other sites
I tried it here and got the same results. It set W201.00 no matter what value was in W202 Edited by Mendon Systems

Share this post


Link to post
Share on other sites
My apologies, this is correct. When I tested your code yesterday I switched to a CJ2 before correcting the syntax. I never went back to check the CP1L. It does not surprise me as the CJ2 capabilities are much different than the CP or CJ1 series.

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