Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting long exposure on Roper ES 1.0 camera

I am using the PCI-1422 board and the Roper ES1.0 camera on a Dell PWS530 computer with 256Mb memory running Windows 2000 Professional. The camera and IP board are working correctly from MAX when it is set to the short default 32ms exposure time in continuous mode, but I need to acquire a 500X500 pixel image with an exposure time of at least 1 second. I am having problems when I set it to a long exposure. The camera itself has no limits on exposure time and I have successfully taken long exposures on another system with a different IP card. However I want to write new software and hoped to use NI cards and LV software.

I know that I need to set the camera to controlled mode rather than continuous mode to get exposures longer than 32ms. I set it up in MAX so camera mode = controlled. I then set Trigger Source= Frame grabber and used the Exposure Pulse Width Setting to set the exposure time. I assume at this point the regular 'exposure' setting is no longer doing anything? The first problem is that the value for Exposure Pulse Width Setting can not be set higher than 100ms. I need it to go at least 10 times higher. As I said, the camera manual says there is no limit on exposure, so I assume this is some limit set in the camera file?

But, I continued on with it set to 100ms just to see if it would work. When I do a snap it does work. I can see from the image that the longer exposure has taken effect. However, I cannot use the grab option without getting a DMA timeout error. I get the DMA timout error whenever I 'grab' images when I have the camera set to contolled mode no matter what size image I set it to acquire or what time the exposure pulse width is set to. From what I can see of the board setup there is not even a DMA channel assigned to it.

The final problem is that one of the options for this camera is to run in single channel or dual channel readout mode. However I do not see any options in the properties or in the camera file for changing this setting. I would like to run in dual channel mode. Is there any reason why either setting would not work with this image procssing card? How come the option for changing it is not available and how can I get that option?

In summary I have 3 problems - I need a longer exposure time than what is available, I get DMA timeout error when running grab when I have it set in controlled mode- which is necessary to get long exposure, I want to be able to set the readout option.

I would appreciate assistance in solving these problems.

Nancy Backes
nancy.j.backes@honeywell.com
0 Kudos
Message 1 of 5
(3,574 Views)
Nancy,

Let me first address the 100ms limit and the single vs. dual channel issues. The wording in the ES 1.0 user's manual indicates that while exposure time is theoretically unlimited, dark field nonuniformities will start to become noticeable with exposures longer than 100ms. The term "noticeable" is up for individual interpretation. Higher quality machine vision cameras like the Roper list conservative values, while lower quality cameras sometimes specify several seconds or more. If you are satisfied with the image quality at the desired exposure time, then there is no reason why the 1422 would not accomodate settings longer than 100ms. The engineer who wrote the camera file probably just chose this as a safe value. You can increase the maximum allowable setting by changing the "Max" parameter under the "Exposure Pulse Width" section in the camera file. The "Min" and "Max" are specified in ticks of the camera's pixel clock (20 MHz). I think this value is stored as a U32 or I32, so don't set it higher than 2^31 to be safe. You will reach a practical limit well before this value.

The "ES 1.0" camera runs by default in the dual channel mode (single channel is an option), while the "ES 1.0 SC" model will only run in single channel mode. If you are using the "ES 1.0" camera file, then you are already acquiring in dual channel mode. If you want to use the camera in single channel mode, then you should use the "ES 1.0 SC" camera file. Neither camera file explicitly sets the camara into its respective channel configuration. You will need to do this outside of the camera file by issuing the "RDM x" serial command as shown in the Serial Interface Protocol section of the camera user's manaul. You can send serial commands from the 1422 to the camera with the IMAQ Serial Read and IMAQ Serial Write VIs found in C:\Program Files\National Instruments\LabVIEW 6.1\vi.lib\vision\driver\imaqll.llb. These VIs are not shown in the functions pallete in LabVIEW.

I will need to do a bit of research on the timeout issue. The DMA timeout error is unfortunately a little vague and simply means that for some reason the host computer did not get all of the data it was expecting. The root of the problem probably has nothing to do with the actual DMA transfers. More likely the camera is either not getting the correct trigger pulses from the card or is not responding as we expect it to. We have several ES 1.0 cameras here that we use for development. I will give this a try and let you know what I find.

Regards,

Brent R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,574 Views)
Thank-you Brent, for your quick response. My co-worker and I now have the camera running for the desired exposure time in controlled mode, but only when we 'snap' the picture. When we use 'grab' it still is getting the DMA error. My co-worker had called in to NI for help when I was not available and was also advised to change the timeout length in the camera file in order to get the longer exposure.

I do have an additional question about the serial interface and the cableing though. The cable we purchased with the 1422 board has one connector that goes from the camera to the board. At the board end there is another connector that looks like a 25 pin serial connector. Is that what it is? I did not find any information on the cable or connections. Or is this a connection for the digital I/O? If it is either of these things, what it the pin-out for this additional connector?

I want to make sure I understand what you are saying with how to send serial commands to the camera. I interpret what you said in your reply that I could use the special IMAQ Serial Read and IMAQ Serial Write commands and that these commands would pass through the IP board and be sent to and from the camera. I would not need to be hooked up to the serial port of the PC? Am I then correct that if the 25-pin connector on the camera cable is indeed a serial connection it could be connected to the serial port of the PC with a converter (there is a 9-pin connector on the PC) and that I could talk with the camera that way using normal serial/Visa commands (vs the IMAQ serial commands) or hyperterminal? Not that I would want to do it that way if I have the IMAQ serial commands available, I just want to understand how this works.

Finally, the test system we have set up right now is using Vision for Visual Basic, only the new one we will be ordering will be using LabView, so all my testing will have to be done on the VB system. Are there similar IMAQ serial functions for vision in VB and if so, where will I find them? Sorry if that last is an obvious question, I am the LabVIEW programmer here and not well versed in VB. That is also the reason I am asking more questions rather than just trying it out like I would with a LV system.

Nancy Backes
nancy.j.backes@honeywell.com
0 Kudos
Message 3 of 5
(3,574 Views)
Nancy,

The 25pin connector near the IMAQ card connects only to the trigger lines (TRIG 0-3) on the board to allow you to use external trigger sources. It is not for serial control nor should it be connected to the parallel port on the PC although this is definitely not an unreasonable assumption.

The serial lines are included within the data cable from the card to the camera. The serial port on the IMAQ card is like the standard com ports on the PC except it is only accessible through the IMAQ driver. Unfortunately these serial functions are not supported in VB. You can use them in C++ or LabVIEW.

Regards,

Brent
0 Kudos
Message 4 of 5
(3,574 Views)
The answer turns out to be that the current version of the 1422 board has a bug so that it will not work with the supplied camera file to do what I want. I was supplied with the information to make the necessary modification to the camera file to make it work, though it is necessary for me to change the file every time I change the exposure. I am told that this problem will be fixed with the next major release of NI-IMAQ.

Nancy Backes
0 Kudos
Message 5 of 5
(3,574 Views)