Refer to the your hardware documentation to install and configure your hardware. If you are using the Compact Vision System, refer to the Quick Start Guide that is shipped with the device and the NI 1450 User Manual which is installed in your programs folder (Start>>Programs>>National Instruments>>Vision>>Documentation>>NI 1450 User Manual).
After installing and configuring your hardware follow these steps to configure your IEEE 1394 camera:
1. Launch Measurement & Automation Explorer (MAX) and press F5 to refresh its screen.
2. In the MAX configuration tree, click the plus sign next to the Devices and Interfaces folder. If you are using the Compact Vision System, it will show up under Remote Systems. If you are using a IEEE 1394 Device that is plugged into your Computer, it will show up under My System.
3. Click the plus sign next to the IMAQdx Devices folder to view a list of cameras that are connected to your IEEE 1394 Device.
Note: If you'd like to use the Legacy NI-IMAQ for IEEE 1394, you can right-click on your device (your camera) and specify which driver to use. With the a CVS your camera will show up in both categories automatically.
4. At the top of the display in MAX you can click on the Snap button to acquire a single image and display it in the window, or you can click on the Grab button to acquire and view continuously. You can also view a histogram of the image or save it to disk.
5. You will see 4 tabs at the bottom of the MAX Window. All 4of these tabs are populated with options that the IMAQ driver reads directly from the camera itself. You can modify some of the values, but the options are defined by the camera vendor. The Camera Information tab is displayed in the image above and contains information about the camera. The Acquisition Attributes tab shown below allows you to select the Video Modes and Time-out. If you are using Format 7 (explained below), you can also modify the Packet Size and Region of Interest.
Note: With the NI Compact Vision System you can modify the Region of Interest even if you are using Formats other than Format 7. This does not change the amount of data that is transferred over the bus. It only changes the amount of data your Application Software will read into memory. Using Format 7 with the Compact Vision System works the same way as it would with a PC.
The Camera Attributes Tab shown below allows you to select different options for your camera such as Brightness and Gain.
The fourth tab, Bayer Color, is available for cameras that output the image in Bayer format. In this case a grid of filters is layed over the sensor so each pixel senses only one color. The value of the other two colors is determined by interpolating the color values of adjacent pixels. The following document describes Bayer patterns in further detail
6. When the settings of your camera are where you want them, click on the save button at the top of the display in MAX.
7. Close MAX
Configuring Format 7:
When using other formats, the packet size, frame rate, and Region of Interest are fixed depending on the mode that you use within that format. But with format 7, you can modify either the packet size or the Region of Interest to control the amount of bandwidth that will be reserved by the camera and thus controlling the maximum frame rate. View the image above that displays the Video tab in MAX. This is the tab where you select the following items for Format 7.
1. Select Format 7 for the Video Mode.
2. Select the Desired Region of Interest
3. Select the Packet Size
Even though you can modify the Packet Size in Format 7, you can still only choose discrete values that are predetermined by the camera manufacturer. MAX will automatically coerce the value for the Packet Size to its nearest valid value and display the result for you. The resulting maximum frame rate in frames/second can be calculated by the following equation: (Packet Size in Bytes * 8000) / (width*height*pixel byte depth).
note: some cameras may require that you trigger the camera when using it in Format 7 mode
The NI-IMAQdx driver will install the User Manual and a Function Reference Manual that you can access from the Start Menu in Windows. If you are using LabVIEW, it will also install a specific palette of VIs that can be used to program the acquisition from IEEE 1394 Cameras. The palette is titled IMAQdx. It includes Configuration, High Level VIs, Low Level VIs, Triggering, and access to the registers on the IEEE 1394 Camera.
Within the IMAQdx palette is a subpalette for Legacy NI-IMAQ for IEEE 1394. IMAQdx is the latest and most complete driver and should be used for any new development. The legacy drivers and function calls are available for any previously written programs that may require them. They also appear dimmed to stress the use of the IMAQdx function calls instead.
NI-IMAQdx will also install a variety of example programs that demonstrate how to write your VI to do Snaps, Grabs, Sequences, Triggers and more. In LabVIEW, these can be accessed by going to Help>>Find Examples which will bring up the NI Example Finder, as shown below. When browsing Hardware Input and Output, there are separate folders for IMAQdx and Legacy NI-IMAQ for IEEE 1394.
The following Front Panel and Block Diagram illustrate how to perform a snap of your IEEE 1394 camera in LabVIEW . This example uses the Image Display Control available for versions of IMAQ later than 2.6.0.
The Driver also installs example programs that demonstrate how to program acquisitions in CVI, Visual Basic and C. You can use the User Manual and Function Reference Manual to find detailed descriptions of how to make calls into the NI-IMAQdx Driver.
Note: you can also find many useful example programs on-line at ni.com that include all applicable programming environments.
Some DCAM compliant IEEE 1394 cameras support triggering. This aspect has changed from previous versions of NI-IMAQ for IEEE 1394. The following Block Diagram is for the Legacy Driver and is the easiest way to demonstrate the concept. This program is the same as the previous snap example program with one VI added to it, the IMAQ1394 Configure Trigger.vi. If programming in CVI, Visual Basic or C, you would use the IMAQ1394ConfigureTrigger function. This function will send an isochronous command to the camera to tell it to expect a signal on its external connector.
This example uses Mode 0 for the camera mode. There are 4 different modes of triggering that are specified by the DCAM specification. Cameras are not required to support all of these.
- Mode 0: The camera starts integration from the external trigger input falling edge. Integration time is described with the "shutter" attribute.
- Mode 1: The camera starts integration from the external trigger input falling edge. Integration time is equal to low state of the external trigger.
- Mode 2: The camera starts integration from the first external trigger input falling edge. At the Nth external trigger input falling edge, integration will be stopped. (N defined by the parameter control.)
- Mode 3: This is the internal trigger mode. The camera will issue a trigger internally. The cycle time is N (parameter) times of the cycle time of fastest frame rate. The integration time is specified with the "shutter" attribute.
- You may also choose to disable the trigger and the camera will start integrating immediately.
If using Mode 0 through 4, there must be an external digital signal connected directly to the camera. If using a 3rd party IEEE 1394 plugin device, the user must provide this digital signal. If using the CVS, the user may use the digital I/O port to control the timing of the signal connected to the camera. Also, NI Digital Data Acquisition Devices may be used to generate the trigger.
For IMAQdx the triggering functions are controlled using property nodes, as shown in the block diagram below. Please refer to Triggered Grab.vi, an IMAQdx example program (available by searching the NI Example Finder) for further information.
Where can I find the latest version of NI-IMAQdx?