chelton Posted September 15, 2014 Report Posted September 15, 2014 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? Quote
IO_Rack Posted September 16, 2014 Report Posted September 16, 2014 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. Quote
tashinz Posted September 16, 2014 Report Posted September 16, 2014 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. Quote
chelton Posted September 16, 2014 Author Report Posted September 16, 2014 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 Quote
chelton Posted September 16, 2014 Author Report Posted September 16, 2014 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 Quote
Mendon Systems Posted September 16, 2014 Report Posted September 16, 2014 (edited) I tried it here and got the same results. It set W201.00 no matter what value was in W202 Edited September 16, 2014 by Mendon Systems Quote
IO_Rack Posted September 17, 2014 Report Posted September 17, 2014 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. Quote
Recommended Posts
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.