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

UINT im Binärformat in eine Datei speichern

2019-12-04
2020-01-08
  • John Doe 67 - 2019-12-04

    Hallo,

    ich möchte eine Variable vom Typ UINT im Binärformat in eine Datei speichern.
    Wenn ich z.B. "ADR(UINT_TO_STRING(uVariable))" an FILE.Write.pBuffer übergebe, würde die Variable ja als Dezimalzahl in meine *.txt Datei geschrieben.

    Kann mir jemand sagen, wie das (möglichst simpel) zu machen ist?

    Vielen Dank...

     
  • i-campbell

    i-campbell - 2019-12-17

    OSCAT BASIC Bibliothek hat zwei Functions:
    BYTE_TO_STRH()
    DWORD_TO_STRH()
    Es ist Open Source, also man die Sourcecode kann sehen, und eine WORD_TO_STRH() selbst machen.

    Die Bibliothek ist bei store.codesys.com oder OSCAT.de verfügbar.

    Der Package hat auch eine lange nützliche PDF zu lesen.

     
  • John Doe 67 - 2020-01-08

    Daumen hoch

     

Log in to post a comment.