LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-e 1427 and Image Acquisition

Hi all,

 

I am using PCI-e 1427 to acquire images through my camera MegaPlus ES 4020.  I can see the camera in the sub-tab of NI-IMAQ Devices under Measurement & Automation Explorer. But I want to snap images constantly to be used in a  producer loop of a an event structure. If someone had a similar experience like this, I would like to hear about that.

 

 

Best,

 

Kutal.

0 Kudos
Message 1 of 11
(4,212 Views)

Hi Kutal,

Since you already managed to see the camera under NI-IMAQ Devices in MAX, you would be able to use the camera with NI-IMAQ driver in LabVIEW or CVI or other development environment and also in an event structure.

Do you get any issue that you can't resolve with using the camera in an event structure?

 

Regards

- Meadow -
LabVIEW 7.0 - 2011, Vision, RT, FPGA
TestStand 3.0 - 4.5
0 Kudos
Message 2 of 11
(4,203 Views)

Hi Meadow,

 

Actually, I didn't build up the image acquisition yet in the main VI. But I want to be able to write a simple program to be able to change the exposure time of the camera and other properties. I checked out the examples named HL Snap.vi and LL Snap vi. 

To be able to change exposure time, will I use Get Buffer.vi? Or another suggestions?

 

Best,

 

Kutal.

0 Kudos
Message 3 of 11
(4,186 Views)

Hi Kutal,

 

If you look at the Grab and Basic Attributes Setup.VI under Example Finder->Hardware Input and Output->IMAQdx->High-Level, I believe this is what you are trying to do. An easier way to set the exposure time would be in Measurement & Automation Explorer. Hope this helps!

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(4,177 Views)

Hi Mychal,

Actually I am not using IMAQ-dx, I am using IMAQ right now. I am sending the program that I am using for only grabbing images continously and changing the exposure time whenever needed. The problem is that I can't update the exposure time and can't get any update in the output of the camera.

Best,

 

Kutal.

0 Kudos
Message 5 of 11
(4,174 Views)

Hi Kutal,

 

I'm sorry about that mix up! Are you having issues setting the exposure time? Or is the issue with updating it? 

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 6 of 11
(4,168 Views)

Hi Mychal,

 

It is both actually, and the other thing is that I can't get continously snapping of the images.

 

Best,

 

Kutal.

0 Kudos
Message 7 of 11
(4,165 Views)

Hi Kutal,

 

I'm sorry it has taken so long to respond! Somehow your reply was lost in our system for a little bit. 

 

If you open up MAX, click on your camera, and open up the Camera Attributes tab (on the bottom), do you see an option for Exposure Time? If so, can you post a screen shot of it please? Also, do you receive any errors when you run your code or does the image just not update? Thanks Kutal!

 

Mychal F

Applications Engineer
National Instruments
0 Kudos
Message 8 of 11
(4,149 Views)

Hi Mychal,

 

I didn't see your respond up to now. I was not using this camre for a long time but I have to use it again and I am having the same problem.  I am attaching the vi that I wrote and the sanpshot from the device driver. What I want to implement is to a simple Vi, that I can grab images and save images whenever I want via VI (Like an event structure based VI) grabbing constantly and saving or changing the exposure time via consumer control.

 

Best,

 

Kutal.

Download All
0 Kudos
Message 9 of 11
(4,053 Views)

Hey Kutal,

 

You shouldn't need to use any queues to implement the save to file from your producer loop.  This old forum post discusses that when you pass an IMAQ image you are not passing by value rather you are passing a reference to the image space you create with IMAQ Create.vi.  There for if you enqueued elements of the queue with IMAQ images they would just be references to the same memory space being updated by the IMAQ Snap VI.  Looking at your code hopefully you are able to modify the exposure with your event structure.  You should be able to add a button control for snapshot/save image and add an event case for it.  When the event occurs use IMAQ Copy Image to copy the current image into a memory space made specifically for images being saved.  Then implement the same IMAQ Write to File.vi as shown in the IMAQ Snap and Save To File Example that ships with vision acquisition software.  Below is a VI snippet of what this could look like.  Notice that all I need to pass to the event structure is the IMAQ image reference.  Whenever the snapshot event occurs it will copy the current image into the second memory space I created with another IMAQ create function.

 

Event Snapshot.png

Regards,
Isaac S.
Applications Engineer
National Instruments
Message 10 of 11
(4,021 Views)