Cognex & Siemens

CharlesM

Member
Join Date
Aug 2005
Location
Arkansas
Posts
1,129
I've got a Cognex In-sight camera setup with OPC to WinCC Flexible RT. Works good without any trouble however I don't have a way to display the images. The active X control does not seem to work with flexible. As soon as I add it to the screen it gives me an error. I've looked at seting up an FTP server on the computer but I would like a better solution. Any ideas?
 
Hi Charles.

I am guessing there is a regular runtime software for the cognex camera. If you can set it to be always in the front, then it will be viewable even if the user operates the WInCC Flex RT. You would have to reserve an unused area in the WinCC Flex screens where the camera screen can display.
If the images shall not display allways, you can start it with a button and the system function StartProgram.
Dont know if there is a smart way to stop it from within WinCC Flex RT.
Maybe "taskkill (progname)".

Btw. I have only managed to get a few activex programs to work within Flex RT.
 
I don't think I want to pull up the Cognex application all the time. I think they might screw something up. I did play with a script some this morning with some limited success. I was able to use the com part of the active X to ping the camera. This tells me the camera is there and responding. The next step was to connect to the camera and get some info then save images. I was unable to get the connection to work. I think it is posible but it appears you have to install the Cognex development kit to get full control. After thinking about that I think maybe enough is enough. Cognex does have some good examples using their active X with VB. So now I am thinking of just making a VB application that will connect to the camera download the images and close. I can call this application from Flexible and display the images in an HTML box on the screen. If I come up with something better I will post it back here.
 
For the ActiveX control to work properly, you will have to install the insight software.
Or you could manually register the .ocx file with its .dll in windows.
I have used the VBS in Wincc fleible before to connect to a cognex camera, so it does work.
 
LestatZA you give me hope

I have used the VBS in Wincc fleible before to connect to a cognex camera, so it does work.
Eveything is installed and registered correctly. I am sure because the examples for VB & VB.net from Cognex work fine. I was just never able to get the connect to work in VBS. I think this is because I did not install the SDK from Cognex. Did you have this installed when you did it?

I am planning on working on this project again tomorrow. So maybe I will give the VBS another try. Thanks for the post.
 
Does anyone have an update on this?

I am trying to get the activex to work in WinCC Flex advanced.

When I try and drag+drop theobject I get the error displayed in the image below.

CognexActiveX.jpg
 
Just updating this.

We have managed to get the Cognex ActiveX control working in WinCC Flexible Advanced.

One of the programmers at work effectively wrapped the Cognex OCX into another OCX and then exposed the properties.

He has also set the option to use the save image function which I can specify in the string input field at the bottom of the screen.

All the properties of the Cognex application are exposed so I can directly write tags to them allowing almost full control.

See images below.

ttson577.jpg






And the properties exposed.

properties.jpg


I still have no idea why the Cognex OCX would not work. The Cognex OCX appears to work OK in WinCC but not Flex.

At the TIA portal presentation a couple of weeks back, we was told that when TIA is released, the GUI part is fully selectable from a small Text panel right the way up to full WinCC. Hopefully if you have an equivalent of WinCC Flex ADV in TIA, ActiveX controls will be fully supported.

Regards
 
That looks great.
One of the programmers at work effectively wrapped the Cognex OCX into another OCX and then exposed the properties.
Did he do this in VB or C++? Was he able to do it with out the development kit from Cognex?
 
Charles.

I think he did it in VB.

We did not buy anything extra from Cognex. He just took the supplied ActiveX from the examples installed with Insight Explorer and wrapped it.

I'll confirm the programming source on Monday.
 
I will look into that on my next Cognex project. I have some hope that the next version of Siemens software will fix some of the active X compatibility problems.
 
Sorry to dig up an old thread but were there many more success stories?

Im now trying to embed a cognex camera into a WinCC Flex screen - No Joy, same error.

Regards.
 
I have not been able to do it. The only solution that I have found is to setup a FTP server to get the images off the camera then display them in a HTML window on the screen. All you get is the image none of the controls from Insight.
 
You need to take the insight control active x and wrap it in another activex.

Keep in mind that every time you change screen, the control will disconnect from the camera. Therefore if you want to you it to save images with overlay graphics, you need a control on each screen.

You can hide the actual control but it must be there to connect.

Cognex.jpg
 
Last edited:
I will look into that on my next Cognex project. I have some hope that the next version of Siemens software will fix some of the active X compatibility problems.


I tried with the new WINCC Professional (TIA portal) and it is just the same.

Even the TIA full WinCC will not work with the Cognex activeX when the old WinCC V7 usesd to (in a way).
 

Similar Topics

Which signals do I have to use to get data from camera. For example camera detects a defect and sends signal to controller. Power cable: CCB-PWRIO-05
Replies
1
Views
241
Hi everyone i want to ask if i can connect Congnex Emulator to Siemens Tia portal? but without Cognex Camera.
Replies
0
Views
529
I have an in-sight cognex camera connected via profinet, and it is up and running perfectly. However, for reasons too long to explain, I need to...
Replies
9
Views
6,299
I am having some issues in the profinet functionallity, when I put the camera in offline mode from the insight software it puts my processor in...
Replies
2
Views
3,809
Hiya, Im triggering a cognex camera by a sensor and from then on i want my In-Sight Explorer program to do something and have an output string...
Replies
2
Views
6,662
Back
Top Bottom