Advanced Example of Usage

NI-IMAQdx

Advanced Example of Usage

The advanced feature described in this example is specific to Basler IEEE 1394 cameras. The advanced feature replaces the live video feed with a static test pattern.

According to the user documentation for the Basler A601f camera, the TEST_IMAGE register is located at advanced offset 0x0098. You can enable a static test pattern by setting bit 17 of the TEST_IMAGE register. To get the advanced base register, first read ADVANCED_FEATURE_INQ register (0x480). Add the specified offset to the base register—0xF0F00000 for most IEEE 1394 cameras.


0xF0F00000 + 0x480 = 0xF0F00480



Read the value into storage.



read register (0xF0F00480) = <advanced_feature_inq>



where <advanced_feature_inq> = 0x800000.



Now, calculate the offset to the advanced feature offset. You need to multiply the previous result by 4 to convert the quadlet offset value to byte offset.



(0xF0F00000 + ( <advanced feature offset> x 4) + 0x98) = newly calculated offset

byte swap (1 < < 17) = newly calculated register mask

write register (0xF2F00098, 0x00002000)



Now the camera is set to the test pattern.