Personal Data

Username:
stdenits
Joined:
2024-04-22 18:17:45.379000

Projects

  • No projects to display.

User Activity

  • Modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    DEL

  • Modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello. I am using Codesys v2.3 and trying to adapt a function from C to set multiple bits of a uint16_t variable at once: void set_state_value_16b(uint16_t *var, uint16_t mask, uint16_t val) { *var = (*var & ~mask) | (val & mask); } Current Codesys v2.3 implementation: FUNCTION set_state_value_16b : WORD VAR_INPUT variable : POINTER TO WORD; mask : WORD; val : WORD; END_VAR VAR END_VAR variable^ := (variable^ AND NOT mask) OR (val AND mask); Example of use: set_state_value_16b(ADR(ERR), 16#0001,...

  • Modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello. I am using Codesys v2.3 and trying to adapt a function from C to set multiple bits of a uint16_t variable at once: void set_state_value_16b(uint16_t *var, uint16_t mask, uint16_t val) { *var = (*var & ~mask) | (val & mask); } Current Codesys v2.3 implementation: FUNCTION set_state_value_16b : WORD VAR_INPUT variable : POINTER TO WORD; mask : WORD; val : WORD; END_VAR VAR END_VAR variable^ := (variable^ AND NOT mask) OR (val AND mask); Example of use: set_state_value_16b(ADR(ERR), 16#0001,...

  • Posted a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§ on CODESYS Forge

    Hello. I am using Codesys v2.3 and trying to adapt a function from C to set multiple bits of a uint16_t variable at once: void set_state_value_16b(uint16_t *var, uint16_t mask, uint16_t val) { *var = (*var & ~mask) | (val & mask); } Current Codesys v2.3 implementation: FUNCTION set_state_value_16b : WORD VAR_INPUT variable : POINTER TO UINT; mask : WORD; val : WORD; END_VAR VAR END_VAR variable^ := (variable^ AND NOT mask) OR (val AND mask); Example of use: set_state_value_16b(ADR(ERR), 16#0001,...

View All