All Neighborhoods

CODESYS Talk

    CODESYS Forge

  • kislov modified a comment on discussion Engineering πŸ‡¬πŸ‡§

    Seems like you use SIZEOF as size, but you need to use LEN as size of data which you want to write.

  • kislov posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Seems like you write SIZEOF bytes, but you need to write LEN bytes.

  • stdenits modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§

    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,...

  • stdenits modified a comment on discussion Codesys V2.3 πŸ‡¬πŸ‡§

    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,...

  • ac-spr posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Looking to access a variable at runtime that indicates a user is online to the code. essentially want to use this value to feedback to the user on the HMI. we use turck and bosch rexroth devices if this information helps. I was hoping there was a variable at the application level, or a library that could be used but I was unable to find anything. I know there's a pop up when you try to login/ go online to the code when a user is already logged in, so the system does provide an indication that it...