Integrate .NET COM based UI screens with WinCC UI

Discussion about recent product features & solutions!
14 posts • Page 1 of 2
ananthetm
Posts:7
Joined: Tue Nov 15, 2011 4:18 pm

Integrate .NET COM based UI screens with WinCC UI

Post by ananthetm »

We have the UI screens developed using Microsoft .NET and they are available as COM based private assemblies.

We see the NOKIA QT interface definition and some minimal information about the same but don't get a real clarity on this.

1) How can we deploy/integrate these assemblies with the WinCC OA based UI?
2) Do we have to get the software license for Nokia QT to establish this connectivity between the .NET COM components and the WinCC UI?
3) Are there any examples for the same?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Integrate .NET COM based UI screens with WinCC UI

Post by leoknipp »

Hello,

If you want to integrate the COM-based assemblies you have to create an ActiveX-element.
For the usage of ActiveX-objects you do not need a special license or a QT software license.
Instead of ActiveX-elements you could also create "external widget objects" (EWO) based on QT-libraries. The benefit of EWOs is that they can also be used on Linux.

What is meant with "UI screens"?
Have you created only some objects for the WinCC OA-panels or have you created complete panels?


Please notice that the ETM Portal does not substitute the common PVSS/WinCC OA support.
If further information is needed please refer to the official support address for America: support.america.automation@siemens.com.
The responsible contact persons are Russell Barnes or Todd Malone, you could also contact them directly.

You can also have a look at our homepage to get detailled information for the WinCC OA support.
http://www.etm.at/index_e.asp?id=9&sb1= ... eite_id=24

Best Regards
Leopold Knipp
Senior Support Specialist

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Integrate .NET COM based UI screens with WinCC UI

Post by aorange »

Is there any documentation available on how to create external widget objects EWOs and get these to interact with WinCC-OA? I cannot seem to find any references to this in the help documentation.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Integrate .NET COM based UI screens with WinCC UI

Post by leoknipp »

Hello,

please have a look at the following chapter of the online-help:
Graphics Editor (GEDI) --> Complex graphics objects --> EWO (External Widget Object)

Best Regards
Leopold Knipp
Senior Support Specialist

ananthetm
Posts:7
Joined: Tue Nov 15, 2011 4:18 pm

Re: Integrate .NET COM based UI screens with WinCC UI

Post by ananthetm »

I'm trying to implement a External Widget object (using QT) from within the WinCC OA 3.10.

I see from the following documentation for creating External Widget object in the help.

How to implement an Ewo?
You have to derive from the BaseExternWidget class and implement at least the method providing the QWidget virtual QWidget *widget() const = 0 and then compile and use it. For details, see the BaseExternWidget.hxx headerfile (located in wincc_oa_path/api/include) that describes all methods. You can find an example under api/newEWO (cmd for Windows, sh for Linux). This example generates an EWO that can be compiled and that contains example code.

However I don't see a directory named "\\api" under my wincc_oa_path. Am I missing something? Do I have to install any add-ons to get the necessary support for implementing External widget object from within the WinCC OA.

Any support appreciated asap.

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Integrate .NET COM based UI screens with WinCC UI

Post by aorange »

Did you choose to install the API when installing WinCC-OA? if not, then you will probably not have the API directory in your wincc_oa_path

ananthetm
Posts:7
Joined: Tue Nov 15, 2011 4:18 pm

Re: Integrate .NET COM based UI screens with WinCC UI

Post by ananthetm »

Thanks for the response.

I didn't install the API at the time of initial installation and when I try to re-install the same, I see a red cross against the Special Functions->API in the software installer for WinCC OA.

I'm currently running a demo version of WinCC OA and do you think the API will not work in Demo license. Do I have to buy the license for using the API for WinCC OA?

aorange
Posts:147
Joined: Thu Nov 04, 2010 10:07 am

Re: Integrate .NET COM based UI screens with WinCC UI

Post by aorange »

Ahh there's your problem, the red cross means that the component is not currently installed, just click on the red cross and select "This feature will be installed on the local drive" and the icon will change... then just proceed with the installation.

As for the license, well I don't work for ETM so someone correct me if I am wrong but it is my understanding that you can install any WinCC-OA components regardless of having a license for it. The problem comes when you try to run something that you are not licensed for or exceed the limitations of your license, a warning message is usually displayed in the log viewer when this happens.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Integrate .NET COM based UI screens with WinCC UI

Post by leoknipp »

Hello,

during the installation no license check is made.
The license check is only made during startupruntime of the project or when trying to use a specific part of the software which requires a license.
You'll get an error dialog and/or a log-message if your license is not valid or does not cover the used functionality.

Best Regards
Leopold Knipp
Seniour Support Specialist

vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Re: Integrate .NET COM based UI screens with WinCC UI => XMLRPC

Post by vogler »

Hi,

you can use xmlrpc to set and get dp-values with .net

i used a free xmlrpc .net library, you can get it here => http://xml-rpc.net/

start a winccoa control with the attached "xmlrpc_server.ctl" on your host and try this simple c# console application:

Image

Code: Select all

using System;
using System.IO;
using System.Threading;

using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http; 
using CookComputing.XmlRpc;

[XmlRpcUrl("http://localhost/RPC2")]
public interface IHelloWorld : IXmlRpcProxy
{
    [XmlRpcMethod("pvss.test.HelloXMLRPCWorld")]
    string HelloWorld();
}

[XmlRpcUrl("http://localhost/RPC2")]
public interface IDoubleValues : IXmlRpcProxy
{
    [XmlRpcMethod("pvss.db.getValues")]
    double[] GetValues(string[] dpName);

    [XmlRpcMethod("pvss.db.setValues")]
    int SetValues(string[] dpName, double[] dpValues);
}

class WinCCOAExample
{
  static void Main(string[] args)
  {
    try
    {
      /*
      IHelloWorld test = XmlRpcProxyGen.Create();      
      Console.WriteLine(test.HelloWorld());
      */

      IDoubleValues d = XmlRpcProxyGen.Create();
      
      string[] dps = new string [] {"ExampleDP_Trend1.", "ExampleDP_Result."};
      double[] res;

      while (true)
      {
          res = d.GetValues(dps);
          for (int i = 0; i < res.Length; i++)
          {
              Console.WriteLine(dps[i] + " => " + res[i]);
              res[i]++;
          }

          int ret = d.SetValues(dps, res);
          Console.WriteLine("dpSet ret="+ret);

          Thread.Sleep(100);
      }
        
    }
    catch (XmlRpcFaultException fex)
    {
      Console.WriteLine(fex.FaultString);
    }
    catch (Exception ex)
    {
      Console.WriteLine(ex.Message);
    }
    Console.ReadLine();
  }
}
https://www.winccoa.com/fileadmin/image ... server.ctl
Attachments

[The extension ctl has been deactivated and can no longer be displayed.]

noname3.jpeg

14 posts • Page 1 of 2