Posted 15 Apr 2015 (edited) 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 15 Apr 2015 by lenar Share this post Link to post Share on other sites
Posted 15 Apr 2015 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
Posted 15 Apr 2015 Don't read/speak Russian, but this is most likely the problem! Share this post Link to post Share on other sites
Posted 16 Apr 2015 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