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

MEMSET

o5i
2016-11-14
2016-11-16
  • o5i - 2016-11-14

    Hi, i was wondering if there is a MEMSET function. I want to set a array to 0.
    Or maybee is it possible to make a struct of arrays and set that to 0?

     
  • learnetk - 2016-11-15

    Hi
    you could use the sysmemset in the sysmem library.

     
  • o5i - 2016-11-16

    Hi, is it possible to use it whit 2d arrays? If i want to delete only 1 column or row?
    like ```

    memset(myarray[][1],0,sizeof(myarray[][1]);

    ```???
    I managed to delete the whole array using this:

    SysMemSet(pDest:=ADR(SET_AUTO_NAME) , udiValue:= 0, udiCount:= SIZEOF(SET_AUTO_NAME));
    
     

    Related

    Talk.ru: 1


Log in to post a comment.