Personal Data

Username:
dfx
Joined:
2020-01-17 10:59:06+00:00
Location:
Bordeaux / France / CET
Gender:
Male

Projects

  • No projects to display.

Skills

  • Visual Basic
  • Structured Text
  • Ladder Logic
  • SQL-based

User Activity

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Feels like end of string detection isn't right. Maybe the lib was testing a byte, where you should test a word to NULL when using WSTRING.

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    The issue is using string_to function assumes that every char in your string is coded on 8 bits, while UTF8 is on 16 bits. So you are interpreting splitted chars. I don't know why you "need" to use .sContent to parse, but this could be a way to solve it. Also you may also just interpret a byte array (string and wsstring are no more than byte arrays) as a wstring using union for instance.

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    The issue is using string_to function assumes that every char in your string is coded on 8 bits, while UTF8 is on 16 bits. So you are interpreting splitted chars. I don't know why you "need" to use .sContent to parse, but this could be a way to solve it. Also you may also just interpret a byte array (string and wsstring are no more than byte arrays) as a wstring using union for exemples.

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    This won't answer the question but may solve your issue : Use a static IP in the DHCP server, so you can use a predefined static IP in UA expert.

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    Note for future me : do not spam the post button.

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    FOR Index := 0 TO 7 DO MyBytes[Index] := SHL(HEXinASCII_TO_BYTE(MyStr[Index*2]),4) + HEXinASCII_TO_BYTE(MyStr[Index*2 + 1]); END_FOR FOR Index := 0 TO 7 DO MyStr2[Index*2+1] := TO_BYTE(BYTE_TO_HEXinASCII(MyBytes[Index])); MyStr2[Index*2] := TO_BYTE(BYTE_TO_HEXinASCII(SHR(MyBytes[Index],4))); END_FOR Same lib. Please read a little the help.

  • Posted a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    FOR Index := 0 TO 7 DO MyBytes[Index] := SHL(HEXinASCII_TO_BYTE(MyStr[Index*2]),4) + HEXinASCII_TO_BYTE(MyStr[Index*2 + 1]); END_FOR FOR Index := 0 TO 7 DO MyStr2[Index*2+1] := TO_BYTE(BYTE_TO_HEXinASCII(MyBytes[Index])); MyStr2[Index*2] := TO_BYTE(BYTE_TO_HEXinASCII(SHR(MyBytes[Index],4))); END_FOR Same lib. Please read a little the help.

  • Modified a comment on discussion Engineering πŸ‡¬πŸ‡§ on CODESYS Forge

    FOR Index := 0 TO 9 DO MyBytes[Index] := HEXinASCII_TO_BYTE(MyStr[Index]); END_FOR OR FOR Index := 0 TO 4 DO MyBytes[Index] := SHL(HEXinASCII_TO_BYTE(MyStr[Index*2]),4) + HEXinASCII_TO_BYTE(MyStr[Index*2 + 1]); END_FOR HEXinASCII_TO_BYTE is part of Util lib. Sometimes things are easier than it first look.

View All