Siemens SIMATIC MV550 S Operating Instructions Manual page 163

Table of Contents

Advertisement

Note
Structure of the "<File name>" parameter
The file name consists of the name of the optical reader and the firmware version.
The data corresponds to the file content of an xml file that is used to restore the settings and
programs.
Pseudocode example
C# Pseudocode XML Backup
// Create new xml file
FileStream newXml = File.Open("C:\\mv400para.xml", FileMode.Create);
// Create http request
HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create("http://192.168.0.42/xml/backup.cgi");
myRequest.Method = "GET";
myRequest.ContentLength = 0;
try
{
}
catch (System.Net.WebException we)
{
}
SIMATIC MV500
Operating Instructions, 05/2019, C79000-G8976-C494-02
// Get response
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myRequest.GetResponse();
// Get response stream
Stream streamResponse = myHttpWebResponse.GetResponseStream();
// Read stream and write to file (stream == xml data)
byte[] readBuffer = new byte[256];
int count = streamResponse.Read(readBuffer, 0, readBuffer.GetLength(0));
while (count > 0)
{
newXml.Write(readBuffer, 0, count);
count = streamResponse.Read(readBuffer, 0, readBuffer.GetLength(0));
}
Console.WriteLine("XML backup succeeded.");
Console.WriteLine("NO PERMISSION FOR XML BACKUP!");
Process interfacing via an automation system (PLC, PC)
9.7 Remote client
163

Advertisement

Table of Contents
loading

Table of Contents