Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
		
How can we help you today?
In EcoStruxure Machine Expert / SoMachine, is it possible to create a Structure Variable consisting of mixed Persistent and Non-Persistent Variable leaf elements?
Issue
In EcoStruxure Machine Expert / SoMachine, is it possible to create a Structure Variable consisting of mixed Persistent and Non-Persistent Variable leaf elements?
For example, we wish to have MyINT and MyWord Non-Persistent and MyBOOL as Persistent below:

DUT Type Definition
TYPE MyStructType :
STRUCT
MyINT : INT;
MyWORD : WORD;
MyBOOL : BOOL;
END_STRUCT
END_TYPE
Structure Variable Definition in Global Variable List (GVL):
VAR_GLOBAL
ThisStruct : MyStructType;
END_VAR
Product Line
SoMachine
EcoStruxure Machine Expert
Environment
PLC Configuration Software
Resolution
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

Schneider Electric Philippines

Explore more
Range:
Users group

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more
Explore more
Range:

Need help?

  • Product Selector

    Quickly and easily find the right products and accessories for your applications.

  • Get a Quote

    Start your sales inquiry online and an expert will connect with you.

  • Where to buy?

    Easily find the nearest Schneider Electric distributor in your location.

  • Help Center

    Find support resources for all your needs, in one place.

  • Products Documentation
  • Software Downloads
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact Center
  • Find our Offices
  • Get a Quote
  • Where to buy
  • Careers
  • Company Profile
  • Report a misconduct
  • Accessibility
  • Newsroom
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings