LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Visit our LabVIEW Wiki Machine Vision and Imaging Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> DVT 530 Camera, Labview and ActiveX
regisphilbin
post Jul 17 2003, 07:43 PM
Post #1


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


I've been playing around with a DVT Ethernet based B&W Camera and trying to get it to communicate with LabVIEW 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 LabVIEW so that I can proceed with linking LabVIEW to the camera?

Thanks,

regis


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jul 17 2003, 07:43 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
regisphilbin
post Jul 18 2003, 11:18 PM
Post #2


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


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.








--------------------
Certified LV Associate Developer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Holmes Ripoll
post Feb 16 2004, 10:55 PM
Post #3


One hit wonder!


Member
Posts: 1
Joined: 4-February 04
Member No.: 252
LV:6.1


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īt have any comunication. I think it is because I am missing the watch icon (green one) seen in the programming screen picture that is attached.
I would like to ask you for this icon...because I canīt find it in my software here V6.1 and we donīt have V7.0. I will appreciate if you help me find this virtual instrument...or any other help.

I would like to know if in your application you achieved the communication working with client/ server, with the ports 3426 and 3427 using winsocket.
Best regards
Holmes Ripoll


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Feb 17 2004, 01:23 AM
Post #4


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2402
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


QUOTE (Holmes Ripoll @ Feb 16 2004, 05:55 PM)
I think it is because I am missing the watch icon (green one) seen  in the programming screen picture that is attached.
I would like to ask you for this icon...because I canīt find it in my software here V6.1 and we donīt have V7.0. I will appreciate if you help me find this virtual instrument...or any other help.

The green icon is just a millisecond delay. It is the same as the LabVIEW wait ms function. I beleive this one has the error cluster wired through it for convenience. This VI comes from the OpenG toolkit. See here:

http://www.openg.org/tiki/tiki-index.php?p...it:%20Downloads

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
regisphilbin
post Feb 17 2004, 08:05 PM
Post #5


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


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)
Attached thumbnail(s)
Attached Image
 

--------------------
Certified LV Associate Developer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
regisphilbin
post Mar 16 2004, 08:31 PM
Post #6


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


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)
Attached image(s)
Attached Image
 

--------------------
Certified LV Associate Developer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
pallen
post Apr 23 2004, 09:04 PM
Post #7


Very Active
***

Member
Posts: 187
Joined: 30-January 04
From: Oakville, Ontario
Member No.: 247
Using LabVIEW Since:2002
LV:8.5.1 ,8.5 ,7.1
Canada ca_ontario Nothing Selected


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.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
regisphilbin
post Apr 28 2004, 05:25 PM
Post #8


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


pallen,

if you have any specific questions/problems on parsing strings, post them here. Heck, you can probably even attach a copy of the text file you'd like to parse....

Regis

--------------------
Certified LV Associate Developer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
pallen
post Jan 27 2005, 04:11 PM
Post #9


Very Active
***

Member
Posts: 187
Joined: 30-January 04
From: Oakville, Ontario
Member No.: 247
Using LabVIEW Since:2002
LV:8.5.1 ,8.5 ,7.1
Canada ca_ontario Nothing Selected


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 LabVIEW 7.1
Attached thumbnail(s)
Attached Image
 

Attached File(s)
Attached File  DVTActiveX001.vi ( 40.79K ) Number of downloads: 375
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
pallen
post Jan 27 2005, 04:40 PM
Post #10


Very Active
***

Member
Posts: 187
Joined: 30-January 04
From: Oakville, Ontario
Member No.: 247
Using LabVIEW Since:2002
LV:8.5.1 ,8.5 ,7.1
Canada ca_ontario Nothing Selected


I feel stupid now. frusty.gif


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.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
regisphilbin
post Jan 27 2005, 04:56 PM
Post #11


Very Active
***

Member
Posts: 81
Joined: 27-June 03
From: San Diego, CA
Member No.: 127
LV:7.1.1
United States Nothing Selected Nothing Selected


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

--------------------
Certified LV Associate Developer


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
GustavoK
post Jan 26 2007, 06:35 PM
Post #12


One hit wonder!


Member
Posts: 1
Joined: 26-January 07
Member No.: 7601
Using LabVIEW Since:2006
LV:7.1 ,. ,.
Brazil Nothing Selected Nothing Selected


Does anyone know how to get the product list from the camera through the SendProductQuery and the OnProductQueryAck methods? Iīm using Labview 7.1 and DVT ActiveX 1.4.0.

I found some examples on how to connect and show images, but nothing as complete as Visual Basic examples.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 8th January 2009 - 10:30 PM