Hi Community,
I have a project programmed in Structured Text.
There I use the following line:
DiagMC_BR_ShReadInfo_0[i].Enable := NOT DiagMC_BR_ShReadInfo_0[i].Error AND ShAxis[i].controlif <> 0;
ShAxis/controlif is defined like this:

When I check ShAxis[i] in the Watch it looks like this:
So controlif is a reference to another datatype, but internally in the variable only the address is saved as UDINT.
This line of code works in AS 6, but AS Code rightfully complains about this line:
My question is:
It works, but it’s really not very elegant. How can this be implemented better in ST? How can I check if a reference is valid?

