Справочник Пользователя для National Instruments Image Acqusition Software NI-IMAQdx

Скачать
Страница из 65
Appendix A
Register-Level Programming
© National Instruments Corporation
A-3
The NI-IMAQdx software provides the following register-level primitives:
Read Register—Reads 32-bits of data from a specified memory 
location
Write Register—Writes 32-bits of data to a specified memory location
Read Memory—Reads an array of bytes from a specified memory 
location and range
Write Memory—Writes an array of bytes to a specified memory 
location
Usage
To perform a register-level access, specify a memory location (or offset) 
and data storage. IEEE 1394 memory locations are specified as 48-bit 
values. The upper 20 bits are filled in by the driver. The low-level register 
primitives accept the lower 28-bit offset. The memory storage contains the 
result/desired data when transferring. GigE Vision memory locations are 
specified as 32-bit values.
Basic Example
The isonchronous enable register indicates active video transmission. To 
read the ISO_EN register (0x614), calculate the memory offset by adding 
the specified offset to the base register. The base register is 0xF0F00000 for 
most IEEE 1394 cameras.
0xF0F00000 + 0x614 = 0xF0F00614
The value is read, and the result is placed in the specified memory location.
read register (0xF0F00614) = <iso_en>
where <iso_en> = (0x80000000 or 0x00000000).
If bit 0 has a value of 0x80000000, the bit is on, and the camera is 
transmitting video data. If bit 0 has a value of 0x00000000, the camera
is not currently transmitting data.