WinCC Flexible 2005 and My Controls (activex)

domased

Member
Join Date
Mar 2006
Location
PD
Posts
7
Hi, i'd like to use activex component delivered with DVT senzors (ethernet camera). I added DVTSID activeX component to My Control group on Tools Tab. Then i dragged this control to my Screen in WinCC project. Through this activex component we can play and save images from DVT camera - i think this is not so important.

I have some question about using ActiveX components with some own events like "data_arrival, on_connected" and others.

How to access or how to declare object for ActiveX component used on Screen via VB scripts, which are supported in WinCC?

I tried to use it like this: [script1]

dim objDVTSID
set objDVTSID=hmiruntime.screens(1).screenitem("DVTSID1")
'DVTSID1 is the name of object created by dragging of ActiveX 'componet from My Controls Tab
objDVTSID.remoteport=5000
objDVTSID.remoteserver="127.0.0.1"
objDVTSID.connect

....

if i want to use event on_connect, i have to write another script [script2] and call it from DVTSID >> Properties >> Events >> on_connect...

so the problem is, that after starting the sript2, the object variable objDVTSID from script1 is not valid.

THE PROBLEM IS THAT I DON'T KNOW USE third part ACTIVEX components AND THEIR EVENTS IN WINCC. CAN ANYBODY HELP ME PLS?
HAS ANYBODY SOME EXAMPLE WITH WINSOCK OR SOMETHING SIMILAR WITH EVENTS? THANX
 
This must be how you are getting the images from the other post. I had the same problem you are having with Active X objects. I could get them installed into flex and put on my project but I have not been able to find a way to get to events or all the variables. I don't think standard Active X objects will work in flex. I have not found anything to support this but I did find some information on the Siemens web site on Protool. To use Active X objects in ProTool they have to be made with Siemens Software. I will try to find and post a link to the ProTool information. If you get it to work please post your findings.
 
I havent actually used ActiveX, but I have fumbled about a little bit to see if it could be useful for me.

Are you using RT or are you using panels ?
If you use RT, then I think that a "normal" ActiveX control can be pasted onto a screen from the My Controls folder.
You can then open the Properties for ActiveX control and assign tags to the various functions.

I would like to hear how it goes with your project.
 
I am using RT. The problem I see is after the Active X is on the screen not all the properties are shown. I say this because I can bring the same thing into VB, C++, Delphi etc and I get more properties than when I bring it into Flex.

Keep us posted on your progress.
 
I have not used the DVT ActiveX or WinCC, but I have had experience using 3rd party ActiveX's with VB Script in MS Office applications. Most 3rd party ActiveX's are made for developement with Visual Basic or some other software developement platform.

It has been my experience that not all of the functionalities of these ActiveX's are available in VB Script. I do not know what causes these limitations or if there are any workarounds.
 
I am using RT simulator, i added DVTSID activeX into MyControls Tab and i pasted it onto a screen. I've seen all events of this activex in it's Properties but i don't know how to create object variable for this component in VB script so i can't initialize this component like .remotehost=..., .remoteport=... and after .connect i dont know what happened if the event onConnect occures and i hang some onother VB script on onConnect Event. The initial VB Script will continue after finishing the script hanged on onConnect Event?

I am not sure, how the VB scripts are working in WinCC...

I think i solved this by my own ActiveX (myDVT.dll) component written in VB6. This ActiveX (dll) is called from WinCC VB script like this:

dim o
set o=CreateObject("myDVT.clsDVT")
o.remotehost="xxxx"
o.remoteport=yyyy
sReturnString=o.fReturnResult
set o=nothing

where fReturnResult is a public function of class clsDVT in myDVT.dll for returning result what i need.


In myDVT.dll i can initialize declared object of type DVT ActiveX, i can handle all events and i can return to WinCC what i need.
 
Aha, so you have taken an ActiveX component and made another ActiveX component from that in VB6.
Then you call your own ActivX in Win CC Flex.
So in that way any VB compatible ActiveX can be used in Win CC Flex.

Are you then viewing captured video from inside Win CC Flex at the moment ?
 
No, no, i call my own dll like this from VB script in WinCC:

dim o
set o=CreateObject("myDVT.clsDVT")
o.remotehost="xxxx"
o.remoteport=yyyy
sReturnString=o.fReturnResult
set o=nothing

and in sReturnString is the result value of myDVT.dll. The result is the name of captured image. My own myDVT.dll is called here:

sReturnString=o.fReturnResult

with parameters (remotehost and remoteport) and in MyDVT.dll are used the DVTSID activex's own methods like .connect, .playimages, .saveimages , .stopimages. , .disconnect and mzDVT.dll returns the name of saved image. And after this i used
HTML browser object in WinCC and thrue returned picturename i show it in HTML Browser...But it looks very bad ...i wrote about this in my another thread. IF anzbody knows the better way to use DVT ActiveX component in WinCC, let me know, pls.
 
I don't have any insight into this post, but I have a post that the folks in this one may be able to help with. "ActiveX with WinCC Flex" - post. I am trying to get my DVT to work with WinCC and have the following problems.

I have a WinCC Flex application for a PC670 that I am running on a Windows XP desktop pc for development. The application runs fine but I am having trouble with an ActiveX object that I have embedded on one of the screens. The object is a DVT camera image that was imported through the Tools-->My Controls in WinCC. The object properties are recognized fine and I could write a script to connect to the camera that was recognized and compiles without error. When I go into runtime and trigger the script to connect to the camera I receive a Microsoft Windows error about the "WinCC Flexible RT module" - HMIRTM.exe, modname: msvbvm60.dll. I have a simple VB application using the same commands on the same computer that has no problems accessing the camera image. If anyone has any insight on this please let me know.

Note: I have installed the SP1 for Flex and Runtime and it still does not function without crashing.

Marek
 
WinCC flexible 2005 and My Controls

Hello, i tried to use DVT activeX as you wrote but a cannot handle all events, mainly winsock. I did my own dll in VB6 which uses DVT activeX component, so i handled all events there. This dll makes connection to camera, saving images to HDD and returnes the name of saved images if it is correctly, or special string if saving failed. In WinCC i show these images through HTML browser object.
HTML browser uses url path, which includes my html file, with some css styles and image saved on HDD. Image has to have the same name after every saving image from camera, so i am deleting old image before saving new image. Graphic view and other wincc components are unusable for this manipulation with images.

I hope that it will help you :)




Marek Tenerowicz said:
I don't have any insight into this post, but I have a post that the folks in this one may be able to help with. "ActiveX with WinCC Flex" - post. I am trying to get my DVT to work with WinCC and have the following problems.

I have a WinCC Flex application for a PC670 that I am running on a Windows XP desktop pc for development. The application runs fine but I am having trouble with an ActiveX object that I have embedded on one of the screens. The object is a DVT camera image that was imported through the Tools-->My Controls in WinCC. The object properties are recognized fine and I could write a script to connect to the camera that was recognized and compiles without error. When I go into runtime and trigger the script to connect to the camera I receive a Microsoft Windows error about the "WinCC Flexible RT module" - HMIRTM.exe, modname: msvbvm60.dll. I have a simple VB application using the same commands on the same computer that has no problems accessing the camera image. If anyone has any insight on this please let me know.

Note: I have installed the SP1 for Flex and Runtime and it still does not function without crashing.

Marek
 

Similar Topics

Hello, I am using WinCC Flex 2005 and I want to configure a button. If you look at the picture below, on release of the button(which is named...
Replies
0
Views
1,375
Hi Guys, I have a simple problem. All I want to do is bring up a screen from a flag in the plc. I have 1 main screen which is visible all the...
Replies
3
Views
1,678
Hey guys, I'm new to Siemens software and have 2 questions. 1) I'm creating an HMI program and was wondering if anyone has a good manual or link...
Replies
2
Views
1,898
Hello everybody! I'm new, so I apologies if I'll make some mistakes. ok So, let's begin. I have an IBM A31 laptop with 1.7GHz processor and 256MB...
Replies
14
Views
8,981
Hey, I have Siemens OP177 panel and I am having a problem mapping the function key leds in WinCC flexible 2005 SP1 HF7. I cannot find a good...
Replies
5
Views
9,972
Back
Top Bottom