Integrate .NET COM based UI screens with WinCC UI

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

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

Post by ananthetm »

As mentioned earlier, I'm trying to launch .NET forms (Winforms) which are registered as COM objects on a windows machine from within the WinCC OA panel.

Based on the documentation/earlier comments in the forum, I'm assuming that I'm supposed to do the following to accomplish the same.

1) Construct the .NET winforms (using C#/ .NET framework/ Visual Studio IDE)
2) Design the External widget object (with extension *.ewo) using the Nokia QT (SDK/QT creater tool) and this would act as wrapper to the .NET winforms.
3) Drop an EWO (External Widget object) to the WinCC OA panel (*.ewo) from Object-> EWO menu.

I don't see any documentation on Nokia QT stating that it can act as a wrapper to the .NET WinForms or it can be used to develop the External Widget object which can be compatible with the WinCC OA.

Appreciate if you have any comments on how this can be designed/implemented and if you have any examples for doing the same.

The crux of my requirement is as follows:
* I have a UI screen developed using .NET/C# winforms on Windows platform and this is made COM visible.
* I want to launch the same from the WinCC OA panel and should be able to access the methods, callbacks exposed by the .NET winform COM object form the scripts associated with WinCC OA panel.

Note: However I'm able to drop the Active X controls build using Microsoft.NET (which are registered on the PC) on the WinCC OA panel as is from the from Object-> Active X menu

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 have already a working ActiveX-element you can use this instead of creating an EWO.
In WinCC OA also ActiveX-elements can be added to a panel.

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 »

With ActiveX support, I will be able to only drop the UI screens which are built as an activeX control object.
But I have UI screens built using .NET winforms (form object) and which are exposed as COM objects.
I will have to call this COM object so that it shows up on top of the panel (form is the independent container and should not be within the panel).

Is the EWO used for this purpose?

Does the script behind the panel can access a COM dll which is associated with the .NET winforms.

clicht
Posts:24
Joined: Tue Aug 03, 2010 8:11 am

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

Post by clicht »

Your DotNET code is "managed" code. EWO's are written in "unmaneged" C++ code. There is no direct way between them.
You have following ways to handle this:
1. Write a interoperation wrapper dll which translates managed vs. unmanaged
2. Use COM as bridge between managed and unmanaged

In case of 2. you could use ActiveX, which is a superset of COM.

So, if you have already a ActiveX component, include it in a WinCC OA panel and use it (also in scripts).

14 posts • Page 2 of 2