Jump to content

Recommended Posts

Posted (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 by lenar
Posted
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.
Posted
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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...