Sign in to follow this  
Followers 0
lenar

Problem with D memory area

5 posts in this topic

Hi All. I have a problem with D memory area. I have PLC CJ2M with ID211(DC input), ID211, OC211 (Relay output), OD212 (Transistor output) on the CPU rack. When I turn on all outputs in the OC211, all my datas in the D memory area is set to 0. What could be the problem? plc_project.zip Edited by lenar

Share this post


Link to post
Share on other sites
It would have to be something in your code. Post it here and we can take a look. Are you using the BSET instruction? Are you doing anything with indirect addressing (*D, @D or IR)? Are you doing anything with the PUSH instruction? There is some potential that these could be doing what you are seeing.

Share this post


Link to post
Share on other sites
Don't read/speak Russian, but this is most likely the problem!

Share this post


Link to post
Share on other sites
Yes, that is definitely it. Nice find Bits N Bytes. When you turn on all the bits in channel 2 (OC211), it sets the number of words to transfer in your instruction to 65,535, which of course wipes out the D area, starting at D0. I believe that you meant to transfer only two words. Try using XFER &2 2001 D0, instead. Using the number 2 without the & results in using the value in channel 2 as the size of the transfer.

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