CODESYS - the IEC 61131-3 automation software

Initializing variables using expressions
Page 1 of 1

Author:  CoderDude [ Thu Feb 15, 2018 12:52 pm ]
Post subject:  Initializing variables using expressions

I want to initialize a variable using expressions, for instance

myVar : INT := 3 + x + 2*y;

It seems this can be done in CoDeSys 3.5: ... variables/

However this gives me compiler errors in CoDeSys 2.3. Is there some compiler option or so I could use to enable this? Or some neat workaround?

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited