How to retain the Structure Data Type?
Lets say that I am defining a structure like this...
TYPE MyStruct :
//definition of my structure
element1 : DINT; //i want to define this as PERSISTENT
element2 : INT; //i want to define this as PERSISTENT and RETAIN
element3 : INT; //i don't want to define this as PERSISTENT or RETAIN
element4 : REAL; //i don't want to define this as PERSISTENT or RETAIN
So, when I go to declare my variable as the type "MyStruct" that I just made, I have the option to designate the whole variable as just a VAR or VAR PERSISTENT RETAIN, or any combination of those, but I obviously can't specify those attributes for specific elements within the variable at that point.
Is there some syntax within the structure that I can use to designate specific elements for retention and others for no retention?
I have attached one screen shot of the Data Type 'Process' wherein I need to retain the HMI_SP and HMI_TSP.