Voraussetzung
-
TIA Portal Openness ist mit dem TIA Portal verbunden.
Siehe Verbindung zum TIA Portal aufbauen -
Ein Projekt ist geöffnet.
Siehe Projekt öffnen
Einleitung
Sie können mit TIA Portal Openness eine Webapplikation laden, aktualisieren und löschen, während Sie die relevante PLC laden.
Sie können DownloadConfiguration verwenden, um eine Webapplikation zu laden, zu aktualisieren und zu löschen. Weitere Informationen zu DownloadConfiguration finden Sie unter Herunterladen zu den PLCs
|
Hinweis Wird eine VoT neu geladen, wird der preDownloadConfigurationDelegate mit der Konfiguration DownloadWebApplication aufgerufen. Alle weiteren Downloads von Änderungen an dieser VoT führen jedoch zur Konfiguration UpdateWebApplication. Wenn eine VoT bereits auf die PLC geladen wurde und der Name der VoT geändert wird, würde ein Download zur Konfiguration DownloadWebApplication mit dem neuen Namen und zur Konfiguration DeleteWebApplication mit dem neuen alten Namen führen, da sie als unterschiedliche VoT angesehen wird. |
Parameter
DownloadWebApplication, UpdateWebApplication und DeleteWebApplication unterstützen werden bei der Verwendung von TIA Portal Openness die folgenden Parameter:
|
Parametername |
Datentyp |
Beschreibung |
Zugriff |
|---|---|---|---|
|
Name |
string |
Der Name der zu ladenden, zu aktualisierenden und zu löschenden WebApplication. |
Lesen |
|
Checked |
boolean |
Der überprüfte Status der Konfiguration. "True" bedeutet Download |
Lesen/Schreiben |
Programmcode
|
using Siemens.Engineering.Download; using Siemens.Engineering.Download.Configurations; private static void DownloadPlcWithVOT() { { downloadProvider.Download(targetConfiguration as ConfigurationTargetInterface, PreDownloadDelegate, PostDownloadDelegate, DownloadOptions.Software); } private static void PreDownloadDelegate(DownloadConfiguration downloadconfiguration) { DownloadWebApplication downloadWebApplication = downloadconfiguration as DownloadWebApplication; if (downloadWebApplication != null) { if (downloadWebApplication.Name == "WebApp1") { downloadWebApplication.Checked = true; // This selection will download the web application to the PLC } } UpdateWebApplication updateWebApplication = downloadconfiguration as UpdateWebApplication; if (updateWebApplication != null) { if (updateWebApplication.Name == "WebApp2") { updateWebApplication.Checked = true; // This selection will update the web application on the PLC } } DeleteWebApplication deleteWebApplication = downloadconfiguration as DeleteWebApplication; if (deleteWebApplication != null) { if (deleteWebApplication.Name == "AppA") { deleteWebApplication.Checked = true; // This selection will delete the web application from the PLC } } } } |