Siemens SIMATIC S7/HMI Guía De Usuario página 237

Ocultar thumbs Ver también para SIMATIC S7/HMI:
Tabla de contenido

Publicidad

El siguiente ejemplo busca la
específica. Cuando la encuentra, comprueba que la HMI admite la función de restauración y
llama al método
Network myNetwork = new Network();
ulong targetMACAddress = 0x112233445566; // 11:22:33:44:55:66
IProfinetDeviceCollection scannedDevices;
Result retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (retVal.Succeeded)
{
}
Guía de usuario de SIMATIC Automation Tool V3.1
Manual de producto, V3.1, 10/2017, A5E41848985-AB
.
Restore
IHMI hmi = scannedDevices.FindDeviceByMAC(targetMACAddress) as IHMI;
if (hmi != null && hmi.RestoreAllowed == true)
{
// Seleccionar CPU a actualizar
hmi.Selected = true;
retVal = hmi.SetBackupFile(@"C:\MyFolder\Backup.s7pbkp");
if (retVal.Failed == true)
return;
// ¿Dirección IP unívoca?
if (hmi.DuplicateIP == true)
return;
// ¿Se soporta el dispositivo?
if (hmi.Supported == false)
return;
// Restaurar
retVal = hmi.Restore();
}
API de la SIMATIC Automation Tool para .NET framework
IProfinetDeviceCollection
7.13 Interfaz IHMI
para una HMI en una dirección IP
237

Publicidad

Tabla de contenido
loading

Tabla de contenido