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

BIT type in persistent memory

tvm
2022-03-16
2022-03-17
  • tvm - 2022-03-16

    I have a very basic program, consisting of a single structure in persistent memory:

    TYPE SETPOINTS :
    STRUCT
        Bit0:           BIT;
        Bit1:           BIT;
        Bit2:           BIT;
        Bit3:           BIT;
        Bit4:           BIT;
        Bit5:           BIT;
        Bit6:           BIT;
        Bit7:           BIT;
    END_STRUCT                           
    END_TYPE
    
    PROGRAM SR_Main
    VAR PERSISTENT
        Setpt:          SETPOINTS;
    END_VAR
    
    {attribute 'qualified_only'}
    VAR_GLOBAL PERSISTENT RETAIN
        // Generated instance path of persistent variable
        SR_Main.Setpt: SETPOINTS;
    END_VAR
    

    Is there any reason that a BIT type cannot be stored in persistent memory? Any considerations for their use? The program compiles fine, but hangs up during a download. Remove the declaration from the PersistentVars GVL and it works fine.

    thanks

     
  • tvm - 2022-03-17

    In case anyone else runs into this problem, this is a bug in Schneider Electric's latest release of Machine Expert (v2.0.2) BIT types can't be used in Persistent Variables

     

Log in to post a comment.