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
Hallo Zusammen,
bei Codesys V2 konnte man mit
SIZEOF(Var)
herausbekommen, ob Var (BOOL) mit AT auf einen IO gemappt ist. SIZEOF liefert dann 0, bei nicht gemappten BOOL-Variablen kommt eine 1 zurück.
Bei Codesys V3 liefert SIZEOF nun immer eine 1.
Gibt es Alternativen?
Heiko Wilke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hallo Zusammen,
Dank Lenze Support haben habe ich nun eine Lösung:
Es gibt eine interne Funktion __VARINFO, die als Ergebnis einen Typ __SYSTEM.VAR_INFO ausgibt. Der Typ beinhaltet eine Variable vom Typ MEMORY_AREA
Hallo Zusammen,
bei Codesys V2 konnte man mit
SIZEOF(Var)
herausbekommen, ob Var (BOOL) mit AT auf einen IO gemappt ist. SIZEOF liefert dann 0, bei nicht gemappten BOOL-Variablen kommt eine 1 zurück.
Bei Codesys V3 liefert SIZEOF nun immer eine 1.
Gibt es Alternativen?
Heiko Wilke
Hallo Zusammen,
Dank Lenze Support haben habe ich nun eine Lösung:
Es gibt eine interne Funktion __VARINFO, die als Ergebnis einen Typ __SYSTEM.VAR_INFO ausgibt. Der Typ beinhaltet eine Variable vom Typ MEMORY_AREA
...
END_VAR
Heiko Wilke