No. It is not possible to create a Structure Variable that has leaf-element Variables that consist of mixed Persistent and Non-Persistent Variables.
Fully Persistent Structure Variables must be defined in the PersistentVars object, while Non-Persistent Structures must be defined in either a POU's Variable Definition box or the Global Variable List (GVL) separately.
Example:
The original Structure from the above Example can be split into two Structures defined in the GVL and PersistentVars objects.
DUT Type Definitions
1) Meant for Non-Persistent:
TYPE MyStructType :
STRUCT
MyINT : INT;
MyWORD : WORD;
END_STRUCT
END_TYPE
2) Meant for Persistent:
TYPE MyPersistentStructType :
STRUCT
MyBool : BOOL;
END_STRUCT
END_TYPE
Structure Variable Definition in Global Variable List (GVL):
VAR_GLOBAL
NonPersistentStruct : MyStructType;
END_VAR
Structure Variable Definition in PersistentVars:
VAR_GLOBAL PERSISTENT RETAIN
PersistentStruct : MyPersistentStructType
END_VAR
Can't find what you are looking for?
Reach out to our customer care team to receive information on technical support, assistance for complaints and more.