Jump to content

DVT 530 Camera, Labview and ActiveX


Recommended Posts

Posted

I've been playing around with a DVT Ethernet based B&W Camera and trying to get it to communicate with LV using ActiveX. First off, has anyone put together VI's for this product?

DTV provides ActiveX components and I'm using the "connect" method after opening a reference to the device. I get an error msg

"Socket DLL Error: WSANOTINITIALISED:10093 A successful WSAStartup() call must occur before using this function"

looking this up in MSKB, i found that WSAStartup() is a function call within wsock32.dll. When trying to "Browse" for the "Select ActiveX class" input, I'm unable to call this function... just FYI, my only real activeX experience is utilizing ActiveX to control Excel functionality for reading/writing to spreadsheets....

In any case, would someone know the process in "initializing" Winsock in LV so that I can proceed with linking LV to the camera?

Thanks,

regis

Posted

With the help of Nicola Chiari, I was able to get it to work...here are some of the details as well as a basic diagram.

1) It was mentioned to use an ActiveX container as my ActiveX Reference. instead of just creating an ActiveX Control on the wiring diagram. This allowed me to change some of the properties prior to running the program.

2) Not only did i need to specify the RemoteHost IP Address in the "connect" invoke mode, but also in the properties of the ActiveX Container.

3) I was trying to talk directly to the winsocket DLL's but that got way too complicated too quickly.

Pictures below:

1) I put 2 objects on the front panel, a ActiveX Container, and an ActiveX control.

2) The wiring diagram shows pretty much identical coding with the container vs. the control. I was always getting Winsock errors with the control. I'd also have to wire some sort of picture indicator for displaying the cameras image.

3) The property of the ActiveX Container and where I had to "hard-code" the actual IP address. I'm finding out now that i can set up the properties programatically prior to wiring the "Connect" invoke node.

CameraAcq1.gif

CameraAcq2.gif

CameraAcq3.gif

  • 6 months later...
Posted

Hello.

I am writting you because I have the same vision project with DVT products and LabView. I have been following your suggestions written by you on the application of vision with DVT products. I achieved the comunication when I have the highlight (light bulb icon) on, but when it is off, it doesn

Posted

one nice thing about having a timer with the pass through Error cluster is that you can introduce wait times in specific parts of the program without using the sequence structure.

I've attached an identical solution to the one posted above but just using NI controls (with the sequence structure)

post-10-1077048352.jpg?width=400

  • 4 weeks later...
Posted

For Clarification,

The ActiveX container can be obtained (in LV7.0) by the picture below. Once you drop a container in your program, Right-click on the container, then "Insert ActiveX Object". This will allow you to select the appropriate ActiveX control (if you have installed the DVT ActiveX enabling software)

post-10-1079469090.jpg?width=400

  • 1 month later...
Posted

I am also currently working with DVT cameras. (520 Model)

Although I have been working with a similar software package for a little while, I'm still very new to LabView.

Using the TCP Communicator Active.vi example in LV7, I was able to successfully send a "trigger" to DVT camera and receive the string data that I had setup in DVT's Data Link.

This is already very close to what I'd like to do. What I'm currently trying to figure out is how to parse the tab delimited data that I acquire from the camera so that I can use them as boolean operators. (pass/fail)

Any advice would be greatly appreciated.

  • 8 months later...
Posted

Hi Regis,

Thanks for posting this info to the Lavagroup. (I miss the meetings)

I didn't figure that I'd be using the Active X controls in my applications. But now that I'm faced with having to deliver a replacement control/monitor for a four camera system in just two weeks, I'm re-thinking things.

I'm still completely green with both LabView and ActiveX programming. But in a couple of hours I've managed to find the same controls you used and connect them in a way that looks like it should work. (I've installed the latest ActiveX controls from DVT)

Unfortunately all I'm getting at the moment is a blank display screen and no indication that I'm even connecting at all.

I know I have IP correct. But whether I should be using Port 5001, 5000, or 3246 is still a mystery. So far there's no difference between any of them.

I can't seem to figure out how to create just a "container" without making it into a control. (I doubt that makes any sense) If I place a blank container on the front pannel, it's just that; Blank. I can't figure out how make it DVT anything without popping up "Insert ActiveX Object" and using the dialog to Create Control. This is the method I used to create what I have already.

I've made sure that the camera is capturing and I can see the image updating in FrameWork. The error that showed up a couple of times (in the screenshot) doesn't come up when I use Port 3246 (What the manual suggests)

It looks like I almost have it. But I'll still need to figure out if I can trigger inspections, get results, and switch products via ActiveX. The tools are there, so it should work. But unfortunately I have very limited time to make this work.

I've got some screenshots of what I have so far. I'll also upload the code as well. If anyone has an idea, I'd really appreciate it.

Code is LV 7.1

post-247-1106841841.jpg?width=400

Download File:post-247-1106841842.vi

Posted

I feel stupid now. :headbang:

I just noticed that I wasn't running my dup reference through the wait sequence. When I drew the wire through it, somehow it ended up behind the structure...not tunneling through it.

I just fixed that, and now I have an image. YAY! I'm not fired yet.

I've still got a really long way to go before I have what I need. But little forward motion was what I desperately needed on this project this morning.

Posted

Hi Pallen,

What I've described is about as far I've gone with my DVT/Labview experience. I was able to get it to grab a picture and fiddle with certain functions but fell short of created an entire interface with controls.

Good luck in your endeavors...

Regis

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.