GET_NAMED_MEMORY_RETAIN block
At present, the GET_NAMED_MEMORY_RETAIN
block is analogous to the GET_NAMED_MEMORY
block but GET_NAMED_MEMORY_RETAIN
returns the reference to a different memory area than GET_NAMED_MEMORY
(see "Example with reference to different memory area").
The GET_NAMED_MEMORY_RETAIN
block returns the →reference to a →retentive memory area the name of which is entered at input NAME
. Use the SAVE_ALL_NAMED_MEMORY_RETAIN
block or SAVE_NAMED_MEMORY_RETAIN
block in order to save all retentive memory areas or just one to persistent storage.
By default, the appropriate file is saved to the subdirectory PLC
of the Neuron RTS max installation directory. If you prefer that a different directory is used, contact your system integrator and ask to change the configuration of the system service.
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
not defined in IEC-standard |
Graphical interface |
|
Available since |
|
Example with reference to different memory area
The following example contains 2 program instances: one is writing a configuration value into a retentive named memory area, the other is reading it:
|
As Program2
erroneously uses GET_NAMED_MEMORY()
to request the named memory area, the returned reference is not as expected:
|
To fix this issue, you need to replace the call GET_NAMED_MEMORY()
by the call GET_NAMED_MEMORY_RETAIN()
.