Programm in CX9020 übertragen mittels ADS Befehl

mkersch

Level-1
Beiträge
111
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo Forenmitglieder,

Ist es möglich von C# oder VB.NET aus, mittels der ADS Befehle, ein neues Programm bzw. eine geänderte Hardwarekonfiguration in eine CX9020 zu
schreiben ?

mfg.

mkersch
 
Hallo mkersch,

ich hoffe das hilft dir etwas weiter:
Der TcAdsClient hat u.a. die Methode WriteControl

Changes the ADS status and the device status of an ADS server.
Overload List

Changes the ADS status and the device status of an ADS server.Changes the ADS status and the device status of an ADS server.

Im Beckhoff Information System findest du weitere Informationen dazu. Ich bin mir jedoch nicht sicher ob man damit tatsächlich neue Konfigurationen in eine CX9020 schreiben kann oder nur die vorhandene Konfiguration manipulieren kann.

Eine andere Möglichkeit die dir vielleicht helfen könnte ist das Automation Interface, hier ein kleinen Beispiel dazu:

Code:
//simple demo showing how to activate a previously created configuration
        static void Main(string[] args)
        {
            //Create an instance of Visual Studio
            //Different Visual Studio versions must be handled
            //Visual Studio 2010 -> VisualStudio.DTE.10.0
            //Visual Studio 2012 -> VisualStudio.DTE.11.0
            Type t = System.Type.GetTypeFromProgID("VisualStudio.DTE.11.0");
            EnvDTE.DTE dte = (EnvDTE.DTE)System.Activator.CreateInstance(t);
            dte.SuppressUI = true;
            dte.MainWindow.Visible = false;

            //Create a path to a project solution 
            EnvDTE.Solution solution = dte.Solution;
            solution.Open(@"path_to_your_solution.sln");

            //Select the corresponding project in the solution
            EnvDTE.Project project = solution.Item(1);

            //ITcSysManager is the main interface of the automation interface
            ITcSysManager systemManager = project.Object;
            //Activate the TwinCAT configuration
            systemManager.ActivateConfiguration();
            //Starts or restarts the TwinCAT system. If TwinCAT is already started the function performs a restart otherwise it performs a start
            systemManager.StartRestartTwinCAT();

        }

Auch hier verweise ich für weitere Information über das Automation Interface auf das Beckhoff Information System


Gruß AndSki
 
Zurück
Oben