LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb 3.0 camera black screen

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

0 Kudos
Message 11 of 24
(2,495 Views)
Can you just use separate vi to grab(search for built in examples if required) image from your camera and check?
-From the screenshot, i feel there is no image grabbed. So i think there is something wrong with your camera grabbing program.
-Since it's showing images in MAX and pylon, camera is perfect according to my assumption.
-Also make sure you are using proper buffers for images(most critical)...
-Put a probe after IMAQdx grab and see if you get any error...
Thanks
uday
0 Kudos
Message 12 of 24
(2,477 Views)

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? 

Download All
0 Kudos
Message 13 of 24
(2,400 Views)

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! 

Download All
0 Kudos
Message 14 of 24
(2,399 Views)

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

0 Kudos
Message 15 of 24
(2,382 Views)

OK, here is the Snippet. 

0 Kudos
Message 16 of 24
(2,366 Views)

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

0 Kudos
Message 17 of 24
(2,344 Views)

Sorry for the inconvenience. Here is my VI code. Thank you so much for your help! 

0 Kudos
Message 18 of 24
(2,313 Views)

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?

Thanks
uday
0 Kudos
Message 19 of 24
(2,275 Views)

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:Simple Video Test.png

I wired a Constant to the Open Camera function, then set the dropdown to point to my Logitech C920.  Here are some notes:

  1. You have an Unconfigure Acquisition, but there's no "Configure Acquisition" to undo.  Curious.
  2. You do not have a Configure Acquisition (it might not be needed, but I'm configuring it here for Grab, with 10 internal buffers).
  3. On my camera, these Acquisition Attributes raised Error -1074360305, Attribute not supported by the camera.
  4. You allocate only one temporary memory location for all the images, which means they overwrite each other!  There is also no Image Type specified.
  5. Here's a second acquisition into the same memory as the previous -- unclear why you are doing this.
  6. This gave me Error -1074396080, Invalid image type.

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

0 Kudos
Message 20 of 24
(2,246 Views)