Hi,
I have with a customer a usecase where we auto-generate some code and some constants are defined as, for example, INT. And then normally the points where it is used, it is fine. But we wanted to use this constants to initialize some variables that are of a different type, like UINT. When thying to use TO_UINT() in my variable declaration, we get an error "Expected a constant expression, 'TO_UINT(myConst)' unary operation does evaluate to a constant.st(Core.InvalidAccess)"
We would like to be able to have a way to do type conversion during compile, so that we do not need to add an extra method or code lines, to do it during runtime.
Thanks for bringing this idea forward! We really appreciate you taking the time to share it. We'll take it into consideration as we continue evaluating improvements to SIMATIC AX.