Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Block move for fix address ...

Chag
2011-06-01
2011-07-26
  • Chag - 2011-06-01

    Did exist a function like block move ! All variable are addressed ( %MW ... ). If i want to move %MW0 and the next 20 register to %MW100 ! I know that i can use pointer, addr, sizeof ... Can i use direct call like ... MOVE %MW0:20 -> %MW100 ?

     
  • Anonymous - 2011-07-26

    Originally created by: crthomas1234

    Hello, you can add the sysmem library to your project and use the memory move command to do a block move starting at a pointer value and then the number of bytes to move.

    You can use the ADR function to get the pointer to %MW0 and then use the number of bytes. Just remember that a word is 2 bytes. Or you can use the sizeof() function to get the size in bytes of a variable or structural that you want to move.

     

Log in to post a comment.