17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

187 MBWR P Matrix bit write<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F MBWR, MBWRP: 7 steps<br />

S * * * * * * *<br />

n * * *<br />

D * * * * * * * *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S: Matrix source device n: Matrix length (K1~K256) D: Pointer Pr (bit number).<br />

Explanations:<br />

1. MBWR instruction writes the bit status of the matrix. When MBWR executes, the status of<br />

M1094 (Matrix pointer clear flag) will be checked first. If M1094 = ON, Pr value in D will be<br />

cleared and the instruction writes from the first bit. The bit status of M1096 (Borrow flag for<br />

matrix operation) is written into the first bit of the matrix. After a bit is written, MBWR checks<br />

the status of M1093 (Matrix pointer increasing flag). If M1093 = ON, MBWR instruction will<br />

proceed to write the next bit, i.e. Pr value plus 1. When MBWR proceeds to the last bit,<br />

M1089 = ON, indicating the end of the Matrix, and D records the last bit number. After this,<br />

MBWR instruction stops.<br />

2. The Pointer (Pr) of the matrix is designated by the user in the instruction. The valid range of<br />

Pr is 0 ~ 16n -1, corresponding to b0 ~ b16n-1 in the matrix. If the Pr value exceeds the valid<br />

range, M1092 = ON and the instruction will be disabled.<br />

3. If operands S or D use KnX, KnY, KnM, KnS format, only n = 4 is applicable.<br />

Program Example:<br />

1. When X0 goes from OFF→ON with M1094 = OFF (Starts from Pr value) and M1093 = ON<br />

(Increase Pr value), the writing will start from the bit number in Pr and Pr value increases 1<br />

after a bit is written.<br />

2. Assume present value of pointer D20 = 45 and M1096 = ON (1) , the following result can be<br />

obtained when X0 is executed once from OFF→ON.<br />

X0<br />

MBWRP D0 K3 D20<br />

3-417

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

Saved successfully!

Ooh no, something went wrong!