PLC Shell Command for Import and Export of Retain/Persistent Variables

The syntax of the command is: sram <direction><area><path>

Supported options:
Direction: i=import, e=export
Area: rp=Retain/Persistent, m=%M area
Path: Any pathname

The file will be stored in the user partition of the PLC. This data can be imported or exported via the FTP-Server or the Files dialog in Automation_Builder.

If no path is indicated, the files are saved under PlcLogic/<ApplicationName>/<ApplicationName>.ret or .prozm.

If a path is indicated, the files are saved under or accessed via <path>/<ApplicationName>.ret or .prozm.

A non-existing path is created with the exception of the SD card. The path for the SD card must be an existing path. On the SD card a non-existing path leads to an error message.

Data area File extension Path
Retain/Persistent .ret

PlcLogic/<ApplicationName>/<ApplicationName>.ret

<path>/<ApplicationName>.ret

%M (memory area) .prozm

PlcLogic/<ApplicationName>/<ApplicationName>.prozm

<path>/<ApplicationName>.prozm

Examples:

Application Command File
myApp sram e rp PlcLogic/myApp/myApp.ret
sram e ep data data/myApp.ret
Application sram i m PlcLogic/Application/Application.prozm
sram i m data data/Application.prozm

If the path “data” does not exist, tha path is created. The path for the SD card must be an existing path. The path “sdcard/data” leads to an error message if the path “data” does not exists on the SD card.

Only if the application uses Retain or Retain/Persistent variables the command generates an output file.

Note

:strong:Attention!

It is recommended to execute the PLC shell command only while PLC is in state STOP, or it is ensured that there is no write access to the %M or the Retain/Persistent area.