12-02-2014 04:56 PM
If you can capture images from the Basler camera in MAX, then you (should be able to)(can) capture them in LabVIEW using IMAQdx. You need to make sure that the settings you used in MAX are replicated in LabVIEW. I've actually got a Basler camera "looking at me", but haven't used it in a while. Maybe I'll play with it and see if I can make specific recommendations. The Good News is this is probably going to work for you ...
Bob Schor
12-03-2014 12:09 AM
12-15-2014 10:28 AM
I have solved the lens question now. Now I can see what I want in MAX but the Labview is still blank. You can see my attachments below. I am wondering if it is the problem from the Labview programme because we used the IEEE 1394 camera before in this programme. Can you help me to take a look at my program or if you know any place I need to change?
12-15-2014 10:32 AM
Thank you for your reply!
I just checked and I think the camera grab is not problem because I can see what I want in MAX (I attached the screenshot in last reply). Now I suspect the Labview problem maybe where the problem is. Because We used an IEEE 1394 camera before and now I changed to a USB 3.0 camera. I have no idea if I need to make some changes in Labview program and setting? Can yopu help me to take a look at my programme? I'd appreciated it. I attached my programme below!
12-15-2014 01:52 PM
Please do not attach JPeg pictures of your VIs. Either attach the VI itself as an attachment, or create a Snippet (select the entire Block Diagram with Ctrl-A, go to Edit and choose Create Snippet from Selection) and paste that in. You might think that the Snippet is "just another picture, so why not use JPeg?", but NI actually includes LabVIEW code in the .PNG, so we don't have to, by hand, recreate your code.
BS
12-15-2014 04:02 PM
OK, here is the Snippet.
12-15-2014 07:46 PM
Sigh. If it is a Snippet, you do not attach it, you paste it into the Message using the 10th icon on the Toolbar just above, labelled Insert/edit image. If you are going to attach something, for goodness sake, attach the VI.
I'm happy to help you with this, and can probably get it to work for you, but you need to attach the VI. Forget Snippets,forget pictures, send the code! I'll be able to size it to fit my much tinier screen (only 1920 x 1080) and then I can hope to figure out what is going on with your code.
Sorry to complain so much ...
BS
12-16-2014 10:12 AM
Sorry for the inconvenience. Here is my VI code. Thank you so much for your help!
12-16-2014 11:46 PM - edited 12-16-2014 11:56 PM
If your first screenshot is valid, it shows cam0 as your camera, where as you selected cam1 in your labview code!!! can you confirm on this?
-forget about entire code, just use direct grab code and see if you are able to capture images?Please use labview's inbuilt example and see if it's working first then with your large code.
-Did you try using with basler's pylon software and try it? Did you try changing the driver when you start using NI MAX again?
-did you keep probe after IMAQdx grab? what it showed?? Please keep probe at image out and error out at IMAQdx..
adding: can you verify your camera description files or post which camera it is and the interface?
12-17-2014 08:33 AM
Wow! I've rarely seen a Block Diagram that large (by my estimation, it is about 5000 pixels wide and 3000 high, but should really be considered 10000 wide as it uses a Stacked Frame structure, one that I would love to see banned!). A wonderful piece of Style Advice that I learned from Peter Blume's "The LabVIEW Style Book" is to never have a block diagram larger than a (normal) screen, say 1280 x 1024. If you have "more stuff" than will fit, start encapsulating into sub-VIs.
I tried to "follow your wires" and figure out what your code was doing. Here's a snippet:
I wired a Constant to the Open Camera function, then set the dropdown to point to my Logitech C920. Here are some notes:
When you have a monster of a Block Diagram that spans multiple screens, with wires running everywhere and half the wiring hidden in a Stacked Sequence, it is much simpler to debug a problem such as "Where is my image?" if you "start small" and put just the Image code together. It will certainly make testing a lot quicker and easier.
Try to do this with your code and your camera. When you have something "managable", you can do things like turn on Highlight Execution and see if errors pop up during data flow, or put probes on strategic wires.
If you are going to be doing image manipulation, you are going to want to create multiple "IMAQ Images" (they aren't really images, they are just temporary memory where IMAQ can provide the pixels for you to manipulate). Remember that the purple wire that comes out of the IMAQdx functions labelled "Image" is not an Image, but rather a pointer to a buffer within the IMAQ driver where Image data are located. This pointer, when passed to other IMAQ functions, can return an actual Image to us, but we need to provide such functions the "Image" memory by doing an IMAQ Create.
Note that this Snippet only has one of your two "Images" -- I'll leave it to you to add the other one. Incidentally, on my PC, when I temporarily disabled the Property Node of Point 3, I saw a reasonable set of Images when the code ran (even though the ImageToArray function, Point 6, threw errors).
Bob Schor