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

Konstant Struct für Abspeicherung von Befehlen

motorcross
2021-09-20
2021-09-21
  • motorcross - 2021-09-20

    Hallo liebes Forum,

    ich bin aktuell dabei eine Kommunikation über TCP/IP mit einem Lasersensor aufzubauen.

    Gibt es eine Möglichkeit die Befehle in einer Art "Konstanten Struktur" abzuspeichern?

    Die Befehle werden als Strings gespeichert.

    Da ja eine Struktur auch deklariert werden muss und damit Arbeitsspeicher verbraucht wird, stellt sich mir die Frage ob es da eine effizientere Möglichkeit gibt konstante Befehle einheitlich zu speichern.

    Da ich noch relativ neu in der Programmierung von Codesys bin, habt bitte Nachsicht mit mir :)

    Gruß motorcross

     
  • aliazzz

    aliazzz - 2021-09-21

    Aber naturlich. 'Relativ neu' bedeutet du weisst ja etwas von programierung, correct?

    Constanten sind normalerweise declariert wie ein global, aber ein local ist auch moglich.
    Suche nach GVL CONSTANT oder CONSTANT keyword.

    gruss

     

    Last edit: aliazzz 2021-09-21

Log in to post a comment.