Resettofactory Method - Siemens SIMATIC S7 User Manual

Simatic automation tool v2.1
Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

6.9.3.8

ResetToFactory method

Return type
Method name
Result
ResetToFactory
Name
Data type
password
EncryptedString
This method resets a CPU to its factory defaults.
The following example searches the
address, and calls the
uint targetIPAddress = 0xC0A80001; // 192.168.0.1
IProfinetDeviceCollection devices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out devices);
if (retVal.Succeeded)
{
IProfinetDevice dev = devices.FindDeviceByIP(targetIPAddress);
if (dev != null)
{
}
}
Note
The
Automation Tool API will block this operation for a fail-safe When the software determines
that this method was called for a fail-safe CPU, a specific error
(
ErrorCode.FailsafeAccessNotAllowed
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
ResetToFactory
ICPU devAsCpu = dev as ICPU;
if (devAsCpu != null)
{
retVal = devAsCpu.ResetToFactory(new EncryptedString(""));
}
method is not allowed for an S7 fail-safe CPU. The SIMATIC
ResetToFactory
SIMATIC Automation Tool API for .NET framework
Parameters
Parameter type
In
IProfinetDeviceCollection
method.
) is returned.
6.9 The ICPU interface
Description
This method opens a legitimized connec-
tion to the device. Therefore, a password
may be required
for a CPU at a specific IP
107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents