I have a little problem with property. (I use CODESYS V3.5 SP14)
I writted an objet FB1FB1 Function block
I use MyFB1 :VAR_GLOBAL
Struct1 is a structure, declared like this : Struct1:
I can write 3 properties to get the value of each variable ErrorFB1.ErrorBit1, ErrorFB1.ErrorBit2, .... wtih properties like this :Property Read1 : Bool;
It works well.
But I try to write only one property to get the entire structure ErrorFB1 :Property ReadAll : ErrorFB1;
but It don't work.
I read somewhere, that I have to declare a REFERENCE, so I wrote :Property ReadAll : REFERENCE TO ErrorFB1;
In my programme I use :Default1:=MyFB.ReadAll;
And I get an exception when I run the simulation mode.
I am a beginner in the use of OOP. I looked for examples but I founded only "simple" one.
I have certainly made a monstrous mistake somewhere, but I do not see it
Thank you in advance for any help.