EasyManua.ls Logo

Siemens SIMATIC S7 - Backup Method

Siemens SIMATIC S7
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIMATIC Automation Tool API for .NET framework
6.9 The ICPU interface
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
101
6.9.3.2
Backup method
Return type
Method name
Result
Backup
Parameters
Name
Data type
Parameter type
Description
Password
EncryptedString
In This method opens a legitimized connec-
tion to the device. Therefore, a password
may be required.
strFile
string
In A fully-qualified path and filename where
the backup should be stored.
This method is used to back up the data in a CPU. Not all CPUs support the back up/restore
feature. The property
BackupAllowed can be checked to ensure that the current CPU supports
this feature
The following example searches the
IProfinetDeviceCollection for a CPU at a specific IP
address. When found it checks that the CPU supports the back up feature, and calls the
Backup method.
uint targetIPAddress = 0xC0A80001; // 192.168.0.1
string bkFile = @"C:\MyCPUBackupFile.s7pbkp";
IProfinetDeviceCollection devices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out devices);
if (retVal.Succeeded)
{
foreach (IProfinetDevice dev in devices)
{
ICPU devAsCpu = dev as ICPU;
if ((devAsCpu != null) &&
(devAsCpu.IP == targetIPAddress) &&
(devAsCpu.BackupAllowed == FeatureSupport.BackupAllowed)
)
{
retVal = devAsCpu.Backup(new EncryptedString(""), bkFile);
}
}
}

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals