JeremyM
Lifetime Supporting Member
For those of you that like living on the bleeding edge of development, you can do this without the need to resort to In/Outs and dummy references when you don’t need to use the feature - just a bit more object-oriented programming.
I’ll attach a sample .L5X program soon.
Create an output parameter as an alias to the first member of your AOI’s local UDT or STRING (.LEN). I prefer naming it “Ptr_LocalTag”, but it doesn’t matter for this.
Outside the AOI, you can safely and successfully do
- COP(AOI_Instance.Ptr_LocalTag, OutsideUDT, 1);
If you get the destination type wrong, you won’t risk faulting the processor because of how COP works (relying upon the size of the destination type to avoid overrun).
I have an idea on how to achieve writing to the AOI’s local structures. I’ll try fleshing it out on my flight home and testing this evening. You may already get where I’m coming from.
Previously I posted a method of getting the processor to message itself but this is limited to an instance-by-instance thing, doubles your memory requirements, and is just cumbersome overall.
I’ll attach a sample .L5X program soon.
Create an output parameter as an alias to the first member of your AOI’s local UDT or STRING (.LEN). I prefer naming it “Ptr_LocalTag”, but it doesn’t matter for this.
Outside the AOI, you can safely and successfully do
- COP(AOI_Instance.Ptr_LocalTag, OutsideUDT, 1);
If you get the destination type wrong, you won’t risk faulting the processor because of how COP works (relying upon the size of the destination type to avoid overrun).
I have an idea on how to achieve writing to the AOI’s local structures. I’ll try fleshing it out on my flight home and testing this evening. You may already get where I’m coming from.
Previously I posted a method of getting the processor to message itself but this is limited to an instance-by-instance thing, doubles your memory requirements, and is just cumbersome overall.
Last edited: