Programupdate Method - Siemens SIMATIC S7 User Manual

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

Advertisement

SIMATIC Automation Tool API for .NET framework
6.9 The ICPU interface
6.9.3.7

ProgramUpdate method

Return type
Method name
Result
ProgramUpdate
Name
Data type
password
EncryptedString
strPath
string
This method performs a program update on the CPU. The parameter
folder containing the program to load. To be successful, the program must have been
generated with the TIA Portal and saved in "program memory card" format.
The following example searches the
address, and updates the program for that CPU.
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 ProgramUpdate method is not allowed for an S7 fail-safe CPU. The SIMATIC
Automation Tool API will block this operation for a fail-safe CPU. When the software
determines that this method was called for a fail-safe CPU, a specific error
(
ErrorCode.FailsafeAccessNotAllowed
106
ICPU devAsCpu = dev as ICPU;
if (devAsCpu != null)
{
retVal = devAsCpu.ProgramUpdate(new EncryptedString(""),
}
Parameters
Parameter type
In
In
IProfinetDeviceCollection
@"c:\myFolder\ProgramUpdate");
) is returned.
Description
This method opens a legitimized connec-
tion to the device. Therefore, a password
may be required
A fully-qualified path to the folder contain-
ing the program card contents.
strPath
for a CPU at a specific IP
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
specifies a

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents