15.11.2014 Views

Telemetry Module MT-102 User's Manual - BlueNote Communications

Telemetry Module MT-102 User's Manual - BlueNote Communications

Telemetry Module MT-102 User's Manual - BlueNote Communications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Both 16 and 32 bit registers can be searched. If the value found exceeds the range of (store<br />

result) register, the error flag is set.<br />

Example 1:<br />

Table from XREG1 = 1, 5, 0, 100, 23, 340, 1, 25, 340, 5, 560, 23<br />

get X (register) = XREG1<br />

get Y (register) = 10<br />

store result (register) = REG1<br />

The result is REG1 = 340<br />

Example 2:<br />

Table from DREG1 = 1, 5, 0, -12000, 23, 340, 1, 25, 340, 5, 65000, 23, 100000, -65000<br />

get X (register) = DREG1<br />

get Y (register) = 12<br />

store result (register) = REG1<br />

The result is REG1 = 65000.<br />

If register had the value of 13 for (get Y), the function would have returned REG1 value<br />

equal to 100000.<br />

Search for min. value in table<br />

The function scans the table beginning with register (get X) for length defined by register<br />

(get Y). The lowest value found in the search is written to (store result) register.<br />

Both 16 and 32 bit registers can be searched. If the value found exceeds the range of (store<br />

result) register, the error flag is set.<br />

Example 1:<br />

Table from XREG1 = 1, 5, 6, 100, 23, 340, 1, 25, 340, 5, 560, 0<br />

get X (register) = XREG1<br />

get Y (register) = 10<br />

store result (register) = REG1<br />

The result is REG1 = 1<br />

Example 2:<br />

Table from DREG1 = 1, 5, 0, -12000, 23, 340<br />

get X (register) = DREG1<br />

get Y (register) = 4<br />

store result (register) = REG1<br />

The result is since REG1 cannot hold the value of -12000.<br />

Search for value in table<br />

The function scans the table (buffer) starting with register (get X) searching for value<br />

defined in (get Y) register. The table is searched for first occurrence of searched value or to<br />

the end of the memory space. If the value is found, the function returns an index to the<br />

register. Indices are calculated from 0. If not found, the function sets an error flag.<br />

NOTICE!!!<br />

The function can search tables of 32 bit registers though one has to be aware that index<br />

returned is a 32 table index and not equal to the offset in the address space, as is the case<br />

for 16 bit tables.<br />

100

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!