Siemens SIMATIC MV440 Operating Instructions Manual page 328

Simatic ident code reader system
Hide thumbs Also See for SIMATIC MV440:
Table of Contents

Advertisement

Process interfacing via an automation system (PLC, PC)
10.8 Remote client
Pseudocode example
C# Pseudocode XML Backup
// Create new xml file
FileStream
// Create http request
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://192.168.0.42/xml/backup.cgi");
myRequest.Method = "GET";
myRequest.ContentLength = 0;
try
{
// Get response
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myRequest.GetResponse();
// Get response stream
Stream
// Read stream and write to file (stream == xml data)
byte[] readBuffer =
int
while
{
}
Console.WriteLine("XML backup
}
catch
{
Console.WriteLine("NO PERMISSION FOR XML
}
326
newXml = File.Open("C:\\mv400para.xml", FileMode.Create);
streamResponse = myHttpWebResponse.GetResponseStream();
new
byte[256];
count = streamResponse.Read(readBuffer, 0, readBuffer.GetLength(0));
(count > 0)
newXml.Write(readBuffer, 0, count);
count = streamResponse.Read(readBuffer, 0, readBuffer.GetLength(0));
(System.Net.WebException we)
succeeded.");
BACKUP!");
Operating Instructions, 04/2013, A5E02371045-06
SIMATIC MV420 / SIMATIC MV440

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic mv420

Table of Contents