Is there a way to work around the error that happens when trying to set a reference to 0 after it isn't needed or is invalid? Trying to do this in codesys >= V3.5.15 results in an error. See example below. Now I could great a GVL with a bunch of unset references, but I'd end up with a large amount of null types.
ok, so I was playing around with some tests today and the code I was looking at I didn't actually try and build/run because I was missing libraries for it.
Turns out you can build and run
THIS^.refLamp REF= 0;
it is just the precomplier that complains about it. Is this a bug then in the precompiler?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to work around the error that happens when trying to set a reference to 0 after it isn't needed or is invalid? Trying to do this in codesys >= V3.5.15 results in an error. See example below. Now I could great a GVL with a bunch of unset references, but I'd end up with a large amount of null types.
ok, so I was playing around with some tests today and the code I was looking at I didn't actually try and build/run because I was missing libraries for it.
Turns out you can build and run
it is just the precomplier that complains about it. Is this a bug then in the precompiler?
Did you find out if this work?
yes, it works