Solution
This error is occurring because the camera is trying to send too much data across the FireWire bus in too short a time. To fix this problem, the speed and/or packet size parameters must be adjusted to account for the desired image settings. The following steps describe how to make these changes:
- Open Measurement & Automation Explorer (MAX).
- Expand Devices and Interfaces.
- Expand Legacy NI-IMAQ IEEE 1394 Devices or NI-IMAQdx Devices, depending on the driver that is associated with the camera that you are using.
- Select the camera to configure.
- Browse to the Acquisition Attributes tab in the bottom edge of the MAX window.
- Choose a Video Mode that best suits your needs.
You also have the option to increase the Speed and Packet Size parameters manually. Selecting a Video Mode actually sets these two parameters appropriately for the given mode. Depending on the camera and driver type, you may be able to make adjustments to the Speed and Packet Size after selecting a Video Mode.
It is recommended that you set the Speed setting to the highest value possible for single camera acquisition. This causes the driver to reserve as much bandwidth as possible for the camera, and allows image data to be transferred as quickly as possible. Be careful not to set a packet size that is larger than what the speed setting will allow, or else this error will occur. Here is a table of the maximum Packet Size based on the Speed parameter:
Camera Speed | Maximum Cumulative Packet Size |
---|
100 Mbps | 1024 bytes |
200 Mbps | 2048 bytes |
400 Mbps | 4096 bytes |
800 Mbps* | 8192 bytes |
*Available for IEEE 1394b cameras only
There is also a nonstandard video mode (Format 7) that is available for certain cameras that allows for manual adjustment of the Speed and Packet Size. Format 7 does not have a frame rate associated with it. To calculate the effective transfer rate, use the following equation:
where:
Ft = frames per second transferred
npac = number of bytes per packet
W = image width in pixels
H = image height in pixels
npx = number of bytes per pixel.
Note: It takes slightly less time to transfer a frame than it does to acquire a frame.
When acquiring from multiple cameras, it is important to carefully select the packet size and speed for each camera that is sharing the bandwidth available from the FireWire card. For a given FireWire card, there will be a maximum number of bytes per packet that can be sent, and a maximum data transfer rate. The packet sizes being transmitted from each camera should sum to be less than or equal to the maximum packet size receivable by the card.
For example, an IEEE 1394a card is capable of receiving packet sizes of up to 4096 bytes at 400 Mbps. If you acquire from two cameras, then the packet size for each camera should be set to 2048 bytes per packet. Thus, the total number of bytes per packet, when added together, will not exceed 4096, and the transfer rate to the card will be up to 400 Mbps. IEEE 1394a cameras and cards allow a maximum of 4096 bytes per packet at 400 Mbps, while IEEE 1394b cameras and cards allow for 800 Mbps and 8192 byte packets.
To avoid receiving the Insufficient Resources error when adding cameras to a card, ensure that the total number of bytes per packet does not exceed this limit. By making adjustments to the video mode for each camera, it should be possible to reduce the total number of bytes per packet to a number less than or equal to the packet size limit.
Included as an attachment to this document is a FireWire Bandwidth calculator. Use this to help find what the most efficient packet size and speed settings will be for your camera and card configuration. The calculator simulates FireWire resource usage on the bus as cameras are added to the bus.
For more information on the FireWire bus, please refer to the related links below.