National Instruments Image Acqusition Software NI-IMAQdx Manual De Usuario

Descargar
Página de 65
Appendix A
Register-Level Programming
A-4
ni.com
Advanced Example
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>
× 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.
Caveats
This section discusses caveats to consider when programming registers 
using the NI-IMAQdx software.
Endianness
Data that spans multiple bytes, such as a quadlet, may be written 
left-to-right or right-to-left. The method with which data is written is called 
endianness. Two types of endianness exist: big endian and little endian
The ethernet and IEEE 1394 bus transports data using the big endian 
method. However, Windows and LabVIEW RT host machines accept little