regisphilbin Posted July 17, 2003 Report Share Posted July 17, 2003 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 Quote Link to comment
regisphilbin Posted July 19, 2003 Author Report Share Posted July 19, 2003 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. Quote Link to comment
Holmes Ripoll Posted February 16, 2004 Report Share Posted February 16, 2004 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 Quote Link to comment
Michael Aivaliotis Posted February 17, 2004 Report Share Posted February 17, 2004 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 Quote Link to comment
regisphilbin Posted February 17, 2004 Author Report Share Posted February 17, 2004 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) Quote Link to comment
regisphilbin Posted March 16, 2004 Author Report Share Posted March 16, 2004 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) Quote Link to comment
pallen Posted April 23, 2004 Report Share Posted April 23, 2004 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. Quote Link to comment
regisphilbin Posted April 28, 2004 Author Report Share Posted April 28, 2004 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 Quote Link to comment
pallen Posted January 27, 2005 Report Share Posted January 27, 2005 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 Download File:post-247-1106841842.vi Quote Link to comment
pallen Posted January 27, 2005 Report Share Posted January 27, 2005 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. Quote Link to comment
regisphilbin Posted January 27, 2005 Author Report Share Posted January 27, 2005 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 Quote Link to comment
GustavoK Posted January 26, 2007 Report Share Posted January 26, 2007 Does anyone know how to get the product list from the camera through the SendProductQuery and the OnProductQueryAck methods? I Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.